Configuration Reference

Complete documentation for every config.yaml field

This document describes every configuration field in config.yaml. All settings have sensible defaults — you only need to override what you want to change.

Configuration loading order (each overrides the previous):

  1. /etc/dolphin/config.yaml — system-wide
  2. ~/.dolphin/config.yaml — per-user
  3. .dolphin/config.yaml — per-project
  4. -c <file> flag — explicit override
  5. DZ_* environment variables

Tip: Use dolphin init to generate a commented default config file, or copy docs/en/config.example.yaml to .dolphin/config.yaml and edit.


LLM (llm)

Controls the LLM provider, model selection, and generation parameters.

Single-Provider Fields (Legacy)

These fields are used when providers is empty. They can also be set via DZ_LLM_* environment variables.

FieldTypeDefaultDescription
llm.typestring"openai"Provider API type. "openai" for OpenAI-compatible APIs, "anthropic" for Anthropic API.
llm.base_urlstring"https://api.openai.com/v1"API base URL. Override for proxy or compatible services. Env: DZ_LLM_BASE_URL.
llm.api_keystring""API key. Recommended: set via DZ_LLM_API_KEY env var instead of in the file.
llm.modelstring"gpt-4o"Model identifier (e.g. claude-sonnet-4-6, gpt-4o, deepseek-v4-flash). Env: DZ_LLM_MODEL.
llm.max_tokensint4096Maximum tokens per response. Env: DZ_LLM_MAX_TOKENS.
llm.max_context_tokensint1048576Context window limit. When usage exceeds 70% of this, context compression triggers.
llm.temperaturefloat0.7Generation randomness. Range: 0.0 (deterministic) to 2.0 (creative).
llm.max_sub_turnsint10Max consecutive tool-call rounds per user turn (prevents runaway loops).
llm.compress_modestring"drop"Context compression strategy. One of: drop (discard oldest), segment (merge segments), tiered, incremental, topic.
llm.segment_merge_limitint100Segment count threshold before recursive merging (only used in segment mode).

Multi-Provider (llm.providers)

When providers is configured, startup tries each entry in order with a health check and uses the first that responds. If a provider has an empty api_key, it inherits from llm.api_key (or DZ_LLM_API_KEY). Similarly, empty max_tokens inherits from llm.max_tokens.

FieldTypeDescription
namestringProvider label (informational, e.g. "deepseek", "claude").
typestringAPI type. "openai" or "anthropic".
base_urlstringAPI endpoint URL.
api_keystringAPI key for this provider. Falls back to llm.api_key if empty.
modelstringModel name.
max_tokensintMax tokens for this provider. Falls back to llm.max_tokens if zero.
llm:
  providers:
    - name: claude
      type: anthropic
      api_key: ""
      base_url: https://api.anthropic.com/v1
      model: claude-sonnet-4-6
    - name: deepseek
      type: openai
      api_key: ""
      base_url: https://api.deepseek.com/v1
      model: deepseek-v4-flash

Sessions (session)

Controls session persistence, auto-checkpoint, and cleanup.

FieldTypeDefaultDescription
session.dirstring"/tmp/dolphin"Directory for session files.
session.max_loopint50Max turns per session before a checkpoint summary is saved.
session.summarybooltrueAuto-generate a session summary on checkpoint.
session.max_agestring"24h"Auto-delete sessions older than this duration (e.g. "72h", "7d"). Env: DZ_SESSION_MAX_AGE.
session.resumeboolfalseIf true, prompt to resume the last session on startup.

MCP Tools (mcp)

Configures the Model Context Protocol tools available to the agent.

Shell (mcp.shell)

Executes shell commands.

FieldTypeDefaultDescription
mcp.shell.enabledbooltrueEnable the shell tool.
mcp.shell.timeout_secondsint30Per-command timeout.
mcp.shell.priorityint10Tool listing priority (lower = listed first).
mcp.shell.max_command_lengthint4096Max characters per command.
mcp.shell.allowed_commands[]string[]Allowlist of command names (empty = allow all). Populated automatically in restrictive mode.

CDP Browser (mcp.cdp)

