Configuration¶
All settings are read from the environment (see .env.example). Agent-specific
variables carry an AGENT_ prefix so a generic name like MODEL in your shell
can't silently change the provider; API keys and LOGFIRE_TOKEN keep their
standard names because the provider SDKs read those exact variables directly.
| Variable | Default | Notes |
|---|---|---|
Provider key (e.g. ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_API_KEY, OLLAMA_BASE_URL, …) |
— | Whichever variable the provider behind AGENT_MODEL reads. Not declared on Settings — Settings validates it by asking pydantic-ai to build that provider at import time, so any provider pydantic-ai supports (including ones added in later pydantic-ai releases) is checked automatically, and it raises immediately if misconfigured — not a lazy/runtime check. |
AGENT_MODEL |
anthropic:claude-sonnet-5-5 |
The agent under test. Any pydantic-ai model string works, e.g. google:gemini-2.0-flash or ollama:* for local models (no API key needed, but OLLAMA_BASE_URL must be set). |
AGENT_JUDGE_MODEL |
anthropic:claude-opus-5-5 |
Used only by the LLM-as-judge evals. Kept separate from AGENT_MODEL to avoid self-assessment bias — keep it at least as capable as the agent model, not cheaper. |
LOGFIRE_TOKEN |
unset | If set, traces go to Logfire cloud. If unset, traces print to the console — no separate dev-mode flag needed. |
AGENT_COST_LIMIT |
unset | Optional per-run spend cap in USD (e.g. 0.50). Off by default. Only set it for models with known pricing — for others (e.g. ollama:) the cost is unknown, so the cap can't be enforced and Pydantic AI warns. |
AGENT_SERVICE_NAME |
agent |
Service name on Logfire traces. Rename it for your project. |
AGENT_ENVIRONMENT |
unset | Environment tag (development, production, …) on traces. Unset falls back to LOGFIRE_ENVIRONMENT. |
AGENT_LOG_CONTENT |
true |
Whether traces include prompts, model outputs and tool arguments. Set false in production if they may be sensitive. Evals force it on, since ArgumentCorrectness reads tool arguments from spans. |
AGENT_LOG_LEVEL |
INFO |
Standard Python logging level. |
Variables only some examples read¶
An example reads these only if you add it; add_agent.py names the ones to set, and the release check sets the service addresses itself.
| Variable | Example | Default | Notes |
|---|---|---|---|
AGENT_EMBEDDING_MODEL |
rag |
follows the provider of AGENT_MODEL (Google or OpenAI) |
The embedding model for retrieval. Anthropic has no embedding model, so with an Anthropic AGENT_MODEL set this, for example to google:gemini-embedding-001; the key for that provider must be set too. |
CHROMA_URL |
rag |
http://127.0.0.1:8000 |
Where the Chroma server is. The Docker service publishes on a random free port, so set this to the address add_agent.py shows how to find. |
MCP_SERVER_URL |
mcp_tools |
http://127.0.0.1:8000/mcp |
The MCP server's URL. Set it to the published port, as for CHROMA_URL. |
TEMPORAL_ADDRESS |
temporal |
127.0.0.1:7233 |
The host:port of the Temporal server. Set it to the published port, as for CHROMA_URL. |