Skip to main content

Prerequisites

  1. Install the SDK.
  2. Build a dataset, or use an existing dataset ID from the AgentX dashboard.
  3. Export AGENTX_API_KEY in 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. 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 declare expected_tools:
The dashboard’s Create evaluation button (Evaluate → Runs) generates this exact scaffold with your real dataset and evaluator ids inlined, in Simple, OpenAI, LangChain, or Google ADK flavors.

Concurrency, output reuse, and resume

.execute() takes two optional knobs:
concurrency (default 1) bounds parallel agent calls; results are still submitted in case order. reuse_outputs_from replays the recorded outputs of cases unchanged since that run and only invokes your agent for new or edited ones - scorer iteration costs judge calls, not agent calls. Replayed results carry reusedFromRun in their metadata. Interrupted runs resume for free: the engine tracks which case results a run already received, and re-running .execute() against the same run skips them (older engines without the route just re-run everything). A batch that fails to submit is retried once and then raises EvaluationSubmissionError instead of letting the run finish silently empty - the run is left unfinalized, and re-running execute() picks up past the already-submitted cases.

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

Multiple judge scorers per run

One agent execution, N verdicts (self-host): pass additional_scorer_ids and every result is also scored by each extra judge, with its own rubric and model. The primary scorer keeps the rating column (gates and averages unchanged); extra verdicts land in each result row’s judgeScorerResults and roll up into the run’s scorerBreakdown.
The CI gate can target a named additional scorer - “fail if Safety is low even when the average looks fine”:
(Equivalent REST: GET /custom-agent-evaluations/runs/{id}/gate?failUnder=8&scorer=Safety; an unknown scorer id or name is a hard 400, never a silently-passing gate.)