Agent Evaluation
PraisonAI provides a comprehensive evaluation framework for testing and benchmarking AI agents. The evaluation system supports multiple evaluation types with zero performance impact when not in use.Install requirement: the wrapper-delegating
praisonai eval subcommands (accuracy, performance, judge) require pip install praisonai (the full wrapper). On a standalone pip install praisonai-code install they exit 1 with eval requires the full wrapper. Install the full wrapper: pip install praisonai — a single-line hint, no Rich traceback (PR #2854). The native eval list-judges and its eval list alias run standalone in-process against praisonaiagents.eval.Evaluation Types

Installation
The evaluation framework is included inpraisonaiagents:
Python Usage
Accuracy Evaluation
Compare agent outputs against expected results using an LLM judge:Performance Evaluation
Benchmark agent runtime and memory usage:Reliability Evaluation
Verify that agents call the expected tools:Criteria Evaluation
Evaluate outputs against custom criteria using LLM-as-judge:Failure Callbacks
Handle evaluation failures with callbacks:Evaluate Pre-generated Outputs
Evaluate outputs without running the agent:Saving Results
Save evaluation results to files:Building agents from YAML (without running them)
AgentsGenerator.build_agents() returns the constructed agent instances from an agents.yaml without running them. The with block keeps the per-agent tool_timeout thread pool alive while you drive the agents yourself (for an evaluator, a sandbox, a one-off introspection).
framework: crewai, pass that framework to AgentsGenerator(...) as well so the eval build and your own build stay aligned.
Full constructor signature and lifecycle methods
CLI Usage
Accuracy Evaluation
Fixed in PraisonAI PR #4946. Pass the agent as the named option
--agent <path> (aliased -a) — a bare positional agent.yaml used to fail with unrecognized arguments: agent.yaml. --iterations/-n is now forwarded to the accuracy runner (it was previously declared but dropped, so every run used the wrapper’s default).Fixed in PraisonAI PR #5643. The
--agent agents.yaml path now works across every eval subcommand (accuracy, performance, reliability, criteria). The CLI resolves a framework adapter (honoring an optional framework: key in your YAML — defaults to the registry’s default framework), builds the LLM config list, and tears down the generator’s tool-timeout thread pool once the eval returns.Performance Evaluation
Reliability Evaluation
Criteria Evaluation
Last Trace Evaluation
Grade the last completed traced run from a stored pointer — no manual JSON export needed.
Exit codes:
See Grade Your Last Run for the full run → record → grade flow and the
praisonaiagents.trace Python API.
List Judges
List every judge type registered viaadd_judge() (built-ins and any custom judges loaded through your agents.yaml).
Batch Evaluation
Run multiple test cases from a JSON file:CLI Options Reference
Common Options
--agent agents.yaml honors a framework: key inside the YAML. If omitted, the registry’s default framework is used.
Accuracy Options
Performance Options
Reliability Options
Criteria Options
Last Trace Options
Result Data Structures
AccuracyResult
PerformanceResult
ReliabilityResult
CriteriaResult
LLM Judge in Interactive Tests
The interactive test runner integrates LLM-as-judge evaluation for automated response quality assessment. This allows you to validate not just tool calls and file outputs, but also the quality of agent responses.Using Judge in CSV Tests
Add ajudge_rubric column to your CSV test file:
Judge Configuration
CLI Options for Judge
Judge Output
When judge evaluation is enabled, results include:- Score: 1-10 rating based on rubric
- Passed: Whether score meets threshold
- Reasoning: Detailed explanation of the score
judge_result.json):
Writing Effective Rubrics
Good rubrics are:- Specific: “Response includes code example” vs “Response is good”
- Measurable: “Explains at least 3 benefits” vs “Comprehensive”
- Relevant: Focus on what matters for the test case
Best Practices
- Use Multiple Iterations: Run evaluations multiple times for statistical significance
- Warmup Runs: Use warmup runs for performance benchmarks to avoid cold-start effects
- Save Results: Always save results for tracking and comparison
- Custom Criteria: Write specific, measurable criteria for criteria evaluations
- Batch Testing: Use batch evaluation for regression testing
- CI/CD Integration: Integrate evaluations into your CI/CD pipeline
Examples
See the examples directory for complete examples:- Accuracy Evaluation
- Performance Evaluation
- Reliability Evaluation
- Criteria Evaluation
- Batch Evaluation
GitHub Advanced Test Rubrics
Thegithub-advanced test suite uses specialized LLM judge rubrics for evaluating GitHub workflow quality:

