Skip to content

Quick start

This walks through the minimum to get a working Talon agent connected to Telegram. You’ll have a daemon running and responding to messages by the end.

Create a .env file in the project root:

Terminal window
TELEGRAM_BOT_TOKEN=your-bot-token-here

If you ran npx talonctl setup, you already have a talond.yaml. Otherwise, create one. Here’s the minimal working config:

storage:
type: sqlite
path: data/talond.sqlite
personas:
- name: assistant
model: claude-sonnet-4-6
systemPromptFile: personas/assistant/system.md
capabilities:
allow:
- channel.send:my-telegram
channels:
- name: my-telegram
type: telegram
enabled: true
config:
botToken: ${TELEGRAM_BOT_TOKEN}
allowedChatIds:
- "123456789" # replace with your Telegram user ID, as a string
bindings:
- persona: assistant
channel: my-telegram
isDefault: true
auth:
mode: subscription
logLevel: info
dataDir: data

Replace 123456789 with your actual Telegram user ID. Keep the quotes. Talon compares chat IDs as strings, so an unquoted number does not match.

Terminal window
npx talonctl add-persona --name assistant

This adds the persona to talond.yaml and creates personas/assistant/system.md from the template. Edit the file to set the agent’s tone, constraints, and any tool instructions.

add-persona refuses a name that is already in the config. If you pasted the config above, the assistant entry exists already. In that case create the prompt file by hand:

Terminal window
mkdir -p personas/assistant
echo "You are a helpful assistant." > personas/assistant/system.md
Terminal window
npx talonctl migrate --config talond.yaml
Terminal window
npx talonctl doctor --config talond.yaml

All checks should pass: Node.js version, Docker, config file, database access, and data directories. If any fail, the output gives a hint on what to fix.

Terminal window
node dist/index.js --config talond.yaml

The daemon logs structured JSON. Look for these messages in the msg field:

daemon: starting
daemon: all channel connectors started
daemon: running

Open Telegram and send a message to your bot. The agent should respond within a few seconds.

The terminal channel lets you chat with any persona directly from the CLI — useful for testing without setting up a messaging platform.

Add the terminal channel to your config:

channels:
- name: my-terminal
type: terminal
enabled: true
config:
port: 7700
host: 0.0.0.0
token: ${TERMINAL_TOKEN}

Add TERMINAL_TOKEN=your-secret to .env, add a binding, restart the daemon, then connect:

Terminal window
npx talonctl chat --host localhost --port 7700 --token your-secret

You can also set TERMINAL_TOKEN in the environment instead of passing --token. Use --persona <name> to pick a persona and --client-id <id> to keep the same conversation thread across reconnects.

You get a rendered Markdown terminal client with a typing spinner while the agent works.