Skip to main content

Overview

ArgentOS is configured through ~/.argentos/argent.json. This file controls agent behavior, model routing, channel integrations, gateway settings, storage backends, and more. The configuration is validated against a Zod schema on load. Invalid fields produce clear error messages with paths to the problematic values.

Configuration File Location

Primary: ~/.argentos/argent.json
The state directory (~/.argentos/) can be overridden with the ARGENT_STATE_DIR environment variable. The config file is a symlink target — on systems migrating from OpenClaw, it may symlink to ~/.openclaw/openclaw.json.

Top-Level Sections

{
  "meta": {},
  "env": {},
  "wizard": {},
  "diagnostics": {},
  "logging": {},
  "update": {},
  "browser": {},
  "ui": {},
  "distribution": {},
  "auth": {},
  "models": {},
  "agents": {},
  "tools": {},
  "bindings": {},
  "broadcast": {},
  "audio": {},
  "media": {},
  "messages": {},
  "commands": {},
  "approvals": {},
  "session": {},
  "cron": {},
  "hooks": {},
  "intent": {},
  "web": {},
  "channels": {},
  "discovery": {},
  "canvasHost": {},
  "talk": {},
  "gateway": {},
  "memory": {},
  "nodeHost": {}
}

agents Section

The agents section contains agent-level defaults and per-agent overrides:
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "anthropic/claude-sonnet-4-20250514",
        "fallbacks": ["minimax/MiniMax-M2.5"]
      },
      "workspace": "~/argent",
      "thinkingDefault": "low",
      "timeoutSeconds": 300,
      "maxConcurrent": 1,
      "heartbeat": {
        "every": "30m",
        "model": "anthropic/claude-haiku-3-5",
        "activeHours": {
          "start": "07:00",
          "end": "22:00",
          "timezone": "user"
        }
      },
      "contemplation": {
        "enabled": true,
        "every": "30m",
        "maxCyclesPerHour": 12,
        "model": "ollama/qwen3:1.7b"
      },
      "executionWorker": {
        "enabled": true,
        "every": "20m",
        "maxRunMinutes": 12,
        "maxTasksPerCycle": 24,
        "requireEvidence": true,
        "maxNoProgressAttempts": 2
      },
      "modelRouter": {
        "enabled": true,
        "tiers": {
          "local": { "model": "ollama/qwen3:1.7b" },
          "fast": { "model": "anthropic/claude-haiku-3-5" },
          "balanced": { "model": "anthropic/claude-sonnet-4-20250514" },
          "powerful": { "model": "anthropic/claude-opus-4-20250514" }
        }
      },
      "kernel": {
        "enabled": false,
        "mode": "off",
        "localModel": "qwen3:1.7b",
        "tickMs": 30000
      }
    }
  }
}

Key Agent Fields

FieldTypeDefaultDescription
model.primarystringPrimary model (provider/model format)
model.fallbacksstring[][]Fallback models tried in order
workspacestring~/.argent/workspaceAgent working directory
thinkingDefaultstring"off"Default thinking level: off, minimal, low, medium, high, xhigh
timeoutSecondsnumber300Max seconds per agent turn
maxConcurrentnumber1Max concurrent agent runs
mediaMaxMbnumberMax inbound media size in MB
userTimezonestringhost TZIANA timezone for the user
timeFormatstring"auto"Time format: auto, 12, 24
skipBootstrapbooleanfalseSkip workspace bootstrap

Heartbeat Configuration

FieldTypeDefaultDescription
everystring"30m"Heartbeat interval (duration string)
modelstringModel override for heartbeat runs
activeHours.startstringStart time (HH:MM, 24h)
activeHours.endstringEnd time (HH:MM, 24h)
targetstringDelivery target: last, none, or channel ID
tostringDelivery address (phone, chat ID)

Contemplation Configuration

FieldTypeDefaultDescription
enabledbooleantrueEnable contemplation cycles
everystring"30m"Interval between cycles
familyEverystring"24h"Interval for family agents
maxCyclesPerHournumber12Rate limit
modelstringModel override (typically local)

Execution Worker Configuration

FieldTypeDefaultDescription
enabledbooleanfalseEnable task execution loop
everystring"20m"Cycle interval
maxRunMinutesnumber12Max minutes per cycle
maxTasksPerCyclenumber24Safety cap on tasks
requireEvidencebooleantrueRequire concrete evidence
maxNoProgressAttemptsnumber2Attempts before auto-blocking

Kernel Configuration

FieldTypeDefaultDescription
enabledbooleanfalseEnable consciousness kernel
modestring"off"Mode: off, shadow, soft, full
localModelstring"qwen3:1.7b"Local model for kernel reasoning
tickMsnumber30000Minimum tick interval

models Section

Provider and model configuration:
{
  "models": {
    "providers": {
      "anthropic": { "apiKey": "env:ANTHROPIC_API_KEY" },
      "openai": { "apiKey": "env:OPENAI_API_KEY" }
    }
  }
}

