Configuration
Configuration File
Axiomatic is configured through axiomatic.yml at your project root. This file is created automatically when you run axm init.
# axiomatic.yml
# LLM provider: "anthropic" (default) or "openai"
provider: anthropic
# Model to use for analysis
model: claude-sonnet-4-6
# API key (supports environment variable interpolation)
api_key: ${ANTHROPIC_API_KEY}
# Optional: custom cache directory (default: .axiomatic)
cache_dir: .axiomatic
# Optional: base URL override (for proxies or custom endpoints)
# base_url: https://your-proxy.example.com
# Optional: max tokens per API call
# max_tokens: 4096
# Optional: agent budget settings
budget:
maxTokens: 100000 # Token budget per test
maxIterations: 20 # Maximum agent tool-use turns per testEnvironment Variables
Axiomatic reads the following environment variables:
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY | API key for Anthropic (Claude) models |
OPENAI_API_KEY | API key for OpenAI (GPT) models |
Environment variables can be referenced in axiomatic.yml using ${VAR_NAME} syntax. Set them in your shell or CI environment before running axm.
Provider Options
Anthropic (Default)
Anthropic is the default provider. Axiomatic works best with Claude models.
provider: anthropic
model: claude-sonnet-4-6
api_key: ${ANTHROPIC_API_KEY}Available models:
claude-sonnet-4-6(default) -- best balance of speed and accuracyclaude-opus-4-20250514-- highest accuracy, slower and more expensive
OpenAI
provider: openai
model: gpt-4o
api_key: ${OPENAI_API_KEY}Available models:
gpt-4o-- recommended for OpenAI usersgpt-4o-mini-- faster, lower cost, slightly less accurate
Per-Test Overrides
Individual tests can override the provider, model, timeout, and iteration limits:
# axiomatic/security-audit.yml
condition: >
All user inputs are sanitized before being used in SQL queries.
on:
- "src/db/**/*.ts"
severity: error
provider: anthropic
model: claude-opus-4-20250514 # Use the most capable model for security checks
timeout: 120
max_iterations: 50Use per-test overrides to balance cost and accuracy: fast models for code quality checks, the most capable model for security-critical tests.
Cache Settings
Axiomatic caches results to avoid re-running tests when code has not changed. The cache is stored in a local SQLite database at .axiomatic/cache.db.
You can customize the cache directory:
cache_dir: .axiomatic # Default: .axiomaticUse --no-cache with axm run to bypass the cache and re-run all tests.
For more details on caching behavior, see Caching.
Cost Management
Model Selection by Use Case
| Model | Cost per test | Best for |
|---|---|---|
| Claude Haiku | $0.01--0.05 | Most tests, fast iteration |
| Claude Sonnet | $0.05--0.20 | Standard accuracy tests |
| Claude Opus | $0.20+ | Critical security and architecture audits |
Scoping with on
Narrow the on glob to limit how many files the agent examines. src/api/**/*.ts is cheaper than scanning the entire src/ tree.
Dry Run
Preview what would run and estimate costs before making API calls:
axm run --dry-run