-
Notifications
You must be signed in to change notification settings - Fork 0
Examples
AgentBench ships with 14 production-quality reference implementations. Each example is a complete, runnable project with an agent implementation, a test suite, a dataset, and a CI workflow. Use them to learn AgentBench patterns or as templates for your own projects.
Start with hello-agent if you are new to AgentBench.
Examples with simple agents, no tools, and straightforward assertions. Perfect for learning the basics.
Difficulty: Beginner | Framework: Standalone (OpenAI) | Reading time: 5 min
The simplest possible AgentBench project. A single-turn chat agent with no tools, no multi-step reasoning, and no external dependencies beyond the OpenAI API. Demonstrates status().toBeCompleted(), output().toContain(), tokens().toBeLessThan(), latency().toBeLessThan(), toMatchSnapshot(), and deterministic testing at temperature=0. Use this as your template to bootstrap a new agent evaluation project.
Difficulty: Beginner | Framework: LangGraph-style | Reading time: 5 min
A production-grade customer support AI agent handling greetings, refund policies, escalations, and multi-turn conversations with tool-augmented responses. Demonstrates tool().toBeCalled(), tool().toBeCalledWith(), tool().not.toBeCalled(), multi-turn session testing with agent.session(), score('faithfulness') LLM judge grounding, regression detection with snapshot comparisons, and dataset-driven testing with 200 customer queries. The most common AgentBench testing patterns in one example.
Examples with tools, multiple providers, RAG, and domain-specific testing. For developers comfortable with the basics.
Difficulty: Advanced | Framework: Custom (Multi-step) | Reading time: 5 min
A multi-step research AI agent with a structured research workflow: web search, page fetch, summarization, and source citation with faithfulness verification. Demonstrates multi-step workflow testing, source/citation verification, score('faithfulness') at each step, hallucination detection, research quality evaluation, web search tool verification, and summarization quality scoring.
Difficulty: Advanced | Framework: Custom (Code Analysis) | Reading time: 5 min
A code review AI agent using Claude to analyze code for bugs, security vulnerabilities, and best practice violations with specialized static analysis tools. Demonstrates security vulnerability detection assertions, false positive rate testing, code quality assessment scoring, large diff handling, and tool-based code analysis (read_file, git_diff, lint).
Difficulty: Intermediate | Framework: Custom (Vector DB) | Reading time: 5 min
A Retrieval-Augmented Generation agent demonstrating embedding-based retrieval, document chunking, grounding verification, context window management, and latency budgeting. Tests retrieval quality assertions, faithfulness verification, context window overflow handling, and embedding comparison.
Difficulty: Intermediate | Framework: Custom (Database) | Reading time: 5 min
A Text-to-SQL agent with schema awareness. Tests SELECT queries, JOINs, aggregations, schema introspection, and SQL injection safety. Demonstrates schema awareness assertions, query correctness verification, SQL injection safety testing, aggregation accuracy, and dataset with a seeded database.
Difficulty: Advanced | Framework: Custom (Code Generation) | Reading time: 5 min
A code generation agent with an edit-apply loop. Demonstrates write_file, run_test, and git_commit tools. Tests code correctness by running generated code against test suites. Covers generated code verification, edit-apply loop testing, tool sequence assertions, regression detection, and test-driven development workflow.
Difficulty: Intermediate | Framework: Standalone (OpenAI function calling) | Reading time: 5 min
A production-grade agent with 8 tools: search, calculator, weather, database query, file reader, email sender, calendar, and translator. Tests correct tool selection, parallel execution, argument schema adherence, and error handling. Demonstrates tool().toBeCalled() with multiple tools, tool().toBeCalledWith() schema verification, parallel tool call assertions, tool().not.toBeCalled() for forbidden tools, and token/cost tracking across complex tool chains.
Difficulty: Intermediate | Framework: MCP (Model Context Protocol) | Reading time: 5 min
An agent using the Model Context Protocol to interact with external tool servers. Demonstrates testing of MCP-connected tools across multiple transports (stdio, SSE, WebSocket), tool discovery and capability verification, error handling for disconnected servers, and cross-provider replay.
Examples with multi-agent orchestration, state graphs, complex workflows, and comprehensive safety testing.
Difficulty: Advanced | Framework: LangGraph | Reading time: 5 min
A LangGraph-style agent with a 5-node state graph, conditional edge routing, state transition tracking, and human-in-the-loop approval workflows. Demonstrates state graph node traversal testing, conditional edge routing assertions, state transition verification, human-in-the-loop interruption testing, and graph execution tracing.
Difficulty: Intermediate | Framework: OpenAI Agents SDK | Reading time: 5 min
An agent built with the OpenAI Agents SDK, demonstrating native integration with AgentBench. Includes guardrails, handoffs between sub-agents, and tracing. Tests guardrail assertions, handoff/delegation verification, and agent-to-agent communication.
Difficulty: Advanced | Framework: CrewAI | Reading time: 5 min
A multi-agent collaboration system using CrewAI. Demonstrates role-based agents, task delegation, inter-agent communication, and collaborative output verification. Tests multi-agent role assignment, task delegation assertions, inter-agent message passing, collaborative output scoring, agent handoff, and crew hierarchy validation.
Difficulty: Intermediate | Framework: LlamaIndex | Reading time: 5 min
A RAG agent built with LlamaIndex. Demonstrates testing of index-based retrieval, embedding quality comparison, and response synthesis. Tests index retrieval quality, embedding model comparison, response synthesis assertions, and source node attribution verification.
Difficulty: Advanced | Framework: Custom Orchestrator | Reading time: 5 min
A complex multi-agent orchestration system with researcher, writer, reviewer, and coordinator agents. Tests orchestration correctness, handoffs, consensus building, concurrency, and failure recovery. Demonstrates orchestrator routing assertions, handoff protocol verification, consensus mechanism testing, concurrent agent execution testing, and full workflow regression detection.
Every official example meets these standards:
- Passes
agentbench testwith 100% success rate - Includes at least 3 test suites and 8 test cases
- Demonstrates at least 3 different assertion types (tool, output, score, latency, tokens)
- Includes a replay test suite
- Includes a CI workflow file (
.github/workflows/agentbench.yml) - Has a README following the standard template
- Is reproducible (no hardcoded secrets; uses
.env) - Includes a dataset of at least 20 test inputs
| Your Situation | Start With |
|---|---|
| "I have never used AgentBench" | Hello Agent |
| "I have a support/chat agent" | Customer Support Agent |
| "My agent uses a knowledge base" | RAG Agent |
| "My agent calls external tools" | Tool-Calling Agent |
| "I am building an agent framework" | OpenAI Agent SDK |
| "I have multiple agents working together" | Multi-Agent Workflow |
Related pages: Getting-Started | Core-Concepts | Guides | Cookbook
AgentBench v0.3.0 · GitHub · Report Issue · Changelog
- Core-Concepts
- Replay & Snapshots
- Assertions & Evaluation
- Coverage & Non-Determinism
- Guides
- Testing OpenAI / Anthropic
- CI/CD Integration
- Custom-Providers
- Migration-Guide
- Cookbook
- Prompt Regressions
- Model Migration
- Cost Budgets
- Safety Testing
- A/B Testing