Configuration Reference

July 10, 2026 · View on GitHub

Teleton Agent is configured through a single YAML file located at ~/.teleton/config.yaml. This document describes every configuration option, its type, default value, and behavior.

Run teleton setup to generate a config file interactively, or copy config.example.yaml from the repository and edit it manually.


Table of Contents


agent

LLM provider and agentic loop configuration.

KeyTypeDefaultDescription
agent.providerenum"anthropic"LLM provider. One of: anthropic, codex, grok-build, openai, google, xai, groq, openrouter, moonshot, mistral, cerebras, zai, minimax, huggingface, gocoon, local.
agent.api_keystring""API key for the chosen provider. Can be overridden with TELETON_API_KEY env var.
agent.modelstring"claude-haiku-4-5-20251001"Primary model ID. Auto-detected from provider if not set (only for non-Anthropic providers).
agent.utility_modelstringauto-detectedCheap/fast model used for summarization and compaction. If omitted, the platform selects one based on the provider (e.g., claude-haiku-4-5-20251001 for Anthropic, gpt-4o-mini for OpenAI).
agent.base_urlstringoptionalBase URL for local LLM server (e.g., http://localhost:11434/v1). Must be a valid URL.
agent.max_tokensnumber4096Maximum tokens in each LLM response.
agent.temperaturenumber0.7Sampling temperature (0.0 = deterministic, 1.0 = creative).
agent.system_promptstring | nullnullAdditional system prompt text appended to the default SOUL.md personality. Set to null to use only the built-in soul.
agent.max_agentic_iterationsnumber5Maximum number of agentic loop iterations per message. Each iteration is one tool-call-then-result cycle. Higher values allow more complex multi-step reasoning but increase cost and latency.

agent.session_reset_policy

Controls when conversation sessions are cleared, giving the agent a fresh memory context.

KeyTypeDefaultDescription
agent.session_reset_policy.daily_reset_enabledbooleantrueEnable automatic daily session reset.
agent.session_reset_policy.daily_reset_hournumber4Hour of day (0-23, server timezone) to reset all sessions.
agent.session_reset_policy.idle_expiry_enabledbooleantrueEnable session reset after a period of inactivity.
agent.session_reset_policy.idle_expiry_minutesnumber1440Minutes of inactivity before a session resets. Default is 24 hours (1440 minutes).

Example

agent:
  provider: "anthropic"
  api_key: "sk-ant-..."
  model: "claude-haiku-4-5-20251001"
  utility_model: "claude-haiku-4-5-20251001"
  max_tokens: 4096
  temperature: 0.7
  max_agentic_iterations: 5
  session_reset_policy:
    daily_reset_enabled: true
    daily_reset_hour: 4
    idle_expiry_enabled: true
    idle_expiry_minutes: 1440

Provider-Specific Default Models

When you change the provider and omit model, the platform auto-selects:

ProviderDefault ModelDefault Utility Model
anthropicclaude-haiku-4-5-20251001claude-haiku-4-5-20251001
codexgpt-5.5gpt-5.1-codex-mini
grok-buildgrok-buildgrok-build
openaigpt-5.5gpt-4o-mini
googlegemini-2.5-flashgemini-2.0-flash-lite
xaigrok-3grok-3-mini-fast
groqllama-3.3-70b-versatilellama-3.1-8b-instant
openrouteranthropic/claude-opus-4.5google/gemini-2.5-flash-lite
moonshotk2p6k2p6
mistraldevstral-small-2507ministral-8b-latest
cerebrasqwen-3-235b-a22b-instruct-2507llama3.1-8b
zaiglm-5.1glm-4.5-air
minimaxMiniMax-M2.7MiniMax-M2.7
huggingfacedeepseek-ai/DeepSeek-V3.2Qwen/Qwen3-Next-80B-A3B-Instruct
gocoonQwen/Qwen3-32BQwen/Qwen3-32B
localautoauto

grok-build reads the browser/OIDC session created by grok login from $GROK_HOME/auth.json (default: ~/.grok/auth.json) and connects directly to the Grok Build CLI proxy. The session token is not stored in Teleton's config.

Codex model gpt-5.6-luna is hidden and rejected by default because the live backend does not currently advertise it. Keep production on gpt-5.6-terra; TELETON_ENABLE_CODEX_LUNA=true exists only for controlled backend revalidation.


telegram

Telegram client and messaging behavior.

KeyTypeDefaultDescription
telegram.api_idnumber(required)Telegram API ID from my.telegram.org/apps.
telegram.api_hashstring(required)Telegram API hash from my.telegram.org/apps.
telegram.phonestring(required)Phone number linked to the Telegram account, in international format (e.g., "+1234567890").
telegram.session_namestring"teleton_session"Name of the GramJS session file (stored in session_path).
telegram.session_pathstring"~/.teleton"Directory where the Telegram session file is stored.
telegram.dm_policyenum"allowlist"Who can interact via direct messages. See DM Policies below.
telegram.allow_fromnumber[][]List of Telegram user IDs allowed to DM the agent (used when dm_policy is "allowlist").
telegram.group_policyenum"open"Who can interact in groups. See Group Policies below.
telegram.group_allow_fromnumber[][]List of group IDs the agent will respond in (used when group_policy is "allowlist").
telegram.require_mentionbooleantrueIn groups, only respond when the agent is mentioned by name or username.
telegram.max_message_lengthnumber4096Maximum Telegram message length (Telegram's own limit).
telegram.typing_simulationbooleantrueShow "typing..." indicator while the agent processes a message.
telegram.rate_limit_messages_per_secondnumber1.0Maximum outbound messages per second (flood protection).
telegram.rate_limit_groups_per_minutenumber20Maximum outbound messages to groups per minute.
telegram.admin_idsnumber[][]Telegram user IDs with admin privileges (can use /admin commands).
telegram.agent_channelstring | nullnullChannel username or ID for the agent's public feed.
telegram.owner_namestringoptionalOwner's first name (used in personality prompts, e.g., "Alex").
telegram.owner_usernamestringoptionalOwner's Telegram username without @ (e.g., "zkproof").
telegram.owner_idnumberoptionalOwner's Telegram user ID.
telegram.debounce_msnumber1500Debounce delay in milliseconds for group messages. When multiple messages arrive in quick succession, they are batched into a single processing cycle. Set to 0 to disable.
telegram.bot_tokenstringoptional in user modeTelegram Bot token from @BotFather. Required in bot mode; enables plugin inline cards and callbacks in user mode.
telegram.bot_usernamestringoptionalBot username without @ (e.g., "teleton_agent_bot"). Used with bot_token for inline queries.

DM Policies

ValueBehavior
"allowlist"Only users listed in allow_from can interact. Default.
"open"Anyone can DM the agent. Use with caution.
"admin-only"Only users in admin_ids can interact via DM.
"disabled"DMs are completely ignored.

Group Policies

ValueBehavior
"open"Agent responds in any group it is a member of. Default.
"allowlist"Only responds in groups listed in group_allow_from.
"admin-only"Only responds when triggered by users in admin_ids.
"disabled"Group messages are completely ignored.

Example

telegram:
  api_id: 12345678
  api_hash: "0123456789abcdef0123456789abcdef"
  phone: "+1234567890"
  dm_policy: "allowlist"
  group_policy: "open"
  require_mention: true
  admin_ids: [123456789]
  owner_name: "Alex"
  owner_username: "zkproof"
  debounce_ms: 1500
  # bot_token: "123456:ABC-DEF..."
  # bot_username: "my_agent_bot"

embedding

Controls the vector embedding provider for the hybrid RAG (Retrieval-Augmented Generation) memory system.

KeyTypeDefaultDescription
embedding.providerenum"local"Embedding provider. One of: local (ONNX, runs locally), anthropic (API-based), none (FTS5 full-text search only, no vectors).
embedding.modelstringauto-detectedModel override. Default for local is Xenova/all-MiniLM-L6-v2.

Example

embedding:
  provider: "local"
  # model: "Xenova/all-MiniLM-L6-v2"  # default for local

The "local" provider uses ONNX Runtime with the @huggingface/transformers library and requires no external API calls. The "none" provider disables vector search entirely and uses only SQLite FTS5 for memory retrieval.


webui

Optional web dashboard for monitoring and management.

KeyTypeDefaultDescription
webui.enabledbooleanfalseEnable the WebUI server. Can also be enabled via TELETON_WEBUI_ENABLED=true env var or the --webui CLI flag.
webui.portnumber7777HTTP server port. Override with TELETON_WEBUI_PORT env var.
webui.hoststring"127.0.0.1"Bind address. Defaults to localhost only for security. Override with TELETON_WEBUI_HOST env var. Set to "0.0.0.0" to expose externally (not recommended without a reverse proxy).
webui.auth_tokenstringauto-generatedBearer token for API authentication. If omitted, a random token is generated at startup and printed to the console.
webui.cors_originsstring[]["http://localhost:5173", "http://localhost:7777"]Allowed CORS origins. Add your domain if accessing from a different host.
webui.log_requestsbooleanfalseLog all HTTP requests to the WebUI server.

Example

webui:
  enabled: true
  port: 7777
  host: "127.0.0.1"
  # auth_token: "my-secret-token"
  cors_origins:
    - "http://localhost:5173"
    - "http://localhost:7777"
  log_requests: false

storage

Legacy file paths (sessions and memory are now stored in SQLite). These fields exist for backward compatibility with the Zod schema but are no longer actively used in v0.5+.

KeyTypeDefaultDescription
storage.history_limitnumber100Maximum number of messages retained in a conversation session's history.
storage.sessions_filestring"~/.teleton/sessions.json"Path to the sessions file (legacy, superseded by SQLite in v0.5+).
storage.memory_filestring"~/.teleton/memory.json"Path to the memory file (legacy, superseded by SQLite in v0.5+).

Example

storage:
  history_limit: 100

logging

Structured logging configuration (Pino).

KeyTypeDefaultDescription
logging.levelenum"info"Log level. One of: trace, debug, info, warn, error, fatal.
logging.prettybooleantrueEnable pino-pretty formatting (human-readable, colored output).

Example

logging:
  level: "info"
  pretty: true

heartbeat

Periodic heartbeat timer that triggers the agent to check for pending tasks.

KeyTypeDefaultDescription
heartbeat.enabledbooleantrueEnable the periodic heartbeat timer.
heartbeat.interval_msnumber3600000Heartbeat interval in milliseconds. Minimum 60000 (60 seconds), default 3600000 (60 minutes).
heartbeat.promptstring"Execute your HEARTBEAT.md checklist now. Work through each item using tool calls."Prompt sent to the agent on each heartbeat tick.
heartbeat.self_configurablebooleanfalseAllow the agent to modify heartbeat config at runtime via config_set.

Example

heartbeat:
  enabled: true
  interval_ms: 3600000
  prompt: "Execute your HEARTBEAT.md checklist now. Work through each item using tool calls."
  self_configurable: false

tool_rag

Semantic tool retrieval configuration. When enabled, the agent uses embedding-based search to select the most relevant tools for each LLM call, reducing prompt size and improving performance.

KeyTypeDefaultDescription
tool_rag.enabledbooleantrueEnable semantic tool retrieval (Tool RAG).
tool_rag.top_knumber35Maximum number of tools to retrieve per LLM call.
tool_rag.always_includestring[]["journal_*", "workspace_*", "web_*"]Tool name patterns always included regardless of relevance score. Supports prefix glob with *. Telegram send tools remain searchable but are excluded by default to prevent duplicate replies and progress messages.
tool_rag.skip_unlimited_providersbooleanfalseSkip Tool RAG for providers with no tool limit (e.g., Anthropic). When true, all tools are sent to those providers.

Example

tool_rag:
  enabled: true
  top_k: 35
  always_include:
    - "journal_*"
    - "workspace_*"
    - "web_*"
  skip_unlimited_providers: false

capabilities

Controls optional agent capabilities that require explicit opt-in.

capabilities.exec

System command execution (shell access). Disabled by default for security.

KeyTypeDefaultDescription
capabilities.exec.modeenum"off"Exec mode: off (disabled) or yolo (full system access).
capabilities.exec.scopeenum"admin-only"Who can trigger exec tools. One of: admin-only, allowlist, all.
capabilities.exec.allowlistnumber[][]Telegram user IDs allowed to use exec (when scope is "allowlist").
capabilities.exec.limits.timeoutnumber120Max seconds per command execution (1-3600).
capabilities.exec.limits.max_outputnumber50000Max characters of stdout/stderr captured per command (1000-500000).
capabilities.exec.audit.log_commandsbooleantrueLog every command to SQLite audit table.

Example

capabilities:
  exec:
    mode: "yolo"
    scope: "admin-only"
    limits:
      timeout: 120
      max_output: 50000
    audit:
      log_commands: true

mcp

Model Context Protocol (MCP) server configuration. Supports both stdio (command-based) and SSE/HTTP (URL-based) transports.

KeyTypeDefaultDescription
mcp.serversrecord{}Map of server name to server configuration. Each server needs either command (stdio) or url (SSE/HTTP).

Each server entry supports:

KeyTypeDefaultDescription
commandstringoptionalStdio command (e.g., npx @modelcontextprotocol/server-filesystem /tmp).
argsstring[]optionalExplicit args array (overrides command splitting).
envrecordoptionalEnvironment variables for stdio server.
urlstringoptionalSSE/HTTP endpoint URL (alternative to command).
scopeenum"always"Tool scope. One of: always, dm-only, group-only, admin-only.
enabledbooleantrueEnable/disable this server.

Example

mcp:
  servers:
    filesystem:
      command: "npx @modelcontextprotocol/server-filesystem /tmp"
      scope: "admin-only"
    remote-api:
      url: "https://mcp.example.com/sse"
      enabled: true

dev

Developer options.

KeyTypeDefaultDescription
dev.hot_reloadbooleanfalseEnable plugin hot-reload. When enabled, the platform watches ~/.teleton/plugins/ for file changes and automatically reloads modified plugins without restarting.

Example

dev:
  hot_reload: true

plugins

Per-plugin configuration. Each key is the plugin name (with hyphens replaced by underscores), and the value is an arbitrary object passed to the plugin as pluginConfig.

Plugins access their configuration via sdk.pluginConfig in the tools factory, or via pluginConfig in the start() context.

Example

plugins:
  casino:
    enabled: true
    min_bet: 0.1
    cooldown_seconds: 30
  my_custom_plugin:
    api_endpoint: "https://api.example.com"
    max_results: 10

Plugin secrets (API keys, tokens) should NOT be stored here. Use the /plugin set <name> <key> <value> admin command instead, which stores secrets securely in ~/.teleton/plugins/data/<plugin>.secrets.json with 0600 permissions.


ton_proxy

Optional TON Proxy configuration. When enabled, the agent runs a Tonutils-Proxy instance for accessing TON Sites and ADNL resources.

KeyTypeDefaultDescription
ton_proxy.enabledbooleanfalseEnable the TON Proxy module. When true, the proxy starts with the agent.
ton_proxy.portnumber8080Local HTTP proxy port (1-65535).
ton_proxy.binary_pathstringoptionalCustom path to tonutils-proxy-cli binary. If omitted, the binary is auto-downloaded on first run.

Example

ton_proxy:
  enabled: true
  port: 8080
  # binary_path: "/usr/local/bin/tonutils-proxy-cli"

api

HTTPS Management API for remote agent administration. See the full Management API documentation for endpoint details, authentication, and examples.

KeyTypeDefaultDescription
api.enabledbooleanfalseEnable the HTTPS Management API server.
api.portnumber7778HTTPS server port (1-65535).
api.key_hashstring""SHA-256 hash of the API key. Auto-generated on first start — do not set manually.
api.allowed_ipsstring[][]IP whitelist. Empty array allows all authenticated requests.

Example

api:
  enabled: true
  port: 7778
  allowed_ips:
    - "203.0.113.10"

gocoon

Gocoon configuration. Gocoon is a pure-Go COCOON client: a decentralized LLM that pays in TON. It exposes a native OpenAI-compatible API (with function calling) and requires the gocoon-runner process running on the specified port.

KeyTypeDefaultDescription
gocoon.portnumber10000HTTP port of the gocoon-runner OpenAI-compatible API (1-65535).

The gocoon section is optional. Only needed when agent.provider is set to "gocoon".

Example

gocoon:
  port: 10000

tonapi_key

KeyTypeDefaultDescription
tonapi_keystringoptionalTonAPI key for higher rate limits on blockchain queries. Obtain from @tonapi_bot on Telegram.

Example

tonapi_key: "AF..."

toncenter_api_key

KeyTypeDefaultDescription
toncenter_api_keystringoptionalTonCenter API key for a dedicated RPC endpoint. Free at toncenter.com.

Example

toncenter_api_key: "abc123..."

tavily_api_key

KeyTypeDefaultDescription
tavily_api_keystringoptionalTavily API key for web search and extract tools. Free at tavily.com.

Example

tavily_api_key: "tvly-..."

meta

Metadata section (mostly auto-managed).

KeyTypeDefaultDescription
meta.versionstring"1.0.0"Config file schema version.
meta.created_atstringoptionalISO 8601 timestamp of when the config was created.
meta.last_modified_atstringoptionalISO 8601 timestamp of the last modification (auto-updated on save).
meta.onboard_commandstring"teleton setup"Command shown to users for onboarding.

Environment Variable Overrides

Environment variables override values set in config.yaml. They are applied after the YAML file is loaded.

Core Variables

VariableDefaultDescription
TELETON_HOME~/.teletonRoot directory for all teleton data (config, wallet, session, workspace, plugins, secrets, database).
TELETON_LOG(unset)Set to "verbose" to enable verbose logging (maps to debug level). Can also be toggled at runtime via /verbose.
TELETON_LOG_LEVEL(unset)Explicit log level override. One of: trace, debug, info, warn, error, fatal. Takes priority over TELETON_LOG.

Config Overrides

VariableConfig PathDescription
TELETON_API_KEYagent.api_keyOverride the LLM provider API key.
TELETON_TG_API_IDtelegram.api_idOverride the Telegram API ID (integer).
TELETON_TG_API_HASHtelegram.api_hashOverride the Telegram API hash.
TELETON_TG_PHONEtelegram.phoneOverride the phone number.
TELETON_WEBUI_ENABLEDwebui.enabledEnable WebUI ("true" or "false").
TELETON_WEBUI_PORTwebui.portWebUI server port.
TELETON_WEBUI_HOSTwebui.hostWebUI bind address.
TELETON_API_ENABLEDapi.enabledEnable Management API ("true" or "false").
TELETON_API_PORTapi.portManagement API HTTPS port.
TELETON_BASE_URLagent.base_urlBase URL for local LLM server (must be a valid URL).
TELETON_TAVILY_API_KEYtavily_api_keyTavily API key for web search tools.
TELETON_TONAPI_KEYtonapi_keyTonAPI key for blockchain queries.
TELETON_TONCENTER_API_KEYtoncenter_api_keyTonCenter API key for RPC endpoint.

LLM Provider API Keys

Each provider has a dedicated environment variable. Only the key for the configured provider is needed.

VariableProviderKey Format
ANTHROPIC_API_KEYAnthropic (Claude)sk-ant-...
OPENAI_API_KEYOpenAI (GPT-5.5)sk-proj-...
GOOGLE_API_KEYGoogle (Gemini)AIza...
XAI_API_KEYxAI (Grok)xai-...
GROQ_API_KEYGroqgsk_...
OPENROUTER_API_KEYOpenRoutersk-or-...
MOONSHOT_API_KEYMoonshotsk-...
MISTRAL_API_KEYMistral--
CEREBRAS_API_KEYCerebrascsk-...
ZAI_API_KEYZAI--
MINIMAX_API_KEYMiniMax--
HF_TOKENHuggingFacehf_...

The TELETON_API_KEY override takes precedence over all provider-specific env vars.

TTS Service Keys

Used by telegram_send_voice for text-to-speech. The default TTS provider (piper) is offline and needs no key.

VariableDescription
OPENAI_API_KEYRequired for the openai TTS provider.
ELEVENLABS_API_KEYRequired for the elevenlabs TTS provider.

Debug & Development

VariableDescription
DEBUGEnable debug logging in the Telegram client and plugin SDK.
DEBUG_SQLEnable SQLite query logging to console.

Precedence Order

Configuration values are resolved in this order (highest priority first):

  1. CLI flags (--webui, --webui-port, -c) (highest)
  2. Environment variables (TELETON_* overrides)
  3. Config file (config.yaml)
  4. Schema defaults (Zod schema default values, lowest)

Example (Docker)

docker run -d \
  -e TELETON_API_KEY="sk-ant-..." \
  -e TELETON_TG_API_ID="12345678" \
  -e TELETON_TG_API_HASH="0123456789abcdef" \
  -e TELETON_TG_PHONE="+1234567890" \
  -e TELETON_WEBUI_ENABLED="true" \
  -v teleton-data:/data \
  ghcr.io/tonresistor/teleton-agent

Complete Example

meta:
  version: "1.0.0"

agent:
  provider: "anthropic"
  api_key: "sk-ant-..."
  model: "claude-haiku-4-5-20251001"
  max_tokens: 4096
  temperature: 0.7
  max_agentic_iterations: 5
  session_reset_policy:
    daily_reset_enabled: true
    daily_reset_hour: 4
    idle_expiry_enabled: true
    idle_expiry_minutes: 1440

telegram:
  api_id: 12345678
  api_hash: "0123456789abcdef0123456789abcdef"
  phone: "+1234567890"
  dm_policy: "allowlist"
  group_policy: "open"
  require_mention: true
  admin_ids: [123456789]
  owner_name: "Alex"
  owner_username: "zkproof"
  debounce_ms: 1500

embedding:
  provider: "local"

webui:
  enabled: false
  port: 7777
  host: "127.0.0.1"

logging:
  level: "info"
  pretty: true

heartbeat:
  enabled: true
  interval_ms: 3600000

tool_rag:
  enabled: true
  top_k: 35

dev:
  hot_reload: false

plugins:
  casino:
    enabled: true
    min_bet: 0.1

# ton_proxy:
#   enabled: false
#   port: 8080

# tonapi_key: "AF..."
# toncenter_api_key: "abc123..."
# tavily_api_key: "tvly-..."