Skip to content

Configuration

A mono-agent is declared by mono-agent.config.json in its agent folder. Start here for the loading rules and top-level structure. Use the annotated blueprint for a broad example and the generated config reference for the complete field list.

The file brings the agent’s model routes, context, channels, memory, tools, sandbox, and observability together. In normal CLI use, relative paths resolve from the agent folder. Programmatic callers choose that base with cwd.

Scaffold a new agent with the CLI:

Terminal window
mono-agent init --model openai-codex:gpt-5.6-terra

A minimal valid config has exactly two fields:

{
"runtime": { "model": "openai-codex:gpt-5.6-terra" },
"context": { "identityPath": "./IDENTITY.md" }
}

runtime.model is a <provider>:<model> reference served by the Pi runtime (openai-codex:*, anthropic:*, opencode-go:*, local providers, and more; a legacy pi: prefix is canonicalized away). context.identityPath points at the identity markdown. All other fields are optional, but omission does not always mean disabled: the loopback tui operator endpoint defaults on, and the interaction bridge can auto-start when its tools are available.

For a field that has an environment mapping, precedence is:

  1. Passed process environment — the documented MONO_AGENT_* variable wins.
  2. mono-agent.config.json — the declared value.
  3. Built-in default — used when neither of the above is set.

Config fields may be JSON-only. Only fields with a documented MONO_AGENT_* mapping accept an environment override; the generated reference shows -- when no mapping exists. For example, runtime.model maps to MONO_AGENT_MODEL, while slack.shortcuts is JSON-only.

The CLI prepares the environment before it invokes the config loader. It loads ./.env without replacing variables already exported by the shell, then applies the precedence above. Use --env-file <path> to choose another dotenv file. The programmatic loadMonoAgentConfigWithSources function does not read dotenv files; callers must prepare and pass env themselves.

For example, these variables override both JSON values:

{ "runtime": { "model": "openai-codex:gpt-5.6-terra", "effort": "medium" } }
Terminal window
# Overrides both fields above without editing the file
export MONO_AGENT_MODEL="opencode-go:kimi-k2.6"
export MONO_AGENT_EFFORT="high"

See Environment variables for the full mapping and CLI loading details.

Each top-level key maps to one capability area. All are optional except the two required fields noted above.

SectionPurposePage
agentPublic display name; never used for paths, service ids, sessions, or provider identityIdentity & Soul
runtimeModel, effort, sessions, fallbacksRuntime
concurrencyPer-channel admission and provider-execution boundsSessions and concurrency
providersProvider map: local/self-hosted providers, Pi credentials, pi-native tuningProviders, Local Providers
contextIdentity, soul, selected skillsContext Assembly
memoryTiered memory (lite/journal/bujo), embeddings, consolidationCapture & Recall
toolsAllow-all-by-default, runtime-enforced allow/deny policy; MCP serversTool Policy, MCP
continuations, interactionDurable asynchronous results, ask-the-user, and progress bridgesDurable continuations, Delivery and send tools
sandboxFilesystem/network sandboxing for runtime commandsSandbox
artifacts, traceability, observabilityJSONL run artifacts, trace registry, Phoenix exporterObservability
telegram, slackBuilt-in chat channels (opt-in via enabled)Channels
webhook, openaiApi, cronBuilt-in HTTP, OpenAI-compatible, and scheduled channelsChannels
tuiDefault-on loopback operator endpointOperator stream endpoint
channels.plugins[]External channel packages such as WhatsApp and A2AWrite your own channel adapter

Channels start independently. For most channels, omission or enabled: false reports disabled; the default-on tui endpoint reports disabled only when explicitly opted out. An enabled channel that lacks required settings reports waiting_for_config. A self-recovering transport can temporarily report degraded without stopping healthy channels.

Activation depends on the surface:

  • Core behavior is configured by its block. memory, sandbox, concurrency, and observability take effect when configured. Some supporting blocks, such as providers, only matter when another selection uses them.
  • Most external channels are opt-in. telegram, slack, webhook, and openaiApi require enabled: true. Cron runs only enabled jobs. Plugin channels require a channels.plugins[] entry and follow the plugin’s own config contract.
  • The operator endpoint is opt-out. tui defaults to enabled on loopback; set its enabled field to false to remove it.
  • Host bridges have their own gates. continuations uses its enabled flag. Interaction may auto-start from allowed ask tools, explicit interaction settings, or configured progress delivery.

If a channel section seems ignored, check enabled first — mono-agent validate reports it as disabled rather than waiting.

The Feature Registry tags each capability so you know how to reach it:

TypeMeaning
configDeclarable in mono-agent.config.json; an env override exists only when documented
cliReached through a mono-agent CLI flag/command
autoAlways active when the app runs; needs no declaration
codeProgrammatic escape hatch only — intentional
devDevelopment/test tooling, not part of a running agent

mono-agent validate reports the resolved runtime, provider credentials, context, memory, tools, sandbox, observability, secret placement, and channel state. Exit code 0 means the config is structurally valid; a waiting section still needs attention and is not an Agent ready result. Static validation does not make a model request. See CLI reference → validate for the liveness and guided-init distinctions.

Terminal window
mono-agent validate
mono-agent start # traceability + every configured channel

On start, each channel prints its initial state: running, waiting_for_config, disabled, or failed. A running transport that later enters self-recovery can report degraded until it recovers.