Prerequisites
- Install the SDK.
- Build a dataset, or use an existing dataset ID from the AgentX dashboard.
- Export
AGENTX_API_KEYin your environment.
Run an evaluation
client.evaluations.run() creates the run, .execute() calls my_agent once per test case, scores each response immediately, and submits the results. .finalize() closes the run: run_context.average_rating (and .min_rating / .max_rating / .rated_count) read straight from those scores, no LLM analysis pass required. .analyze() is a separate, optional step that adds the qualitative report (strengths, weaknesses, recommendations) and returns it as report.
Link each result to its trace
Trace the agent call and return the span’s id alongside the output - three things light up at once: a View trace button on every result row, trajectory-aware judging (the judge sees the tools the agent actually called, not just the answer), and expected-trajectory matching for cases that declareexpected_tools:
Configuration
AgentX reads environment variables via .from_env():
Or pass configuration directly:
Next steps
Build Dataset
Create test cases instead of using an existing dataset
EvaluationSubject Fields
Describe your agent so analysis can check instruction adherence
Examples
Framework-specific integration patterns
Submit Pre-Defined Results
Score outputs you already generated, without re-running the agent
Evaluation Settings
Build one grading config once, run it against any dataset
Link a Trace to a Result
Get a full Execution Timeline per result, not just a score

