Skip to main content
AFK evals run agents against named inputs and check the resulting state, text, tool usage, budgets, and telemetry. Use them for prompt changes, tool changes, routing changes, and regression tests. They can run against real providers, test adapters, or agents configured with deterministic tools.

Your first eval

Eval lifecycle

1

Define cases

Each case specifies an agent and input message. Suite-level assertions and budgets verify the result.
2

Schedule execution

The scheduler runs cases sequentially or in parallel, respecting concurrency limits.
3

Run agents

Each case runs through the same runner path your application uses.
4

Assert results

Assertions verify the result — text content, state, tool usage, cost, latency, etc.
5

Check budgets

Budget limits gate individual case costs and the total suite cost.
6

Generate report

Pass/fail results, assertion details, and metrics are collected into a report.

Eval case types

Verify correct behavior under normal conditions.

Assertions

Assertions are suite-level callables. Import the built-ins from afk.evals, or implement the EvalAssertion protocol.

Suite configuration

CI integration

Run evals in your CI pipeline to gate releases:
Set a budget for CI evals. Without a budget, a broken prompt can drain your API credits during a CI run. Use EvalBudget(max_total_cost_usd=2.00) as a reasonable CI limit.

Release gating

Gate releases on eval pass rate:

Next steps

Security Model

Security boundaries and production hardening.

Building with AI

Production playbook with anti-patterns.