Chrome DevTools Protocol — browser automation.

FieldTypeDefaultDescription
mcp.cdp.enabledbooltrueEnable browser automation.
mcp.cdp.headlessbooltrueRun browser in headless mode (no GUI).
mcp.cdp.priorityint1000Tool listing priority.
mcp.cdp.ws_urlstring""Connect to an existing CDP endpoint instead of launching a new browser.
mcp.cdp.idle_timeoutint300Seconds of inactivity before auto-closing the browser. Set to 0 to disable.

Email MCP (mcp.email)

Email send/search/fetch tool (requires transport.email to be configured separately).

FieldTypeDefaultDescription
mcp.email.enabledbooltrueEnable the email MCP tool.
mcp.email.priorityint500Tool listing priority.

Webhook MCP (mcp.webhook)

HTTP webhook tool for sending requests to external services.

FieldTypeDefaultDescription
mcp.webhook.enabledbooltrueEnable the webhook tool.
mcp.webhook.priorityint100Tool listing priority.
mcp.webhook.targetsmap[string]object{}Named pre-configured webhook targets. Each target has: url (string, required), method (string, default "POST"), headers (map[string]string).
mcp:
  webhook:
    targets:
      my_bot:
        url: "https://hooks.example.com/webhook"
        method: POST
        headers: {Authorization: "Bearer my-token"}

External MCP Servers (mcp.servers)

Connect to external MCP servers. Each key is a server name.

FieldTypeDescription
typestringTransport type. One of: "stdio" (subprocess), "sse" (Server-Sent Events), "http-stream".
commandstringExecutable path (for stdio type).
args[]stringCommand arguments (for stdio type).
urlstringServer URL (for sse / http-stream types).
headersmap[string]stringCustom HTTP headers (e.g. Authorization).
timeoutintRequest timeout in seconds (0 = default 30).
mcp:
  servers:
    my-server:
      type: stdio
      command: npx
      args: ["-y", "@modelcontextprotocol/server-filesystem"]
    remote-server:
      type: sse
      url: "https://mcp.example.com/sse"
      headers: {Authorization: "Bearer token"}

MCP Repos (mcp.repos)

FieldTypeDefaultDescription
mcp.repos[]string[]Manifest repository URLs for discovering community MCP tools, e.g. ["dolphinv/mcp"].

Agent Pool (agent_pool)

Controls concurrent sub-agent execution.

FieldTypeDefaultDescription
agent_pool.max_concurrencyint5Maximum simultaneous sub-agent tasks.
agent_pool.default_timeoutint300Default timeout per task in seconds.
agent_pool.workspace_dirstring".dolphin/workspaces"Directory for sub-agent workspaces.
agent_pool.idle_timeoutint600Seconds before reaping idle temporary agents.
agent_pool.max_pending_resultsint10Max pending results preserved per agent.
agent_pool.max_pending_result_lenint500Max characters per result in the prompt. 0 = no truncation.

Skills (skills)

Manages skill files that teach the agent new capabilities.

FieldTypeDefaultDescription
skills.dirstring".dolphin/skills"Directory containing skill .md files.
skills.max_topint10Number of top-ranked skills injected into the LLM context.
skills.repos[]string[]Skill manifest repository URLs, e.g. ["dolphinv/skills"].

Transports (transport)

Controls how the agent communicates: local terminal, SSH, MQTT, or email.

Stdio (transport.stdio)

Local terminal I/O.

FieldTypeDefaultDescription
transport.stdio.enabledbooltrueEnable local terminal interaction. Env: DZ_TRANSPORT_STDIO_ENABLED.

SSH (transport.ssh)

Remote shell access.

FieldTypeDefaultDescription
transport.ssh.enabledboolfalseEnable SSH transport.
transport.ssh.addrstring":2222"Listen address (e.g. "0.0.0.0:2222", "localhost:2222").
transport.ssh.host_keystring"~/.ssh/id_ed25519"Path to the SSH host private key.
transport.ssh.usernamestring"dolphin"SSH login username.
transport.ssh.passwordstring""SSH password. Auto-generated on first start if empty and SSH is enabled.

