agent.NewAgent execution loops under configurable load — mock LLM and tools by default — so you can measure latency, memory, CPU, token counts, and success rate without external API keys.
Use it to stress-test orchestration behavior (multi-turn runs, tool batches, sub-agents, local vs Temporal runtime) before pointing the same harness at real LLMs and tools.
Prerequisites
Clone the SDK repository and run from the repository root:What it measures
Most agent benchmarks focus on token throughput alone. Production workloads also depend on orchestration scaling: concurrent runs, multi-turn tool loops, sub-agent delegation, durable Temporal workflows, and stable memory use over hundreds of executions. Each benchmark session reports:
Reports are written to
benchmarks/reports/ (JSON or text). Optional SDK logs go to benchmarks/logs/.
Quick start
From the repository root:benchmarks/config.yaml by default — 100 sequential runs, local runtime, 3 tools, 2 sub-agents.
Custom config:
How each run works
Each run callsagent.Run() once on a shared root agent. The mock LLM follows a fixed two-turn script:
- Turn 1 — returns tool calls for all registered tools (and sub-agent tools when configured)
- Turn 2 — returns final text after tool results are applied
Concurrency: one root agent is reused. When
concurrent: true, runs execute in batches of concurrent_count goroutines.
Example scenarios
Fast local smoke test:workers_count: 1+) — spawns separate worker processes that also poll the root agent’s task queue:
Configuration reference
All paths in config are relative to the repository root unless absolute.runtime
agent
llm / tool
memory
In-process inmem backend — no Docker required. Disabled by default.
output
logger
Sample output
A default run (100 sequential runs, 3 tools, 2 sub-agents, local runtime) produces a text report like:
output.format: json) emits the same data as a structured object — suitable for CI assertion scripts and trend dashboards.
Good results: success_rate: 100%, p99 latency within your SLO, heap stable across the run (not growing linearly with run count).
Real LLM and tools
LLM and tool calls are mocked by default for reproducible, zero-cost runs. To benchmark with real providers, replace the mock client and tool registry inbenchmarks/setup/ — the harness structure (runs, concurrency, reporting, Temporal workers) stays the same.
Latency, token counts, and cost will follow your provider; configure pricing separately for est_cost_usd.
Related
Eval Harness
Behavioral regression without live LLM
Telemetry
Per-run metrics in benchmark telemetry