ENยทESยทDEยทPTยทFR
โŒ˜K

Configuration

Complete reference for config.toml. All sections and their defaults.

[provider]

KeyTypeDefaultDescription
kindstring"google_genai"Provider type: google_genai, openai_compatible, or anthropic
api_keystringโ€”API key for the provider (required)
gateway_tokenstringnullOptional Cloudflare AI Gateway token used as cf-aig-authorization
base_urlstringโ€”API base URL (required for openai_compatible, not used for native providers)

[provider.models]

KeyTypeDefaultDescription
primarystring(provider default)Default model for general queries
faststring(same as primary)Low-latency model for intent-gate/simple turns (prefer non-reasoning instruct models)
smartstring(same as primary)Model for complex execution turns (can be the same as primary)
Model Defaults
Provider-aware defaults are filled automatically by the wizard and may change across releases as provider catalogs evolve. For production, pin explicit model IDs in [provider.models]. If all three tiers resolve to the same model, auto-routing is disabled. See Model Routing.
Fast Tier Guidance
Set provider.models.fast to a cheap non-reasoning instruction model for intent-gate and routing. Avoid reasoning/thinking models in fast because they usually increase token burn and latency for no routing benefit.

[telegram]

KeyTypeDefaultDescription
bot_tokenstringโ€”Telegram bot token from @BotFather (required)
allowed_user_idsarray[]Numeric Telegram user IDs allowed to chat. Empty = no restriction.

[slack]

Requires the slack feature flag at compile time. See Slack for full setup guide.

KeyTypeDefaultDescription
enabledboolfalseEnable the Slack channel
app_tokenstringโ€”Slack App-Level Token for Socket Mode (xapp-...)
bot_tokenstringโ€”Slack Bot Token for Web API (xoxb-...)
allowed_user_idsarray[]Slack user IDs allowed to interact. Empty = no restriction.
use_threadsbooltrueReply in threads by default

[discord]

Requires the discord feature flag at compile time. See Discord for full setup guide.

KeyTypeDefaultDescription
bot_tokenstringDiscord bot token from the Developer Portal
allowed_user_idsarray[]Discord user IDs allowed to interact. Empty = no restriction.
guild_idintegernullOptional guild/server ID to restrict the bot to a single server

[state]

KeyTypeDefaultDescription
db_pathstring"aidaemon.db"Path to SQLite database file
working_memory_capinteger50Max messages per session kept in memory
consolidation_interval_hoursinteger6Hours between memory consolidation runs
max_factsinteger100Maximum number of facts injected into the system prompt
daily_token_budgetintegernullMax total tokens (input+output) per day. Null = unlimited. Resets at midnight UTC.
encryption_keystringnullSQLCipher encryption key (requires encryption feature). AES-256 at rest.

[terminal]

KeyTypeDefaultDescription
allowed_prefixesarray(see below)Command prefixes auto-approved without user confirmation
initial_timeout_secsinteger30Timeout in seconds for initial command execution
max_output_charsinteger4000Truncate command output beyond this length
permission_modestring"default"Risk permission mode: default, cautious, or yolo. See Command Risk.

Default allowed prefixes:

text
ls, cat, head, tail, echo, date, whoami, pwd, find, wc,
grep, tree, file, stat, uname, df, du, ps, which, env, printenv
Shell Operators
Commands containing ; | && || $() or backticks always require approval, even if the prefix is whitelisted.

[daemon]

KeyTypeDefaultDescription
health_portinteger8080Port for the health check HTTP endpoint
health_bindstring"127.0.0.1"Bind address. Use "0.0.0.0" for external access.

[triggers.email]

KeyTypeDefaultDescription
hoststringโ€”IMAP server hostname (e.g., imap.gmail.com)
portintegerโ€”IMAP port (typically 993 for TLS)
usernamestringโ€”Email account username
passwordstringโ€”Email account password or app-specific password
folderstring"INBOX"IMAP folder to monitor

[mcp.<name>]

KeyTypeDefaultDescription
commandstringโ€”Executable path or name for the MCP server
argsarray[]Command-line arguments

