gitwtfhub

wtf is agentbench?

1304674612/agentbench — explained in plain English

Analysis updated 2026-05-18

22TypeScriptAudience · developerComplexity · 3/5Setup · moderate

TL;DR

AgentBench is a testing framework for AI agents, like Jest but built for unpredictable AI. It lets developers replay agent runs, assert expected behaviors, and catch regressions before users do.

Mindmap

mindmap
  root((repo))
    What it does
      Replay agent runs
      Assert expected behavior
      Catch regressions
    Testing strategy
      Deterministic assertions
      LLM-assisted scores
      CI integration
    Key features
      Rule evaluators
      LLM-as-judge mode
      Snapshot and replay
      Diff engine
    Interfaces
      CLI
      Web dashboard
      Python SDK
      VS Code extension
    Use cases
      Test agent prompts
      Compare models
      Prevent silent breaks
    Audience
      Developers
      QA engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Write automated test suites to verify your AI agent calls the right tools with the correct arguments.

REASON 2

Replay a recorded agent interaction across different AI models to detect behavior drift before release.

REASON 3

Gate pull requests by checking token usage, latency, and quality scores stay within acceptable bounds.

REASON 4

Use a web dashboard to review full execution traces and compare agent runs side by side.

What's in the stack?

TypeScriptnpmPythonVS Code Extension

How it stacks up

1304674612/agentbenchaerdelan/housand-domaintoolmatrixaffaan-m/opencode
Stars222222
LanguageTypeScriptTypeScriptTypeScript
Last pushed2026-02-09
MaintenanceMaintained
Setup difficultymoderateeasyeasy
Complexity3/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires an npm install plus configuration of at least one AI provider API key to run agent calls and LLM-as-judge evaluations.

Wtf does this do

AgentBench is a testing framework designed for AI agents. It lets developers replay agent interactions, evaluate the results, assert expected behaviors, and catch regressions before they reach users. Think of it as a test runner like Jest, but built for non-deterministic AI systems instead of predictable code. The motivation is straightforward. AI agents are unpredictable, and small changes to a prompt, model, or tool can silently break behavior. Most teams only notice when users complain. AgentBench addresses this by providing automated test suites with assertions, cross-model replay to catch drift, full execution traces, and CI integration so regressions are caught before merging. The framework centers on a layered testing strategy. Deterministic assertions, such as checking which tools were called, token counts, and latency, run on every pull request. LLM-assisted quality scores across eight dimensions like correctness, safety, and faithfulness gate pre-release evaluation. The README references an "Agent Testing Pyramid" for the full methodology and an anti-patterns guide for common mistakes to avoid. Writing a test involves creating a suite, defining a test case, calling your agent, and asserting expectations. The assertion DSL supports chaining checks together. You can verify that a specific tool was called with certain arguments, that the output contains expected text, that token usage stays below a threshold, that latency meets a bound, and that quality scores exceed a target. The framework includes 14 rule evaluators, an LLM-as-judge mode with configurable voting strategies, snapshot management for saving and restoring agent state, a replay engine for deterministic or cross-model replay, a diff engine for comparisons, and automatic regression detection. The project is built in TypeScript and offers a CLI installed via npm, a web dashboard, a Python SDK, and a VS Code extension. It supports 12 or more AI providers. The README is longer than what was shown.

Yoink these prompts

Prompt 1
Install AgentBench via npm and write a test suite that calls my customer support agent and asserts it used the refund tool with the correct order ID.
Prompt 2
Set up AgentBench in my CI pipeline to run deterministic assertions on token count and latency on every pull request, blocking merges if thresholds are exceeded.
Prompt 3
Use AgentBench's LLM-as-judge mode to score my agent's responses on correctness, safety, and faithfulness, and fail the test if any dimension drops below 0.8.
Prompt 4
Record an agent interaction with AgentBench, then replay it across OpenAI and Anthropic models to detect behavior drift using the diff engine.
Prompt 5
Create an AgentBench snapshot of my agent's current state so I can restore it later and compare future changes against this baseline.

Frequently asked questions

wtf is agentbench?

AgentBench is a testing framework for AI agents, like Jest but built for unpredictable AI. It lets developers replay agent runs, assert expected behaviors, and catch regressions before users do.

What language is agentbench written in?

Mainly TypeScript. The stack also includes TypeScript, npm, Python.

How hard is agentbench to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is agentbench for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.