Configuration

Config File

Armament uses ~/.armament/config.json (JSON format). Here’s a complete reference of all supported settings:

{
  "providers": [
    {
      "type": "anthropic",
      "apiKey": "${ANTHROPIC_API_KEY}",
      "models": [
        { "name": "claude-sonnet-4-20250514", "inputPrice": 3, "outputPrice": 15 },
        { "name": "claude-opus-4-20250514", "inputPrice": 15, "outputPrice": 75 }
      ]
    },
    {
      "type": "openai",
      "apiKey": "${OPENAI_API_KEY}",
      "models": [
        { "name": "gpt-4o", "inputPrice": 2.5, "outputPrice": 10, "cacheReadMultiplier": 0.5, "cacheWriteMultiplier": 0 }
      ]
    },
    {
      "type": "openai",
      "name": "deepseek",
      "baseUrl": "https://api.deepseek.com/v1",
      "apiKey": "${DEEPSEEK_API_KEY}",
      "models": [
        { "name": "deepseek-chat", "inputPrice": 0.5, "outputPrice": 2.19, "cacheReadMultiplier": 0.1, "cacheWriteMultiplier": 1.25 }
      ]
    }
  ],
  "defaultModel": "claude-sonnet-4-20250514",
  "defaultProvider": "anthropic",
  "session": {
    "streaming": true,
    "autoSave": true,
    "promptCaching": true,
    "useThreads": true,
    "maxTurns": 100,
    "conversationTimeout": 30,
    "budget": 5.00
  },
  "context": {
    "maxTokens": 200000,
    "compactThreshold": 0.75,
    "recentMessages": 20,
    "maxSnapshots": 50,
    "autoCompact": true,
    "strategy": "llm"
  },
  "workspace": {
    "mode": "sandbox",
    "allowedPaths": [],
    "denyPaths": [],
    "gitAutoCommit": true,
    "fileWatcher": true,
    "maxFileSize": 10485760,
    "encoding": "utf-8"
  },
  "display": {
    "theme": "dark",
    "showThinking": true,
    "showToolCalls": true,
    "compact": false,
    "verbose": false,
    "timestamps": true,
    "syntaxHighlighting": true,
    "maxOutputLines": 500,
    "fontSize": 13,
    "fontFamily": "monospace",
    "fontWeight": "normal",
    "renderInterval": 50
  }
}

Configuration Sections

Session

Controls agent behavior and costs:

FieldTypeDefaultDescription
streamingbooleantrueStream responses token-by-token
autoSavebooleantrueAuto-save session state
promptCachingbooleantrueEnable prompt caching
useThreadsbooleantrueEnable thread-based execution
maxTurnsnumber100Max turns per agent before forced summary
conversationTimeoutnumber30Minutes of inactivity before timeout
budgetnumber5.00Session cost limit (USD). When exceeded, a warning fires in the active channel once per session.

Context

Controls how the agent manages its conversation history:

FieldTypeDefaultDescription
maxTokensnumber200000Maximum context window size
compactThresholdnumber0.75Fraction of maxTokens that triggers compaction (0-1)
recentMessagesnumber20Messages preserved verbatim after compaction
maxSnapshotsnumber50Max rewind snapshots stored
autoCompactbooleantrueAuto-compact when threshold exceeded
strategystring”llm”Compaction strategy: llm (summarize) or truncate

Workspace

Controls file system access for agents:

FieldTypeDefaultDescription
modestring”sandbox”Access mode: sandbox, restricted, or unrestricted
allowedPathsstring[][]Extra paths the agent can access (expands sandbox)
denyPathsstring[][]Paths the agent cannot access
gitAutoCommitbooleantrueAuto-commit agent file changes
fileWatcherbooleantrueWatch workspace files for changes
maxFileSizenumber10485760Max file size in bytes for agent read/write
encodingstring”utf-8”Default encoding for file operations

Display

Controls TUI appearance:

FieldTypeDefaultDescription
themestring”dark”Color theme (dark, light, or custom theme name)
showThinkingbooleantrueShow reasoning/thinking chunks
showToolCallsbooleantrueShow tool call details
compactbooleanfalseCompact mode (less padding, denser layout)
verbosebooleanfalseVerbose mode (show additional metadata)
timestampsbooleantrueShow message timestamps
syntaxHighlightingbooleantrueEnable syntax highlighting in output
maxOutputLinesnumber500Max lines per tool output before truncation
fontSizenumber13Terminal font size
fontFamilystring”monospace”Font family
fontWeightstring”normal”Font weight (normal, bold, light)
renderIntervalnumber50UI render interval in ms

Provider Configuration

Each provider entry supports:

FieldTypeDescription
typestringProvider type: anthropic, openai, bedrock, gemini, ollama
namestring?Optional display name (e.g., “deepseek” for an OpenAI-compatible endpoint)
apiKeystringAPI key (supports ${ENV_VAR} interpolation)
baseUrlstring?Custom API endpoint (for proxies or self-hosted models)
regionstring?AWS region (bedrock only)
streamingboolean?Enable streaming (defaults to true)
modelsobject[]Per-model pricing and configuration

Per-Model Pricing

Each model entry:

FieldTypeDefaultDescription
namestringModel identifier (e.g., claude-sonnet-4-20250514)
inputPricenumber3Cost per million input tokens (USD)
outputPricenumber15Cost per million output tokens (USD)
cacheReadMultipliernumber0.1Cache read cost multiplier (Claude: 0.1, OpenAI: 0.5)
cacheWriteMultipliernumber1.25Cache write cost multiplier (Claude: 1.25, OpenAI: 0)

Default pricing is provided for Claude, GPT, and DeepSeek models, but custom entries override them.

Environment Variables

API keys support environment variable interpolation with ${VAR_NAME} syntax. Never hardcode secrets in config files.

Hot Reconfiguration

Most display and session settings can be changed live without restarting:

/config set display.theme ice
/config set session.budget 10

The session performs atomic reconfiguration — if the new config is invalid, it rolls back to the previous state.

MCP Server Configuration

Configure MCP servers to extend agent capabilities with external tools:

{
  "mcp": {
    "github": {
      "transport": "stdio",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  }
}

See MCP Servers for transport options, auth types, and full configuration reference.