Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– AgentEval

Open source agent evaluation framework β€” score any AI agent across providers with standardized, reproducible benchmarks.

License: MIT Python TypeScript CI PRs Welcome


Why AgentEval?

Every team building AI agents needs to answer one question:

How good is my agent, actually?

There are frameworks for orchestration (LangChain), observability (Langfuse), and tracking (MLflow) β€” but no standardized, provider-agnostic way to score an agent's performance. AgentEval fills that gap:

  • One command β†’ comparable scores across OpenAI, Anthropic, Ollama, and local models
  • Standardized task suites for the capabilities that matter: codegen, QA, reasoning, summarization, tool-use
  • Real metrics: accuracy, pass@k, latency, cost per run
  • CI-ready: fail builds when agent quality drops below a threshold
pip install agenteval
agenteval run --provider openai --model gpt-4o-mini --suite all
# AgentEval Report

- Provider: openai (gpt-4o-mini)
- Suite: all
- Tasks: 8/10 passed
- Accuracy: 80.0%
- Avg latency: 420.3 ms
- Total cost: $0.000412

Features

Feature Description
Multi-provider OpenAI-compatible APIs, Anthropic, Gemini, Groq, Ollama, local models, mock
Task suites codegen, qa, reasoning, summarization, tool-use (+ custom)
pass@k Run a task N times, pass if any sample succeeds
Cost tracking Per-run USD cost for every provider
CLI + SDK Python CLI and TypeScript SDK (typed, tested)
CI integration Non-zero exit below threshold; JSON output
Reusable workflow uses: rexblade58/agenteval/.github/workflows/eval.yml@main
Docker image Multi-arch GHCR image for CLI + dashboard β€” see docs
Zero heavy deps httpx + rich only β€” no framework lock-in

Status

Actively developed. Current state of the repo:

Area Status
Python core (CLI, providers, evaluator, reports) βœ… Done β€” 9 unit tests
TypeScript SDK (types + mock runner + CLI wrapper) βœ… Done β€” 4 unit tests, strict TS
CI pipeline βœ… Python 3.10/3.11/3.12 + TS typecheck/test
Mock provider (keyless testing) βœ… Done
Providers: OpenAI, Anthropic, Ollama, mock βœ… Done
Gemini provider βœ… Done β€” --provider gemini
Groq provider (free tier) βœ… Done β€” --provider groq
Semantic scoring (--scoring semantic) βœ… Done
pass@k + cost + latency metrics βœ… Done
Web dashboard (agenteval serve) βœ… Done β€” local, zero-dep
GitHub Actions reusable workflow βœ… Done β€” see docs
Docker image (multi-arch GHCR) βœ… Done β€” see docs

See the issues for what's next, GitHub Actions integration for CI setup, and the commit history for recent progress.

Quick start

Mock (no API key)

git clone https://github.com/rexblade58/agenteval.git
cd agenteval
pip install -e packages/core
agenteval run --provider mock --suite all

OpenAI

export OPENAI_API_KEY=sk-...
agenteval run --provider openai --model gpt-4o-mini --suite codegen \
  --format json --output reports/openai-codegen.json

Reports are written in a stable JSON schema (schema_version, generated_at, metrics, per-task results) β€” see examples/reports/ for samples.

Anthropic

export ANTHROPIC_API_KEY=sk-ant-...
agenteval run --provider anthropic --model claude-3-5-sonnet-latest --suite qa

Google Gemini

export GEMINI_API_KEY=AIza...
agenteval run --provider gemini --model gemini-2.0-flash --suite reasoning

Groq (free tier)

export GROQ_API_KEY=gsk_...
agenteval run --provider groq --model llama-3.3-70b-versatile --suite codegen

Semantic scoring (paraphrase-tolerant)

agenteval run --provider mock --suite qa --scoring semantic

Local (Ollama)

agenteval run --provider ollama --model llama3.2 --suite reasoning

Web dashboard

agenteval run --provider mock --suite all --output reports/mock.json
agenteval serve --dir reports
# β†’ http://127.0.0.1:8000  (accuracy/cost/latency trends, provider comparison)

TypeScript SDK

import { evaluateMock, runCli } from '@agenteval/sdk';

const report = runCli({
  provider: 'openai',
  model: 'gpt-4o-mini',
  suite: 'codegen',
});
console.log(`Accuracy: ${(report.accuracy * 100).toFixed(1)}%`);

Architecture

agenteval/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ core/               Python evaluation engine
β”‚   β”‚   └── agenteval/
β”‚   β”‚       β”œβ”€β”€ cli.py      argparse CLI
β”‚   β”‚       β”œβ”€β”€ providers.py  OpenAI / Anthropic / Ollama / mock
β”‚   β”‚       β”œβ”€β”€ evaluator.py  pass@k engine + scoring
β”‚   β”‚       β”œβ”€β”€ tasks.py      built-in task suites
β”‚   β”‚       └── report.py     JSON + Markdown reports
β”‚   └── sdk-ts/             TypeScript SDK
β”œβ”€β”€ examples/               Runnable examples + sample reports
β”œβ”€β”€ docs/                   Guides
└── .github/workflows/      CI (tests, lint, publish)

Adding a provider

Providers implement a single method:

class MyProvider(BaseProvider):
    name = "my-provider"

    def complete(self, messages, temperature=0.7) -> ProviderResult:
        # call your API, return ProviderResult(text=..., latency_ms=..., ...)
        ...

Register it in PROVIDER_REGISTRY and it works with the CLI, SDK, and reporting β€” no other changes needed.


Roadmap

Planned work is tracked as GitHub issues β€” community PRs are very welcome.


Contributing

See CONTRIBUTING.md. Bug reports, provider PRs, and new task suites are all welcome.

License

MIT Β© Menard Rosal

About

Open-source agent evaluation framework - score any AI agent across providers with standardized benchmarks

Topics

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages