Multi-platform agentic AI harness. Runs on **Teleg…
Multi-platform agentic AI harness. Runs on Telegram, Discord, Microsoft Teams, and the Terminal, with a pluggable backend (Claude Agent SDK, Kilo, OpenCode, Codex, or OpenAI Agents) and full tool access through MCP.
Multi-frontend Telegram (Grammy + GramJS userbot), Discord (discord.js), Microsoft Teams (Bot Framework), Terminal with live tool visibility
Pluggable backend Claude Agent SDK, Kilo, OpenCode, Codex, OpenAI Agents — selectable per-process via backend config. Streaming, model fallback, context-overflow recovery.
MCP tools Messaging, media, history, search, web fetch, cron jobs, triggers, goals, stickers, file system, admin controls
Plugins Hot-reloadable plugin system. Built-in: GitHub, MemPalace, Playwright, Brave Search
Background agents Heartbeat (hourly by default — advances goals, proactively messages when something matters) and Dream (memory consolidation + diary)
Goals Persistent multi-day objectives the agent commits to in chat; every heartbeat run re-reads them, makes progress, and records what it did
Skills Agent-authored reusable scripts (bash/python/node) — procedures worked out once get saved and replayed locally at zero token cost
Triggers Self-authored watcher scripts (bash/python/node) that wake the bot when conditions are met
Per-chat settings Model, effort level, and pulse toggle per conversation via inline keyboard
Model registry Models discovered from the active backend at startup — new models appear in all pickers automatically
git clone https://github.com/dylanneve1/talon.git && cd talon npm install
npx talon setup
npx talon start # configured frontend (daemon mode) npx talon chat # terminal chat mode
Prerequisites:
Node.js 24+
Backend-specific:
claude backend: Claude Code installed and authenticated ( claude CLI on PATH).
kilo backend: nothing extra — @kilocode/sdk spawns a local server. Free models are accessible without auth; routed models use Kilo's own credentials.
opencode backend: nothing extra — @opencode-ai/sdk spawns a local server.
codex backend: install the codex CLI ( npm i -g @openai/codex ) and authenticate with codex login , CODEX_API_KEY , TALON_CODEX_KEY , or codexApiKey . OPENAI_API_KEY is used only as a fallback when no Codex login exists.
Talon runs from a normal source or package install; standalone compiled binaries are not supported.
index.ts Composition root
|
+-- core/ Platform-agnostic engine
| +-- agent-runtime/ Backend capability interfaces, events, stores
| +-- models/ Model layer: catalog, per-chat active model,
| | reasoning-effort vocabulary
| +-- prompt/ System-prompt assembly + prompts/system templates
| +-- background/ Agents that run without a user message:
| | heartbeat, dream, pulse, cron, triggers
| +-- tools/ MCP tool definitions + spawn/env contract
| +-- engine/ Message flow: dispatcher (per-chat serial,
| | cross-chat parallel), HTTP gateway for MCP
| | tool calls, backend lifecycle controller
| +-- plugin.ts Plugin loader, registry, hot-reload
|
+-- backend/
| +-- registry.ts Bootstrap-decoupled backend lookup
| +-- shared/ Cross-backend helpers (stream state, flow violation,
| | delivery contract, metrics, prompt format,
| | model retry, system prompt, usage)
| +-- remote-server/ Shared infrastructure for agent-server backends
| | (MCP registration, sessions, providers, lifecycle)
| +-- claude-sdk/ Claude Agent SDK (in-process MCP, hooks)
| +-- kilo/ Kilo HTTP server backend (streaming via SSE)
| +-- opencode/ OpenCode HTTP server backend
| +-- codex/ Codex CLI backend (@openai/codex-sdk)
| +-- openai-agents/ OpenAI Agents SDK backend (Responses API)
|
+-- frontend/
| +-- shared/ Cross-frontend presentation helpers
| +-- telegram/ Grammy bot + GramJS userbot
| +-- discord/ discord.js v14
| +-- teams/ Bot Framework + Graph API
| +-- terminal/ Readline CLI with tool call visibility
|
+-- storage/ Sessions, history, chat settings,
| cron jobs, media index, daily logs
+-- util/ Config, logging, workspace, paths, time
Dependency rule: core/ imports nothing from frontend/ or backend/ . Frontends and backends depend on core types, never on each other. All five backends (Claude SDK, Kilo, OpenCode, Codex, OpenAI Agents) implement the same Backend capability interface from core/agent-runtime/capabilities.ts . Kilo and OpenCode additionally share the remote-server/ infrastructure because they wrap forks of the same upstream HTTP agent server.
Prompts: everything the model reads at session start is assembled by core/prompt/ from the files in prompts/ — see prompts/README.md for the assembly order, file ownership (user-editable vs package-owned templates), and the per-backend delivery contracts.
Select via the backend field in ~/.talon/config.json . All backends implement the same Backend capability interface — heartbeat, dream, and chat handlers are backend-agnostic.
Backend backend value Transport Notes
Claude SDK "claude" In-process via @anthropic-ai/claude-agent-sdk Requires the claude CLI on PATH . Hook-based turn termination.
Kilo "kilo" Local HTTP server via @kilocode/sdk SSE-streamed turns. Routes to many model providers via Kilo's auth.
OpenCode "opencode" Local HTTP server via @opencode-ai/sdk SSE-streamed turns; same MCP and session shape as Kilo (upstream fork).
Codex "codex" Per-turn subprocess via @openai/codex-sdk Requires the codex CLI from @openai/codex and Codex auth ( codex login , CODEX_API_KEY , TALON_CODEX_KEY , or codexApiKey ). MCP servers configured via TOML overrides at thread start.
OpenAI Agents "openai-agents" In-process via @openai/agents Responses API (or any OpenAI-compatible endpoint via TALON_AGENTS_URL / openaiBaseUrl ). Persistent per-chat MCP bundles.
The Kilo and OpenCode backends share infrastructure ( backend/remote-server/ ) since the upstream HTTP API is the same; each backend supplies its own SDK client, port, and delivery suffix. Codex is its own integration on top of the Codex CLI's JSONL event stream.
GitHub API access via the official GitHub MCP server. Gives the agent access to repositories, issues, PRs, code search, and more.
Requirements: Docker installed and running.
{ "github" : { "enabled" : true , "token" : " ghp_... " } }
The token is optional --- defaults to the output of gh auth token if the GitHub CLI is authenticated.
Structured long-term memory with vector search. The agent can store, search, and retrieve memories semantically. Integrates with Dream mode for automatic memory consolidation and personal diary entries.
Requirements: Python 3.10+ with the mempalace package.
python -m venv ~ /.talon/mempalace-venv ~ /.talon/mempalace-venv/bin/pip install mempalace # Unix
{ "mempalace" : { "enabled" : true , "palacePath" : " ~/.talon/workspace/palace " , "pythonPath" : " ~/.talon/mempalace-venv/bin/python " } }
Both paths are optional --- defaults to ~/.talon/workspace/palace/ and the venv Python respectively.
Headless browser automation via the Playwright MCP server. The agent can browse websites, take screenshots, generate PDFs, fill forms, and scrape content.
Requirements: None --- @playwright/mcp is bundled with Talon.
{ "playwright" : { "enabled" : true , "browser" : " chromium " , "headless" : true } }
Supported browsers: chromium (default), chrome , firefox , webkit , msedge .
Web search via the Brave Search MCP server. Replaces the built-in WebSearch/WebFetch tools with higher-quality search results.
{ "braveApiKey" : " BSA... " }
Get an API key at brave.com/search/api .
Plugins add MCP tools and gateway actions without modifying co…
本条由桃子采集流水线(启发式模式)自动整理,原文见文末信源。