MQTT (transport.mqtt)

MQTT messaging transport.

FieldTypeDefaultDescription
transport.mqtt.enabledboolfalseEnable MQTT transport. Env: DZ_TRANSPORT_MQTT_ENABLED.
transport.mqtt.brokerstring"tcp://localhost:1883"MQTT broker URL. Env: DZ_MQTT_BROKER.
transport.mqtt.topicstring"dolphin/agent/command"Command subscription topic. Env: DZ_MQTT_TOPIC.
transport.mqtt.response_topicstring"dolphin/agent/response"Response publication topic. Env: DZ_MQTT_RESPONSE_TOPIC.
transport.mqtt.client_idstring"dolphin-agent"MQTT client ID.
transport.mqtt.embeddedbooltrueRun an embedded MQTT broker. Env: DZ_MQTT_EMBEDDED.
transport.mqtt.embedded_addrstring":1883"Listen address for the embedded broker. Env: DZ_MQTT_EMBEDDED_ADDR.
transport.mqtt.embedded_accounts[]object[]Credentials for the embedded broker. If empty and embedded is enabled, one account is auto-generated. Each entry has: username (string), password (string). Env: DZ_MQTT_USER / DZ_MQTT_PASSWORD set the first account.
transport.mqtt.usernamestring""Client username for broker connection (not the embedded broker).
transport.mqtt.passwordstring""Client password for broker connection. Auto-populated from the first embedded account if empty.

Email (transport.email)

Email transport — receives instructions and sends responses via SMTP/IMAP.

FieldTypeDefaultDescription
transport.email.enabledboolfalseEnable email transport.
transport.email.protocolstring"imap"Incoming mail protocol. "imap" or "pop3".
transport.email.smtp_hoststring""SMTP server hostname for outgoing mail.
transport.email.smtp_portint587SMTP port (typically 587 for STARTTLS, 465 for SSL/TLS).
transport.email.imap_hoststring""IMAP server hostname.
transport.email.imap_portint993IMAP port (typically 993 for SSL/TLS).
transport.email.pop3_hoststring""POP3 server hostname. Defaults to imap_host / smtp_host if empty.
transport.email.pop3_portint995POP3 port (typically 995 for SSL/TLS).
transport.email.usernamestring""Email account username. Env: DZ_EMAIL_USERNAME.
transport.email.passwordstring""Email account password. Recommended: set via DZ_EMAIL_PASSWORD env var.
transport.email.fromstring""“From” address for outgoing mail.
transport.email.use_tlsbooltrueEnable TLS for SMTP and IMAP.
transport.email.skip_tls_verifyboolfalseSkip TLS certificate verification (for self-signed certificates).
transport.email.poll_intervalstring"10s"IMAP inbox poll interval (e.g. "30s", "5m").

Crontab (crontab)

Scheduled task management.

FieldTypeDefaultDescription
crontab.filestring".dolphin/CRONTAB.md"Path to the crontab file (Markdown format with cron expressions).
crontab.check_intervalstring"30s"How often to check for pending tasks (e.g. "10s", "1m").

Diary (diary)

Aggregates session summaries into a hierarchical diary (day → week → month → year).

FieldTypeDefaultDescription
diary.dirstring".dolphin/diary"Diary storage directory.
diary.max_day_sessionsint200Max sessions per day before pruning the oldest.
diary.max_week_daysint7Max days per week before pruning the oldest.
diary.max_month_weeksint5Max weeks per month before pruning the oldest.
diary.max_year_monthsint12Max months per year before pruning the oldest.
diary.max_total_mbint500Total diary size limit in MB. Exceeding this deletes the oldest year.

Plugins (plugins)

Dolphin has two extension systems:

  • Hook (sync) — intercepts the agent loop at specific points. At abortable points, returning an error aborts the flow.
  • Event (async) — subscribes to notifications dispatched in the background. Delivered via webhook (HTTP POST) or JSONL log.

Both can be driven by script plugins in the plugins directory.

