evals.py
OPENAI_API_KEY before running the suite:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Catch regressions in response quality, tool use, latency, and memory.
import sys
from agno.agent import Agent
from agno.eval import Case, cli
from agno.tools.calculator import CalculatorTools
calculator = Agent(
id="calculator",
model="openai:gpt-5.5",
tools=[CalculatorTools()],
instructions="Use the calculator tools for every calculation.",
)
CASES = (
Case(
name="factorial_uses_calculator",
agent=calculator,
input="What is 10 factorial?",
criteria="States that 10 factorial equals 3,628,800.",
expected_tool_calls=("factorial",),
),
)
if __name__ == "__main__":
sys.exit(cli(CASES))
OPENAI_API_KEY before running the suite:
uv venv --python 3.12
uv pip install -U "agno[openai]"
uv run python evals.py --json-output tmp/evals.json
| Type | Measures | Guide |
|---|---|---|
| Accuracy | Correctness against an expected answer | Accuracy evals |
| Agent as judge | Custom quality criteria scored by an evaluator model | Agent-as-judge evals |
| Reliability | Expected tool calls and arguments | Reliability evals |
| Performance | Runtime latency and memory use | Performance evals |
| Stage | Pattern |
|---|---|
| Local development | Run one case while changing an agent. |
| CI | Run tagged eval suites and keep the JSON report. |
| Production | Evaluate selected outputs with a synchronous or background post-hook. |
| AgentOS | Store eval results in a configured database and manage them through the AgentOS API. |
| Task | Guide |
|---|---|
| Build an eval suite | Eval suites |
| Add evals to an agent platform | Agent platform evals |
| Inspect the API surface | Agent API |
Was this page helpful?