comis init), it already created a working config. This guide explains what is
in that file and how to customize it.
You don’t need to understand the technical details to use this feature. The configuration examples below are copy-paste ready.
Where config lives
| Setting | Value |
|---|---|
| Default path | ~/.comis/config.yaml |
| Custom path | Set COMIS_CONFIG_PATHS=/path/to/config.yaml |
| Multiple files | Colon-separated paths — later files override earlier ones |
| Reload | Config is loaded once at startup. Restart the daemon to pick up changes. |
When you set Later files override values from earlier ones.
COMIS_CONFIG_PATHS, Comis reads config from that path instead of
the default. You can point to multiple files using colon-separated paths
(same convention as PATH):Minimal working config
This is the absolute minimum YAML that produces a working agent:Everything else has sensible defaults. The gateway starts automatically on port
4766, logging is set to
info level, and memory uses a local SQLite database.
The API key is read from the .env file in your data directory — see
Secrets and API Keys below.Required: Agent configuration
Every agent needs three fields:| Field | Description | Example |
|---|---|---|
name | Display name for the agent | "Atlas" |
provider | AI provider identifier | "anthropic" |
model | Model to use (provider-specific) | "claude-sonnet-4-5-20250929" |
- Anthropic
- OpenAI
- Google
- Ollama (local)
ANTHROPIC_API_KEY in your .env file.Recommended: Gateway
| Field | Default | Description |
|---|---|---|
enabled | true | Enable or disable the gateway server |
host | "127.0.0.1" | Bind address. Use "0.0.0.0" for external access or Docker. |
port | 4766 | Port for the web dashboard and API |
tokens | [] | Bearer tokens for API authentication (optional but recommended) |
The
tokens section is optional. Without it, the gateway accepts unauthenticated
requests on localhost. Add a token when you expose the gateway to a network.Recommended: Channels
Here is an example with Telegram — the simplest channel to configure:TELEGRAM_BOT_TOKEN in your .env file with the token from
@BotFather.
Each platform has different settings. See the Channels section
for step-by-step setup guides for all supported platforms.
Optional: Common settings
These settings have sensible defaults. Change them only when you need to.
| Setting | Default | Description |
|---|---|---|
logLevel | "debug" | Log verbosity. Options: "trace", "debug", "info", "warn", "error", "fatal" |
dataDir | "~/.comis" | Base directory for databases, logs, and models |
tenantId | "default" | Isolates data between environments. Change when running multiple instances. |
Secrets and API keys
Comis resolves${VAR_NAME} references in config values from environment
variables or from the .env file in your data directory (~/.comis/.env by
default).
The setup wizard generates config with ${VAR} references and puts the actual
values in .env. Here is a typical .env file:
| Provider | Environment Variable |
|---|---|
| Anthropic | ANTHROPIC_API_KEY |
| OpenAI | OPENAI_API_KEY |
GOOGLE_API_KEY | |
| Groq | GROQ_API_KEY |
| Mistral | MISTRAL_API_KEY |
| DeepSeek | DEEPSEEK_API_KEY |
| xAI | XAI_API_KEY |
| Together AI | TOGETHER_API_KEY |
| Cerebras | CEREBRAS_API_KEY |
| OpenRouter | OPENROUTER_API_KEY |
| Ollama | Not needed |
comis secrets init to set up the secrets
vault. See Secrets Management for details.
$include directive
Split your config into multiple files for organization:$include
directive. This is useful for separating channel credentials from the main
config or sharing a base config across environments.
Validate your config
Check your config file for syntax errors and missing fields:Context engine
The context engine manages what your agent sees each turn. The default mode is pipeline. Most users do not need to change any context engine settings — the defaults work well.~/.comis/config.yaml
The DAG mode (the
dag engine version) — the v2.12 “Lossless Context DAG”
lossless engine — is the default: version defaults to "dag" (set
"pipeline" to opt into the simpler engine). DAG keeps the full faithful
history losslessly (a verbatim fresh tail + transcript repair), zoomably
compresses the oldest history under a token budget, and exposes the in-session
ctx_* expansion tools. See Compaction for details.Advanced configuration
The config schema supports 41 top-level sections. This guide covered the essential ones. The remaining sections control memory, security, routing, scheduling, monitoring, plugins, and more.For the complete reference of all configuration sections, see
Config YAML Reference.
Next steps
Verify Installation
Run diagnostic commands to confirm everything is working.
Connect a Channel
Step-by-step guides for Telegram, Discord, Slack, and more.
Security
Understand the security protections built into Comis.
Config Reference
Complete reference for all 41 configuration sections.
