Skip to content

Examples: evals and optimiser

Grade an agent on eval cases; improve its harness. Back to the Examples gallery. Files here: 9.

File Shows Install Run Docs
examples/evals_cost_advisor.py Find a cheaper model per flow node that keeps the eval score, offline. pip install agent-adapter python examples/evals_cost_advisor.py Cut model costs per step
examples/evals_from_production.py Production runs become eval cases: record, save the cases, evaluate in CI, fix, evaluate again. pip install agent-adapter python examples/evals_from_production.py Evals from production
examples/evals_quickstart.py Evaluate a shop support agent offline: cases, graders, a report, and a regression check. pip install agent-adapter python examples/evals_quickstart.py Evaluate your agent
examples/evals_viewer.py Save two eval reports of a ticket desk agent and open them in the viewer's Evals view. pip install agent-adapter python examples/evals_viewer.py See your evals
examples/harness_agent.py The agent being optimised: a help-center FAQ agent with one tool and no framework. pip install agent-adapter import only Optimise your agent
examples/harness_fakes.py Offline stand-ins for the agent model and the proposer model. pip install agent-adapter import only Optimise your agent
examples/harness_frameworks.py Make a LangGraph, OpenAI Agents or Pydantic AI agent optimisable with CallableHost. pip install agent-adapter; optional: pip install "agent-adapter[langgraph,openai-agents,pydantic-ai]" import only Optimise your agent
examples/harness_optimise.py Optimise the help-center FAQ agent offline, then load and apply the tree it chose. pip install agent-adapter python examples/harness_optimise.py Optimise your agent
examples/optimiser_demo.py Optimise a tool-calling agent's harness offline, then review the patch (nothing is applied). pip install agent-adapter python examples/optimiser_demo.py Optimiser