Fixes and updates: - README.md: Remove duplicate heartbeat troubleshooting section - docs/getting-started.md: Fix Node version (18→20), commands, repo URL - docs/commands.md: Rewrite with accurate command list (/start, /status, /heartbeat) - docs/README.md: New multi-channel architecture diagram - docs/whatsapp-setup.md: Add selfChatMode safety docs, media support section - docs/slack-setup.md: Fix broken links New documentation: - docs/configuration.md: Complete YAML config reference - docs/cron-setup.md: Scheduling guide (cron jobs + heartbeats) Written by Cameron ◯ Letta Code "Documentation is a love letter that you write to your future self." - Damian Conway
2.1 KiB
2.1 KiB
Getting Started
Get LettaBot running in 5 minutes.
Prerequisites
- Node.js 20+
- npm or yarn
- A Telegram account
- A Letta account (app.letta.com)
Quick Start
1. Clone and Install
git clone https://github.com/letta-ai/lettabot.git
cd lettabot
npm install
2. Create a Telegram Bot
- Open Telegram and message @BotFather
- Send
/newbotand follow the prompts - Copy the bot token (looks like
123456789:ABCdefGHIjklMNOpqrsTUVwxyz)
3. Get a Letta API Key
- Go to app.letta.com
- Sign in or create an account
- Go to Settings > API Keys
- Create a new API key and copy it
4. Configure LettaBot
Option A: Interactive Setup (Recommended)
npm run build
npm link
lettabot onboard
This will walk you through configuration interactively.
Option B: Manual Setup
cp .env.example .env
Edit .env:
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
LETTA_API_KEY=your_letta_api_key
5. Start the Bot
npm run dev
You should see:
Starting LettaBot...
Bot started as @your_bot_name
Allowed users: all
6. Chat with Your Bot
Open Telegram and message your bot. Try:
- "Hello!"
- "What can you help me with?"
- "Remember that my favorite color is blue"
Configuration Options
| Variable | Required | Description |
|---|---|---|
TELEGRAM_BOT_TOKEN |
Yes | From @BotFather |
LETTA_API_KEY |
Yes | From app.letta.com |
ALLOWED_USERS |
No | Comma-separated Telegram user IDs to allow |
WORKING_DIR |
No | Base directory for agent workspaces (default: /tmp/lettabot) |
LETTA_CLI_PATH |
No | Custom path to letta CLI |
Restricting Access
To limit who can use your bot, set ALLOWED_USERS:
# Find your Telegram user ID by messaging @userinfobot
ALLOWED_USERS=123456789,987654321
Next Steps
- Commands Reference - Learn all bot commands
- Gmail Integration - Set up email notifications
- Slack Setup - Add Slack channel
- Discord Setup - Add Discord channel