Prerequisites
- Create an evaluation dataset in AgentX with at least one question.
- Enable CI/CD in the dataset settings and set a pass rate threshold.
- Export
AGENTX_API_KEYin your environment.
High-level: run_eval()
The easiest path — one call handles the entire lifecycle:
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
dataset_id | str | required | EvaluationSettings ID (must have ci.enabled: true) |
agent_fn | Callable[[str], str] | required | Function that takes a query and returns a response |
agent_name | str | — | Label for this agent on the AgentX platform |
pass_rate_threshold | float | dataset default | Per-run override (0.0–1.0) |
git_context | dict | — | Branch, commit SHA, PR number, etc. |
concurrency | int | 1 | Max parallel question invocations |
fail_on_gate | bool | False | Raise CIGateFailure if gate is "fail" |
timeout_per_question | float | — | Seconds before a question times out |