[browser]

KeyTypeDefaultDescription
enabledboolfalseEnable browser automation tool
headlessbooltrueRun Chrome without a visible window
screenshot_widthinteger1280Browser viewport width in pixels
screenshot_heightinteger720Browser viewport height in pixels
user_data_dirstring~/.aidaemon/chrome-profileChrome profile directory for persistent sessions
profilestringDefaultChrome profile name within user_data_dir
remote_debugging_portintegernullConnect to existing Chrome on this port (advanced)

[skills]

KeyTypeDefaultDescription
dirstring"skills"Directory containing skill markdown files
enabledbooltrueEnable the skills system
registriesarray[]URLs of skill registry JSON manifests for browsing/installing skills

[subagents]

KeyTypeDefaultDescription
enabledbooltrueAllow the agent to spawn sub-agents
max_depthinteger3Maximum nesting level for sub-agent recursion
max_iterationsinteger10Max agentic loop steps per sub-agent invocation
max_response_charsinteger8000Truncate sub-agent responses beyond this length
timeout_secsinteger300Sub-agent execution timeout in seconds

[cli_agents]

KeyTypeDefaultDescription
enabledboolfalseEnable CLI agent delegation tool
timeout_secsinteger600Global timeout for CLI agent execution
max_output_charsinteger16000Global max output length from CLI agents

[cli_agents.tools.<name>]

KeyTypeDefaultDescription
commandstringโ€”Command to execute
argsarray[]Default arguments passed to the command
descriptionstringโ€”Tool description shown to the LLM
timeout_secsintegernullOverride global timeout for this tool
max_output_charsintegernullOverride global max output for this tool

[search]

KeyTypeDefaultDescription
backendstring"duckduckgo"Search backend: duckduckgo (no key needed) or brave
api_keystring""API key for Brave search (supports "keychain")

[scheduler]

KeyTypeDefaultDescription
enabledbooltrueEnable the scheduled tasks system
tick_interval_secsinteger30How often the scheduler checks for due tasks

[[scheduler.tasks]]

Pre-defined scheduled tasks loaded from config on startup:

KeyTypeDefaultDescription
namestringโ€”Human-readable task label
schedulestringโ€”Natural language or cron expression (see Scheduler)
promptstringโ€”What the agent should do when the task fires
oneshotboolfalseFire once then auto-delete
trustedboolfalseRun with full autonomy (no terminal approval needed)

[files]

KeyTypeDefaultDescription
enabledbooltrueEnable file transfer tools (send/receive)
inbox_dirstring"~/.aidaemon/files/inbox"Directory for received files from Telegram
outbox_dirsarray["~"]Directories the agent is allowed to send files from
max_file_size_mbinteger10Maximum file size for transfers in MB
retention_hoursinteger24Hours to retain received files before cleanup

Secrets Management

Sensitive config values support two resolution methods beyond plain text, plus an optional env-only storage mode:

OS Keychain

Set any secret field to "keychain" to resolve it from the OS keychain (macOS Keychain, Linux secret-service):

toml
[provider]
api_key = "keychain"    # Resolved from keychain entry "api_key"

[telegram]
bot_token = "keychain"  # Resolved from keychain entry "bot_token"

Store values with the keychain CLI command before first run:

bash
# Store a secret (prompts interactively)
aidaemon keychain set api_key
aidaemon keychain set bot_token

# Verify a stored secret (shows masked value)
aidaemon keychain get api_key

# Remove a secret
aidaemon keychain delete api_key
Security
The set command prompts for the value interactively with confirmation, keeping secrets out of your shell history.

Environment Variables

Use ${VAR_NAME} syntax anywhere in config values:

toml
[provider]
api_key = "${GOOGLE_API_KEY}"

[telegram]
bot_token = "${TELEGRAM_BOT_TOKEN}"

Env-only Mode (No Keychain)

If you prefer not to use the OS keychain, set these runtime environment variables:

bash
# Disable OS keychain storage and use env file-backed secrets
export AIDAEMON_NO_KEYCHAIN=1

