Co-authored-by: Cameron Pfiffer <cameron@pfiffer.org> Co-authored-by: Caren Thomas <carenthomas@gmail.com> Co-authored-by: Charles Packer <packercharles@gmail.com> Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2.1 KiB
2.1 KiB
Getting Started
Get LettaBot running in 5 minutes.
Prerequisites
- Node.js 18+
- npm or yarn
- A Telegram account
- A Letta account (app.letta.com)
Quick Start
1. Clone and Install
git clone https://github.com/yourusername/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 setup
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
- Check out PLAN.md for the full roadmap