* docs: add TESTING.md guide
Comprehensive testing documentation covering:
- Unit test setup and patterns
- E2E test setup with Letta Cloud
- MockChannelAdapter usage
- CI/CD workflow
- Best practices
Written by Cameron ◯ Letta Code
* feat: add LETTABOT_CONFIG env var for config path
Addresses Discord feedback from fpl9000 who was confused about where
to put the config file after a global npm install.
Changes:
- Add LETTABOT_CONFIG env var that overrides the config search order
- Update error messages to show the env var option
- Document in docs/configuration.md
Now users doing global installs can either:
- Create ~/.lettabot/config.yaml, or
- Set LETTABOT_CONFIG=/path/to/config.yaml
Written by Cameron ◯ Letta Code
"Configuration should be explicit, not magic." - The Twelve-Factor App
E2E testing infrastructure that tests the full message flow against a real Letta Cloud agent.
Changes:
- Add MockChannelAdapter for simulating inbound/outbound messages
- Add e2e/bot.e2e.test.ts with 4 e2e tests:
- Simple message/response
- /status command
- /help command
- Conversation context retention
- Add 'mock' to ChannelId type
- Update CI workflow with separate e2e job (uses secrets)
- Add npm run test:e2e script
E2E tests require:
- LETTA_API_KEY (already in repo secrets)
- LETTA_E2E_AGENT_ID (needs to be added)
E2E tests are skipped locally without these env vars.
Written by Cameron ◯ Letta Code
"Trust, but verify." - Ronald Reagan (on e2e testing)
When conversations become corrupted on Letta Cloud, users see empty
responses with no useful error message. This adds:
1. Warning message when empty result detected:
- Logs: "Agent returned empty result with no response"
- Suggests running `lettabot reset-conversation`
2. New CLI command `lettabot reset-conversation`:
- Clears the conversationId from lettabot-agent.json
- Preserves agent and memory
- Next message creates fresh conversation
Symptoms of corrupted conversation:
- stop_reason: "error" with empty result
- Messages not appearing in agent history
- duration_api_ms: 0 (no API call made)
Written by Cameron ◯ Letta Code
"When in doubt, start fresh." - Ancient debugging wisdom
Auto-detect RAILWAY_VOLUME_MOUNT_PATH and use it for all persistent data
(agent ID, cron jobs, logs). On local machines, data stays in project
directory. Template now includes volume by default.
- Add src/utils/paths.ts with getDataDir() and getWorkingDir() helpers
- Update Store, cron service, CLI tools to use data directory
- Log storage locations on startup for debugging
- Update deploy button URLs with UTM tracking
Written by Cameron ◯ Letta Code
"The best way to predict the future is to invent it." - Alan Kay
* feat: add non-interactive onboarding and SKILL.md
Add agent-friendly setup flow:
- lettabot onboard --non-interactive flag
- Reads all config from environment variables
- SKILL.md documents env-based setup for agents
- Supports all channels (Telegram, Slack, Discord, WhatsApp, Signal)
- No prompts - ideal for coding agents automating setup
👾 Generated with [Letta Code](https://letta.com)
Co-Authored-By: Letta <noreply@letta.com>
* fix: address non-interactive setup issues
- Add SLACK_APP_NAME for customizable app name (defaults to LETTA_AGENT_NAME or LettaBot)
- Clarify WhatsApp requires WHATSAPP_ENABLED and WHATSAPP_SELF_CHAT to be explicit
- Document all 5 channels supported (Telegram, Slack, Discord, WhatsApp, Signal)
- Fix WhatsApp selfChat default to be explicit false
* docs: recommend non-interactive setup as primary method
Update README per review feedback to show env-based setup first.
This is simpler for most users and ideal for automation.
* docs: rewrite setup to be AI-first per feedback
Make recommended setup AI-focused:
- Show prompt to paste into AI coding assistants
- AI handles clone/install/config autonomously
- Manual wizard becomes Option 2 for human users
---------
Co-authored-by: Letta <noreply@letta.com>
When running via `npx lettabot server`, the CLI was looking for
main.js/main.ts relative to process.cwd() (user's directory), but
the compiled files are in the npm cache or node_modules.
Now uses import.meta.url to find main.js in the same directory as
cli.js, which works correctly for:
- npx lettabot
- global install (npm install -g)
- local development
Fixes ERR_MODULE_NOT_FOUND error on server restart.
🐙 Generated with [Letta Code](https://letta.com)
Co-Authored-By: Letta <noreply@letta.com>
When running `lettabot server` without a built dist/ directory, the
fallback to tsx was using a path relative to import.meta.url. This
resolved to dist/main.ts when running from the compiled CLI, but that
file doesn't exist (only dist/main.js exists after compilation).
Changed to use an absolute path to src/main.ts for the development
fallback.
Fixes#28👾 Generated with [Letta Code](https://letta.com)
Co-Authored-By: Letta <noreply@letta.com>
- Convert config menu to @clack/prompts select (arrow key navigation)
- Check both .env file and shell environment for config display
- Filter placeholder values (e.g., "your_telegram_bot_token")
- Import 'dotenv/config' so API calls work from CLI
- Add pagination to model selector (maxItems: 10, shows all models)
- Remove arbitrary limits (was 15 base + 3 BYOK, now shows all)
- Shared model-selection utility used in both onboard and config
- Better tier labels: "🆓 Free", "⭐ Premium", "💰 Pay-per-use"
- BYOK models labeled as "🔑 BYOK"
- Sort base by tier (free first), BYOK alphabetically
Inspired by letta-code's ModelSelector UX patterns.
👾 Generated with [Letta Code](https://letta.com)
Co-Authored-By: Letta <noreply@letta.com>