# Optional: choose a specific env file path (default: ./.env)
export AIDAEMON_ENV_FILE=/absolute/path/to/.env

In this mode, aidaemon reads secrets from the selected env file (or process environment when no env file exists) and persists secret updates back to that env file — including OAuth access/refresh token rotation.

Env-only Security
Keep the env file private (chmod 600) and out of version control.
Supported Keychain Fields
Fields supporting "keychain": provider.api_key, provider.gateway_token, telegram.bot_token, slack.app_token, slack.bot_token, discord.bot_token, triggers.email.password, state.encryption_key, search.api_key, and http_auth.* profile fields.

[health]

Health monitoring system. See Health Monitoring.

KeyTypeDefaultDescription
enabledbooltrueEnable the health monitoring system
tick_interval_secsinteger30How often to check for due probes
result_retention_daysinteger7Days to retain health check results

[[health.probes]]

KeyTypeDefaultDescription
namestringProbe name
probe_typestringType: http, command, file, or port
targetstringTarget URL, command, file path, or host:port
schedulestringCron expression or interval
consecutive_failures_alertinteger3Alert after N consecutive failures
alert_session_idsarray[]Session IDs to notify on alert

[updates]

Self-update system. See Self-Updater.

KeyTypeDefaultDescription
modestring"check_only"Update mode: enable, check_only, or disable
check_interval_hoursinteger24Hours between update checks
check_at_utc_hourintegernullSpecific UTC hour (0-23) for daily check
confirmation_timeout_minsinteger60Minutes to wait for user approval

[people]

People Intelligence โ€” a personal contact book managed by your assistant. See People Intelligence.

KeyTypeDefaultDescription
enabledboolfalseInitial state for people intelligence (can be toggled at runtime via chat)
auto_extractbooltrueAutomatically learn facts about people from conversations
auto_extract_categoriesstring[]["birthday", "preference", "interest", "work", "family", "important_date"]Fact categories that can be auto-extracted
restricted_categoriesstring[]["health", "finance", "political", "religious"]Categories that are never auto-extracted
fact_retention_daysinteger180Days before unconfirmed auto-extracted facts are pruned
reconnect_reminder_daysinteger30Days of inactivity before suggesting a reconnect

Example Config

config.toml
[provider]
kind = "google_genai"
api_key = "AIza..."

[provider.models]
primary = "gemini-3-flash-preview"
fast = "gemini-2.5-flash-lite"
smart = "gemini-3-pro-preview"

[telegram]
bot_token = "123456:ABC-DEF..."
allowed_user_ids = [123456789]

# Slack (requires --features slack)
# [slack]
# enabled = true
# app_token = "xapp-..."
# bot_token = "xoxb-..."
# allowed_user_ids = ["U123456789"]
# use_threads = true

[state]
db_path = "aidaemon.db"
working_memory_cap = 50
max_facts = 100

[terminal]
allowed_prefixes = ["ls", "cat", "head", "tail", "echo", "date", "whoami"]

[daemon]
health_port = 8080

[mcp.filesystem]
command = "npx"
args = ["-y", "@anthropic/mcp-filesystem"]

[browser]
enabled = true
headless = true

[skills]
dir = "skills"
enabled = true

[search]
backend = "duckduckgo"

[scheduler]
enabled = true

[[scheduler.tasks]]
name = "Morning check-in"
schedule = "weekdays at 9am"
prompt = "Check system health and summarize any overnight alerts"
trusted = true

[files]
enabled = true
inbox_dir = "~/.aidaemon/files/inbox"
outbox_dirs = ["~"]

# Discord (requires --features discord)
# [discord]
# bot_token = "MTIz..."
# allowed_user_ids = [123456789012345678]

# Health monitoring
[health]
enabled = true

[[health.probes]]
name = "API Server"
probe_type = "http"
target = "https://api.example.com/health"
schedule = "every 5m"

# People intelligence (opt-in, can also enable via chat)
# [people]
# enabled = true

# Self-updater
[updates]
mode = "check_only"