Targets and Runners
AgentEvaluator().run(target=...) accepts one of three kinds of target. Whatever you pick, it produces
trials, and trials are scored the same way — so the same tasks and metrics work against any target
(see Agent Evaluation for the model).
At a glance
The union is AgentEvalTarget = Model | Agent | AgentTaskRunner, where Agent = GenericAgent | NemoAgentToolkitAgent.
Model
A chat/completions endpoint evaluated directly on your tasks — a useful baseline (how well does a
bare model do before you wrap it in an agent?). The evaluator prompts it with each task’s
instruction.
For a local run(), api_key_secret names an environment variable in your process; for a submitted
job it names a platform secret in the workspace.
Agent (HTTP)
A deployed agent reachable over HTTP. Two variants, both authenticated with api_key_secret — the
same credential reference Model uses: for a local run() it names an environment variable, for a
submitted job a platform secret. Its value is sent as a bearer token on each request.
GenericAgent
Any JSON endpoint. You define the request with a Jinja body (rendered against the task inputs) and
pull the answer out with JSONPath. Full walkthrough:
Evaluate a Deployed Agent over HTTP.
NemoAgentToolkitAgent
A NeMo Agent Toolkit endpoint. It
speaks NAT’s fixed request/response protocol, so you don’t hand-write a body — point it at the
workflow’s URL.
AgentTaskRunner (callable, Harbor, or your own)
The most general target: anything implementing the one-method protocol.
The SDK ships two runners you’ll usually reach for first:
CallableAgentTaskRunnerwraps anasync def agent(task) -> str | AgentOutput | TrialDraft. The smallest possible target — no Docker, no HTTP. See the Quickstart. Return aTrialDraftto attach a trajectory or other evidence (see Score by Component).HarborAgentTaskRunnerruns a Harbor task suite in Docker and scores its verifier reward. See Harbor Task Suite.
Write your own when your agent doesn’t fit those — a bespoke harness, a queue, a replay of stored runs.
Return one AgentEvalTrial per task; the evaluator scores them exactly like any other target:
Choosing a target
- Just trying the flow, or you already have the agent in Python →
CallableAgentTaskRunner. - The agent is deployed behind HTTP →
GenericAgent(any endpoint) orNemoAgentToolkitAgent(a NAT workflow). - You want a model baseline, no agent →
Model. - You have Harbor task datasets →
HarborAgentTaskRunner. - None of the above fits → implement
AgentTaskRunner.