FieldTypeDefaultDescription
plugins.enabledbooltrueEnable the plugin system.
plugins.dirstring"~/.dolphin/plugins/"Directory for plugin scripts (executable scripts or .md files).
plugins.webhook_urlstring""HTTP endpoint for event delivery. Events are POSTed as JSON.
plugins.webhook_events[]string["*"]Event types to deliver. ["*"] delivers all. Filter with a list like ["tool:called", "tool:completed"].

Available event types: session:created, session:ended, user:message, llm:response, tool:called, tool:completed, compression, error, heartbeat, agent:dispatched, agent:completed, skill:loaded.

FieldTypeDefaultDescription
plugins.heartbeat_turnsint0Emit a heartbeat event every N turns. 0 = off.

Available hook points († = abortable): session:start, session:end, user:input†, llm:before†, llm:after, tool:before†, tool:after, response:before, error.

Each hook script receives the context as JSON on stdin and may return a modified JSON object on stdout.

# Example: audit all user input
plugins:
  dir: ~/.dolphin/plugins/
  webhook_url: "https://hooks.example.com/dolphin"
  webhook_events: ["tool:called", "tool:completed"]
  heartbeat_turns: 5

Observability

FieldTypeDefaultDescription
log_levelstring"info"Log level. One of: "debug", "info", "warn", "error", "dpanic", "panic", "fatal". Env: DZ_LOG_LEVEL.
log_filestring".dolphin/logs/agent.log"Log file path. Env: DZ_LOG_FILE.

Pprof (pprof)

Go pprof profiling endpoints. For debugging performance issues.

FieldTypeDefaultDescription
pprof.enabledboolfalseEnable pprof HTTP server.
pprof.addrstring"127.0.0.1:6060"Listen address (e.g. ":6060" for all interfaces).

Metrics (metrics)

Prometheus-style metrics endpoint.

FieldTypeDefaultDescription
metrics.enabledboolfalseEnable metrics HTTP server.
metrics.addrstring"127.0.0.1:9090"Listen address (e.g. ":9090" for all interfaces).

Environment Variables

All settings can be overridden via DZ_-prefixed environment variables at runtime.

VariableOverridesDescription
DZ_LLM_API_KEYllm.api_keyAPI key (propagated to all providers with empty keys)
DZ_LLM_BASE_URLllm.base_urlAPI base URL
DZ_LLM_MODELllm.modelModel name
DZ_LLM_TYPEllm.typeProvider type ("openai" / "anthropic")
DZ_LLM_MAX_TOKENSllm.max_tokensMax tokens per response
DZ_LOG_LEVELlog_levelLog level
DZ_LOG_FILElog_fileLog file path
DZ_SESSION_MAX_AGEsession.max_ageSession retention duration
DZ_TRANSPORT_STDIO_ENABLEDtransport.stdio.enabledEnable stdio transport
DZ_TRANSPORT_MQTT_ENABLEDtransport.mqtt.enabledEnable MQTT transport
DZ_MQTT_BROKERtransport.mqtt.brokerMQTT broker URL
DZ_MQTT_TOPICtransport.mqtt.topicMQTT command topic
DZ_MQTT_RESPONSE_TOPICtransport.mqtt.response_topicMQTT response topic
DZ_MQTT_EMBEDDEDtransport.mqtt.embeddedEnable embedded broker
DZ_MQTT_EMBEDDED_ADDRtransport.mqtt.embedded_addrEmbedded broker address
DZ_MQTT_USERtransport.mqtt.embedded_accounts[0].usernameFirst embedded account username
DZ_MQTT_PASSWORDtransport.mqtt.embedded_accounts[0].passwordFirst embedded account password
DZ_EMAIL_USERNAMEtransport.email.usernameEmail username
DZ_EMAIL_PASSWORDtransport.email.passwordEmail password

Restrictive Mode

Run dolphin init --restrictive to generate a security-hardened config:

  • Shell: only allowlisted commands (ls, cat, grep, find, pwd, date, echo, head, tail, wc, sort, whoami, uname)
  • CDP browser automation: disabled
  • Webhook tool: disabled
  • Log level: warn (reduces secret leakage in logs)
  • Plugins: disabled