auth Section

Authentication profiles for multi-provider failover:
{
  "auth": {
    "profiles": {
      "anthropic:main": {
        "provider": "anthropic",
        "mode": "api_key",
        "email": "[email protected]"
      }
    },
    "order": {
      "anthropic": ["anthropic:main", "anthropic:backup"]
    },
    "cooldowns": {
      "billingBackoffHours": 1,
      "failureWindowHours": 0.5
    }
  }
}

channels Section

Channel integrations (Telegram, Discord, Slack, WhatsApp, etc.):
{
  "channels": {
    "telegram": {
      "botToken": "123456:ABC...",
      "enabled": true
    },
    "discord": {
      "botToken": "MTE...",
      "enabled": true
    },
    "slack": {
      "accounts": {
        "default": {
          "botToken": "xoxb-...",
          "appToken": "xapp-..."
        }
      }
    },
    "whatsapp": {
      "enabled": true
    }
  }
}
Each channel has its own configuration schema. See the channel-specific documentation for details.

gateway Section

Gateway server configuration:
{
  "gateway": {
    "port": 18789,
    "mode": "local",
    "bind": "127.0.0.1",
    "token": "auto-generated",
    "cors": {
      "origins": ["http://localhost:5173"]
    }
  }
}
FieldTypeDefaultDescription
portnumber18789WebSocket server port
modestring"local"local or remote
bindstring"127.0.0.1"Bind address
tokenstringautoAuthentication token

session Section

Session management configuration:
{
  "session": {
    "dmScope": "main",
    "store": "~/.argentos/sessions"
  }
}

cron Section

Cron service configuration:
{
  "cron": {
    "enabled": true,
    "store": "~/.argentos/cron-jobs.json",
    "maxConcurrentRuns": 2
  }
}

memory Section

Memory backend configuration:
{
  "memory": {
    "backend": "builtin",
    "citations": "auto",
    "memu": {
      "llm": {
        "provider": "ollama",
        "model": "qwen3:1.7b"
      }
    }
  }
}
FieldTypeDefaultDescription
backendstring"builtin"Memory backend: builtin or qmd
citationsstring"auto"Citation mode: auto, on, off

logging Section

{
  "logging": {
    "level": "info",
    "file": "~/.argentos/logs/argent.log",
    "consoleLevel": "warn",
    "consoleStyle": "pretty",
    "redactSensitive": "tools"
  }
}
FieldTypeDefaultDescription
levelstring"info"File log level
consoleLevelstringConsole log level
consoleStylestring"pretty"Console format: pretty, compact, json
redactSensitivestringRedaction mode: off, tools

approvals Section

Default exec approval settings:
{
  "approvals": {
    "security": "allowlist",
    "ask": "on-miss",
    "askFallback": "deny"
  }
}

intent Section

Intent governance hierarchy:
{
  "intent": {
    "validationMode": "enforce",
    "runtimeMode": "enforce",
    "global": {
      "objective": "Serve the operator's interests safely",
      "neverDo": ["Access unauthorized systems"],
      "requiresHumanApproval": ["financial_transactions"]
    }
  }
}

hooks Section

Webhook and event hook configuration:
{
  "hooks": {
    "enabled": true,
    "path": "/hooks",
    "token": "webhook-secret",
    "presets": ["gmail"]
  }
}

web Section

WebSocket client configuration (for dashboard connections):
{
  "web": {
    "enabled": true,
    "heartbeatSeconds": 30,
    "reconnect": {
      "initialMs": 1000,
      "maxMs": 30000,
      "factor": 2,
      "jitter": 0.1,
      "maxAttempts": 0
    }
  }
}

Environment Variable Overrides

Several settings can be overridden via environment variables:
VariableOverride
ARGENT_STATE_DIRState directory path
ARGENT_PROFILEActive profile name
ARGENT_GATEWAY_PORTGateway port
ARGENT_GATEWAY_TOKENGateway auth token
ARGENT_RUNTIMEEnable argent runtime (true/false)
ANTHROPIC_API_KEYAnthropic API key
OPENAI_API_KEYOpenAI API key
OLLAMA_API_KEYOllama API key (usually not needed)

Validation

The configuration is validated on load using Zod schemas. Invalid fields produce errors like:
Config validation error at agents.defaults.heartbeat.every:
  Expected string, received number
Use config.schema gateway method to retrieve the full schema for programmatic validation.

Key Files

FileDescription
src/config/zod-schema.tsMain Zod schema (ArgentSchema)
src/config/zod-schema.agents.tsAgent configuration schemas
src/config/zod-schema.agent-defaults.tsAgent defaults schema
src/config/types.agent-defaults.tsTypeScript types for agent config
src/config/types.argent.tsRoot config type definitions
src/config/config.tsConfig loading and validation