evalrouter 0.4.0a7__tar.gz → 0.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/PKG-INFO +78 -27
  2. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/README.md +74 -26
  3. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/pyproject.toml +4 -1
  4. evalrouter-0.4.2/src/evalrouter/agents.py +63 -0
  5. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/evalrouter_contracts/__init__.py +1 -1
  6. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/__init__.py +75 -28
  7. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_account.py +44 -11
  8. evalrouter-0.4.2/src/kimpton_evalrouter/_acp_agents.py +702 -0
  9. evalrouter-0.4.2/src/kimpton_evalrouter/_acp_controller.py +706 -0
  10. evalrouter-0.4.2/src/kimpton_evalrouter/_acp_launch.py +230 -0
  11. evalrouter-0.4.2/src/kimpton_evalrouter/_acp_registry/LICENSE +176 -0
  12. evalrouter-0.4.2/src/kimpton_evalrouter/_acp_registry/registry-2026-10-06.json +1547 -0
  13. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_boundary.py +7 -7
  14. evalrouter-0.4.2/src/kimpton_evalrouter/_chart_format.py +177 -0
  15. evalrouter-0.4.2/src/kimpton_evalrouter/_chart_select.py +133 -0
  16. evalrouter-0.4.2/src/kimpton_evalrouter/_chart_specs.py +835 -0
  17. evalrouter-0.4.2/src/kimpton_evalrouter/_client_run.py +1307 -0
  18. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_comparison.py +43 -7
  19. evalrouter-0.4.2/src/kimpton_evalrouter/_evaluation_jobs_cli.py +181 -0
  20. evalrouter-0.4.2/src/kimpton_evalrouter/_failure_guidance.py +199 -0
  21. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_groups.py +160 -18
  22. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_guided.py +230 -82
  23. evalrouter-0.4.2/src/kimpton_evalrouter/_in_code.py +434 -0
  24. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_listing.py +5 -4
  25. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_reasoning_controls.py +43 -4
  26. evalrouter-0.4.2/src/kimpton_evalrouter/_release_cli.py +108 -0
  27. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_report_brand.py +4 -0
  28. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_report_chart_data.py +498 -4
  29. evalrouter-0.4.2/src/kimpton_evalrouter/_report_charts.py +913 -0
  30. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_report_document.py +11 -1
  31. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_report_theme.py +6 -5
  32. evalrouter-0.4.2/src/kimpton_evalrouter/_repository_checkout.py +331 -0
  33. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_resources.py +820 -418
  34. evalrouter-0.4.2/src/kimpton_evalrouter/_result_groups.py +42 -0
  35. evalrouter-0.4.2/src/kimpton_evalrouter/_task_adapters/__init__.py +90 -0
  36. evalrouter-0.4.2/src/kimpton_evalrouter/_task_adapters/a1_prompt_answer.py +44 -0
  37. evalrouter-0.4.2/src/kimpton_evalrouter/_task_adapters/a2_environment.py +62 -0
  38. evalrouter-0.4.2/src/kimpton_evalrouter/_task_adapters/a3_file_task.py +237 -0
  39. evalrouter-0.4.2/src/kimpton_evalrouter/_task_adapters/a4_repository.py +115 -0
  40. evalrouter-0.4.2/src/kimpton_evalrouter/_task_mcp.py +290 -0
  41. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_tui.py +8 -7
  42. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_tui_session.py +39 -5
  43. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_tui_views.py +43 -9
  44. evalrouter-0.4.2/src/kimpton_evalrouter/_tune.py +257 -0
  45. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_update_notice.py +6 -5
  46. evalrouter-0.4.2/src/kimpton_evalrouter/_web_routes.py +69 -0
  47. evalrouter-0.4.2/src/kimpton_evalrouter/_workload_cli.py +101 -0
  48. evalrouter-0.4.2/src/kimpton_evalrouter/agents.py +633 -0
  49. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/cli.py +328 -94
  50. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/render/picker.py +18 -5
  51. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/render/screens.py +61 -52
  52. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/render/tables.py +2 -1
  53. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/types.py +1677 -532
  54. evalrouter-0.4.0a7/src/kimpton_evalrouter/_report_charts.py +0 -1716
  55. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/LICENSE +0 -0
  56. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/evalrouter/__init__.py +0 -0
  57. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/evalrouter/__main__.py +0 -0
  58. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/evalrouter/langsmith.py +0 -0
  59. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/evalrouter/py.typed +0 -0
  60. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/evalrouter/tracing.py +0 -0
  61. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/evalrouter/types.py +0 -0
  62. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/evalrouter_contracts/bundle.py +0 -0
  63. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/evalrouter_contracts/components.py +0 -0
  64. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/evalrouter_contracts/models.py +0 -0
  65. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/evalrouter_contracts/protocol.py +0 -0
  66. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/evalrouter_contracts/py.typed +0 -0
  67. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/evalrouter_contracts/templates.py +0 -0
  68. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/evalrouter_contracts/validation.py +0 -0
  69. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/__main__.py +0 -0
  70. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_artifacts.py +0 -0
  71. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_chain_prefetch.py +0 -0
  72. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_comparison_checkpoint.py +0 -0
  73. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_comparison_html.py +0 -0
  74. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_environment_publishing.py +0 -0
  75. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_forecasts.py +0 -0
  76. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_group_results.py +0 -0
  77. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_group_review.py +0 -0
  78. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_group_summary_prefetch.py +0 -0
  79. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_helpers.py +0 -0
  80. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_history_labels.py +0 -0
  81. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_progress.py +0 -0
  82. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_read_cache.py +0 -0
  83. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_report_document_html.py +0 -0
  84. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_report_pareto.py +0 -0
  85. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_transport.py +0 -0
  86. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_tui_port.py +0 -0
  87. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/_tui_table.py +0 -0
  88. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/langsmith.py +0 -0
  89. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/py.typed +0 -0
  90. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/render/__init__.py +0 -0
  91. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/render/_console.py +0 -0
  92. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/render/_theme.py +0 -0
  93. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/render/_widgets.py +0 -0
  94. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/render/live.py +0 -0
  95. {evalrouter-0.4.0a7 → evalrouter-0.4.2}/src/kimpton_evalrouter/tracing.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: evalrouter
3
- Version: 0.4.0a7
3
+ Version: 0.4.2
4
4
  Summary: Interactive evaluation workspace, command-line tools, and Python client for EvalRouter
5
5
  Project-URL: Homepage, https://evalrouter.ai
6
6
  Project-URL: Documentation, https://evalrouter.ai/developers/docs/cli
@@ -19,6 +19,9 @@ Requires-Python: <3.14,>=3.12
19
19
  Requires-Dist: httpx==0.28.1
20
20
  Requires-Dist: rich==15.0.0
21
21
  Requires-Dist: textual==8.2.8
22
+ Provides-Extra: agents
23
+ Requires-Dist: agent-client-protocol==0.12.1; extra == 'agents'
24
+ Requires-Dist: pydantic==2.13.5; extra == 'agents'
22
25
  Provides-Extra: benchmark
23
26
  Requires-Dist: pydantic==2.13.5; extra == 'benchmark'
24
27
  Provides-Extra: keyring
@@ -49,18 +52,18 @@ SDK License, included as `LICENSE` in the package.
49
52
  We recommend [uv](https://docs.astral.sh/uv/getting-started/installation/) to install the CLI in its own Python environment:
50
53
 
51
54
  ```sh
52
- uv tool install --prerelease allow evalrouter
55
+ uv tool install evalrouter
53
56
  evalrouter
54
57
  ```
55
58
 
56
- For this alpha, use `python -m pip install --pre evalrouter` in a Python 3.12 or 3.13 environment.
59
+ With pip, use `python -m pip install evalrouter` in a Python 3.12 or 3.13 environment.
57
60
  uv selects a compatible Python for the CLI and downloads one if needed. If
58
61
  your shell cannot find `evalrouter`, run `uv tool update-shell` and restart your
59
62
  terminal. Upgrade an existing installation with `evalrouter upgrade` (or
60
- `evalrouter --upgrade`). Alpha, beta and rc installations include prereleases
61
- automatically; stable installations stay on stable unless you pass `--pre`.
62
- The command uses uv, pipx or pip in the current virtual environment. Source
63
- installs, system Python and installer-pinned versions need their original installer.
63
+ `evalrouter --upgrade`). Stable installations stay on stable unless you pass
64
+ `--pre`; installed prereleases include prereleases automatically. The command
65
+ uses uv, pipx or pip in the current virtual environment. Source installs,
66
+ system Python and installer-pinned versions need their original installer.
64
67
  Check the installed version with `evalrouter --version`. Use `evalrouter --help`
65
68
  for explicit commands, or see the [CLI guide](https://evalrouter.ai/developers/docs/cli).
66
69
 
@@ -132,14 +135,14 @@ workspace. Choose **Account and workspace → Sign in** to connect your account.
132
135
  Local sign-in returns from the browser to the waiting CLI; for a remote terminal,
133
136
  use `evalrouter login --no-browser` and approve the code on a device with a browser.
134
137
 
135
- **Run a benchmark** guides you through the benchmark, one to eight models, each
138
+ **Run a benchmark** guides you through the benchmark, your selected compatible models, each
136
139
  model's reasoning settings and coverage. Type to filter lists; Space or Enter
137
140
  toggles a model and Tab continues. A supported native one-model evaluation
138
141
  starts directly with the optional `--max-cost` cap or available wallet credit,
139
142
  limited by the service maximum. Supported native separate multi-model groups
140
143
  also start directly, with an optional aggregate cap. Their finite service bounds
141
144
  do not reserve the wallet once per model: mandatory fees and live calls use
142
- shared available credit. Matched comparisons retain their quote and required cap.
145
+ shared available credit. Supported native matched comparisons also start directly with an optional cap; unsupported execution paths retain their quote and cap requirements.
143
146
 
144
147
  Choose a suggested sample, **Custom sample size**, or **Full benchmark** for
145
148
  coverage. A custom sample accepts 1 to 1,000 tasks, limited to the benchmark's
@@ -173,18 +176,12 @@ evalrouter run BENCHMARK_SLUG --model MODEL_ID --sample 3
173
176
  Supported native single-model benchmarks start directly. A spending cap is
174
177
  optional; use `--max-cost USD` to set one. Without a cap, the service bounds
175
178
  admission using your available wallet credit and its service maximum. An
176
- explicit cap is never silently raised. Native multi-model groups and matched
177
- comparisons also start without a required quote or cap. `--mode matched` pins
178
- the same benchmark tasks for every model; separate mode runs each model on its
179
- compatible subset. Native actual-usage routes charge recorded usage, including
180
- usage above a live-call hold for work already sent. A negative wallet stops new
181
- dispatches until credit is added. Accepted historical quotes keep their terms.
179
+ explicit cap is never silently raised. Supported native separate groups and matched comparisons also accept an optional aggregate cap. Other execution paths retain their compatibility, funding and quote requirements.
182
180
 
183
181
  For scripts, approve paid work explicitly and retain the operation identity:
184
182
 
185
183
  ```sh
186
184
  evalrouter run BENCHMARK_SLUG --model MODEL_ID --sample 3 --yes --json
187
- evalrouter run BENCHMARK_SLUG --model MODEL_A --model MODEL_B --mode matched --sample 3 --yes --json
188
185
  evalrouter status
189
186
  evalrouter wait RUN_ID
190
187
  evalrouter results RUN_ID
@@ -229,12 +226,11 @@ supported formats, source management and permissions.
229
226
 
230
227
  ## Python client
231
228
 
232
- Install this alpha with `python -m pip install --pre evalrouter` in your application's environment. The
229
+ Install with `python -m pip install evalrouter` in your application's environment. The
233
230
  import name is `evalrouter`; the client supports context-manager cleanup:
234
231
 
235
232
  Canonical imports require a release containing this namespace. Older registry
236
- releases through 0.3.24 use `kimpton_evalrouter`. Select alpha releases explicitly
237
- to use the canonical `evalrouter` import and current tracing APIs.
233
+ releases through 0.3.24 use `kimpton_evalrouter`. Current releases provide the canonical `evalrouter` import.
238
234
 
239
235
  ```python
240
236
  import os
@@ -254,6 +250,62 @@ ID can start paid work. Keep the quote ID and idempotency key before submission.
254
250
  The [model API guide](https://evalrouter.ai/developers/docs/model-api) describes
255
251
  request fields, limits and result contracts.
256
252
 
253
+ ## Evaluate an agent you run
254
+
255
+ `evalrouter.agents` evaluates an agent on EvalRouter tasks while the agent runs
256
+ on your machine. EvalRouter delivers each task, meters every model call through
257
+ the run's gateway (managed models only), grades the submission with the
258
+ benchmark's own grader and records the trajectory. It is available where your
259
+ workspace has agent evaluation enabled; otherwise quoting refuses with
260
+ `client_run_unavailable`.
261
+
262
+ The agent can be an ACP Registry agent (`registry_agent("opencode")`), any
263
+ local ACP command (`local_agent("my-agent --acp")`, which needs
264
+ `evalrouter[agents]`), or an agent written in Python:
265
+
266
+ ```python
267
+ from evalrouter import Client, agents
268
+
269
+
270
+ class Solver(agents.Agent):
271
+ name = "my solver"
272
+
273
+ async def run(self, context):
274
+ task = await context.task.task()
275
+ reply = await context.gateway.chat(messages=task["messages"])
276
+ await context.task.submit(reply["choices"][0]["message"]["content"])
277
+ await context.task.done()
278
+
279
+
280
+ client = Client()
281
+ evaluation = agents.quote(
282
+ client,
283
+ agent=Solver(),
284
+ model="ADMITTED_ROUTE_ID",
285
+ tasks=agents.benchmark("eval://PROVIDER/NAME/VERSION"),
286
+ coverage={"mode": "sample", "sample_count": 3, "seed": 42},
287
+ budget_usd="2",
288
+ )
289
+ # Review evaluation.quote before starting; nothing is charged until start().
290
+ run = evaluation.start()
291
+ for event in run.events(): # or: async for event in run.events_async()
292
+ print(event.type, event.task_ref, event.failure_code or "")
293
+ print(run.wait()["status"], run.results())
294
+ ```
295
+
296
+ Tasks can also come from an environment version (`agents.environment(REF,
297
+ split="test")`), your private benchmarks (`agents.private_benchmark(ID)`) or a
298
+ suite. `context.task` offers the attempt's task tools (`call`, `list`,
299
+ `instructions`, `task`, `submit`, `done`); file tasks are written in
300
+ `context.workspace`. `context.gateway` is OpenAI chat-compatible
301
+ (`gateway.openai()` returns an `AsyncOpenAI` client when `openai` is installed).
302
+ Leaving the event loop early finishes the attempt in flight as an interrupted
303
+ controller; `agents.AgentRun.resume(client, RUN_ID, agent)` continues the run
304
+ with the same agent, and `run.cancel()` stops it. `run.costs()`,
305
+ `run.export("csv")`, `run.trajectories()` and `agents.compare(client, [run_a,
306
+ run_b])` read the finalized results. `agents.evaluate(...)` does all of this in
307
+ one call. The CLI's `evalrouter run --agent` uses the same functions.
308
+
257
309
  ## Import LangSmith traces
258
310
 
259
311
  The optional `langsmith` extra provides a local connector for completed agent
@@ -263,7 +315,7 @@ EvalRouter environment variables through your secret manager. The source key
263
315
  is never sent to EvalRouter.
264
316
 
265
317
  ```sh
266
- python -m pip install --pre 'evalrouter[langsmith]'
318
+ python -m pip install 'evalrouter[langsmith]'
267
319
  python -m evalrouter.langsmith projects
268
320
  python -m evalrouter.langsmith sync --project 'YOUR_PROJECT_ID' \
269
321
  --state './.private/evalrouter-langsmith-state.json' --metadata-only --watch
@@ -287,10 +339,10 @@ observed coverage, not proof that every upstream child exists.
287
339
 
288
340
  ## Live agent capture
289
341
 
290
- Install the alpha with `python -m pip install --pre 'evalrouter[tracing]'` in your agent's own environment.
342
+ Install with `python -m pip install 'evalrouter[tracing]'` in your agent's own environment.
291
343
  Configure `EVALROUTER_BASE_URL`, `EVALROUTER_WORKSPACE_ID`,
292
344
  `EVALROUTER_TRACE_CONNECTION_ID` and the restricted `EVALROUTER_TRACE_KEY` through
293
- an authorized secret manager. Install alpha releases explicitly; an ordinary install selects the stable release.
345
+ an authorized secret manager. Package installation and connection authorization are separate.
294
346
 
295
347
  ```python
296
348
  import json
@@ -349,7 +401,7 @@ your workspace. Detailed delivery receipts are described in the trace connection
349
401
 
350
402
  ## Attach existing OpenTelemetry instrumentation
351
403
 
352
- Install the alpha `evalrouter[tracing]` extra into your existing Python
404
+ Install the `evalrouter[tracing]` extra into your existing Python
353
405
  3.12/3.13 agent environment. Pass the OTel SDK provider the framework actually
354
406
  uses; do not replace its global provider. No agent inheritance or per-call
355
407
  EvalRouter wrappers are required for supported spans:
@@ -384,10 +436,9 @@ imports and ACP evaluation execution are separate integrations.
384
436
 
385
437
  ## Native multi-model client requests
386
438
 
387
- The methods below require a client build containing native direct-group support;
388
- use the supplied candidate archive until that release is published. Native group
389
- service availability is controlled separately. Matched comparison launches keep
390
- their existing quote/cap flow.
439
+ Supported native separate groups and matched comparisons start directly with an
440
+ optional aggregate spending cap. Other execution paths retain their quote and
441
+ cap requirements. Hosted route availability is checked by the service.
391
442
 
392
443
  ```python
393
444
  from evalrouter import Client
@@ -13,18 +13,18 @@ SDK License, included as `LICENSE` in the package.
13
13
  We recommend [uv](https://docs.astral.sh/uv/getting-started/installation/) to install the CLI in its own Python environment:
14
14
 
15
15
  ```sh
16
- uv tool install --prerelease allow evalrouter
16
+ uv tool install evalrouter
17
17
  evalrouter
18
18
  ```
19
19
 
20
- For this alpha, use `python -m pip install --pre evalrouter` in a Python 3.12 or 3.13 environment.
20
+ With pip, use `python -m pip install evalrouter` in a Python 3.12 or 3.13 environment.
21
21
  uv selects a compatible Python for the CLI and downloads one if needed. If
22
22
  your shell cannot find `evalrouter`, run `uv tool update-shell` and restart your
23
23
  terminal. Upgrade an existing installation with `evalrouter upgrade` (or
24
- `evalrouter --upgrade`). Alpha, beta and rc installations include prereleases
25
- automatically; stable installations stay on stable unless you pass `--pre`.
26
- The command uses uv, pipx or pip in the current virtual environment. Source
27
- installs, system Python and installer-pinned versions need their original installer.
24
+ `evalrouter --upgrade`). Stable installations stay on stable unless you pass
25
+ `--pre`; installed prereleases include prereleases automatically. The command
26
+ uses uv, pipx or pip in the current virtual environment. Source installs,
27
+ system Python and installer-pinned versions need their original installer.
28
28
  Check the installed version with `evalrouter --version`. Use `evalrouter --help`
29
29
  for explicit commands, or see the [CLI guide](https://evalrouter.ai/developers/docs/cli).
30
30
 
@@ -96,14 +96,14 @@ workspace. Choose **Account and workspace → Sign in** to connect your account.
96
96
  Local sign-in returns from the browser to the waiting CLI; for a remote terminal,
97
97
  use `evalrouter login --no-browser` and approve the code on a device with a browser.
98
98
 
99
- **Run a benchmark** guides you through the benchmark, one to eight models, each
99
+ **Run a benchmark** guides you through the benchmark, your selected compatible models, each
100
100
  model's reasoning settings and coverage. Type to filter lists; Space or Enter
101
101
  toggles a model and Tab continues. A supported native one-model evaluation
102
102
  starts directly with the optional `--max-cost` cap or available wallet credit,
103
103
  limited by the service maximum. Supported native separate multi-model groups
104
104
  also start directly, with an optional aggregate cap. Their finite service bounds
105
105
  do not reserve the wallet once per model: mandatory fees and live calls use
106
- shared available credit. Matched comparisons retain their quote and required cap.
106
+ shared available credit. Supported native matched comparisons also start directly with an optional cap; unsupported execution paths retain their quote and cap requirements.
107
107
 
108
108
  Choose a suggested sample, **Custom sample size**, or **Full benchmark** for
109
109
  coverage. A custom sample accepts 1 to 1,000 tasks, limited to the benchmark's
@@ -137,18 +137,12 @@ evalrouter run BENCHMARK_SLUG --model MODEL_ID --sample 3
137
137
  Supported native single-model benchmarks start directly. A spending cap is
138
138
  optional; use `--max-cost USD` to set one. Without a cap, the service bounds
139
139
  admission using your available wallet credit and its service maximum. An
140
- explicit cap is never silently raised. Native multi-model groups and matched
141
- comparisons also start without a required quote or cap. `--mode matched` pins
142
- the same benchmark tasks for every model; separate mode runs each model on its
143
- compatible subset. Native actual-usage routes charge recorded usage, including
144
- usage above a live-call hold for work already sent. A negative wallet stops new
145
- dispatches until credit is added. Accepted historical quotes keep their terms.
140
+ explicit cap is never silently raised. Supported native separate groups and matched comparisons also accept an optional aggregate cap. Other execution paths retain their compatibility, funding and quote requirements.
146
141
 
147
142
  For scripts, approve paid work explicitly and retain the operation identity:
148
143
 
149
144
  ```sh
150
145
  evalrouter run BENCHMARK_SLUG --model MODEL_ID --sample 3 --yes --json
151
- evalrouter run BENCHMARK_SLUG --model MODEL_A --model MODEL_B --mode matched --sample 3 --yes --json
152
146
  evalrouter status
153
147
  evalrouter wait RUN_ID
154
148
  evalrouter results RUN_ID
@@ -193,12 +187,11 @@ supported formats, source management and permissions.
193
187
 
194
188
  ## Python client
195
189
 
196
- Install this alpha with `python -m pip install --pre evalrouter` in your application's environment. The
190
+ Install with `python -m pip install evalrouter` in your application's environment. The
197
191
  import name is `evalrouter`; the client supports context-manager cleanup:
198
192
 
199
193
  Canonical imports require a release containing this namespace. Older registry
200
- releases through 0.3.24 use `kimpton_evalrouter`. Select alpha releases explicitly
201
- to use the canonical `evalrouter` import and current tracing APIs.
194
+ releases through 0.3.24 use `kimpton_evalrouter`. Current releases provide the canonical `evalrouter` import.
202
195
 
203
196
  ```python
204
197
  import os
@@ -218,6 +211,62 @@ ID can start paid work. Keep the quote ID and idempotency key before submission.
218
211
  The [model API guide](https://evalrouter.ai/developers/docs/model-api) describes
219
212
  request fields, limits and result contracts.
220
213
 
214
+ ## Evaluate an agent you run
215
+
216
+ `evalrouter.agents` evaluates an agent on EvalRouter tasks while the agent runs
217
+ on your machine. EvalRouter delivers each task, meters every model call through
218
+ the run's gateway (managed models only), grades the submission with the
219
+ benchmark's own grader and records the trajectory. It is available where your
220
+ workspace has agent evaluation enabled; otherwise quoting refuses with
221
+ `client_run_unavailable`.
222
+
223
+ The agent can be an ACP Registry agent (`registry_agent("opencode")`), any
224
+ local ACP command (`local_agent("my-agent --acp")`, which needs
225
+ `evalrouter[agents]`), or an agent written in Python:
226
+
227
+ ```python
228
+ from evalrouter import Client, agents
229
+
230
+
231
+ class Solver(agents.Agent):
232
+ name = "my solver"
233
+
234
+ async def run(self, context):
235
+ task = await context.task.task()
236
+ reply = await context.gateway.chat(messages=task["messages"])
237
+ await context.task.submit(reply["choices"][0]["message"]["content"])
238
+ await context.task.done()
239
+
240
+
241
+ client = Client()
242
+ evaluation = agents.quote(
243
+ client,
244
+ agent=Solver(),
245
+ model="ADMITTED_ROUTE_ID",
246
+ tasks=agents.benchmark("eval://PROVIDER/NAME/VERSION"),
247
+ coverage={"mode": "sample", "sample_count": 3, "seed": 42},
248
+ budget_usd="2",
249
+ )
250
+ # Review evaluation.quote before starting; nothing is charged until start().
251
+ run = evaluation.start()
252
+ for event in run.events(): # or: async for event in run.events_async()
253
+ print(event.type, event.task_ref, event.failure_code or "")
254
+ print(run.wait()["status"], run.results())
255
+ ```
256
+
257
+ Tasks can also come from an environment version (`agents.environment(REF,
258
+ split="test")`), your private benchmarks (`agents.private_benchmark(ID)`) or a
259
+ suite. `context.task` offers the attempt's task tools (`call`, `list`,
260
+ `instructions`, `task`, `submit`, `done`); file tasks are written in
261
+ `context.workspace`. `context.gateway` is OpenAI chat-compatible
262
+ (`gateway.openai()` returns an `AsyncOpenAI` client when `openai` is installed).
263
+ Leaving the event loop early finishes the attempt in flight as an interrupted
264
+ controller; `agents.AgentRun.resume(client, RUN_ID, agent)` continues the run
265
+ with the same agent, and `run.cancel()` stops it. `run.costs()`,
266
+ `run.export("csv")`, `run.trajectories()` and `agents.compare(client, [run_a,
267
+ run_b])` read the finalized results. `agents.evaluate(...)` does all of this in
268
+ one call. The CLI's `evalrouter run --agent` uses the same functions.
269
+
221
270
  ## Import LangSmith traces
222
271
 
223
272
  The optional `langsmith` extra provides a local connector for completed agent
@@ -227,7 +276,7 @@ EvalRouter environment variables through your secret manager. The source key
227
276
  is never sent to EvalRouter.
228
277
 
229
278
  ```sh
230
- python -m pip install --pre 'evalrouter[langsmith]'
279
+ python -m pip install 'evalrouter[langsmith]'
231
280
  python -m evalrouter.langsmith projects
232
281
  python -m evalrouter.langsmith sync --project 'YOUR_PROJECT_ID' \
233
282
  --state './.private/evalrouter-langsmith-state.json' --metadata-only --watch
@@ -251,10 +300,10 @@ observed coverage, not proof that every upstream child exists.
251
300
 
252
301
  ## Live agent capture
253
302
 
254
- Install the alpha with `python -m pip install --pre 'evalrouter[tracing]'` in your agent's own environment.
303
+ Install with `python -m pip install 'evalrouter[tracing]'` in your agent's own environment.
255
304
  Configure `EVALROUTER_BASE_URL`, `EVALROUTER_WORKSPACE_ID`,
256
305
  `EVALROUTER_TRACE_CONNECTION_ID` and the restricted `EVALROUTER_TRACE_KEY` through
257
- an authorized secret manager. Install alpha releases explicitly; an ordinary install selects the stable release.
306
+ an authorized secret manager. Package installation and connection authorization are separate.
258
307
 
259
308
  ```python
260
309
  import json
@@ -313,7 +362,7 @@ your workspace. Detailed delivery receipts are described in the trace connection
313
362
 
314
363
  ## Attach existing OpenTelemetry instrumentation
315
364
 
316
- Install the alpha `evalrouter[tracing]` extra into your existing Python
365
+ Install the `evalrouter[tracing]` extra into your existing Python
317
366
  3.12/3.13 agent environment. Pass the OTel SDK provider the framework actually
318
367
  uses; do not replace its global provider. No agent inheritance or per-call
319
368
  EvalRouter wrappers are required for supported spans:
@@ -348,10 +397,9 @@ imports and ACP evaluation execution are separate integrations.
348
397
 
349
398
  ## Native multi-model client requests
350
399
 
351
- The methods below require a client build containing native direct-group support;
352
- use the supplied candidate archive until that release is published. Native group
353
- service availability is controlled separately. Matched comparison launches keep
354
- their existing quote/cap flow.
400
+ Supported native separate groups and matched comparisons start directly with an
401
+ optional aggregate spending cap. Other execution paths retain their quote and
402
+ cap requirements. Hosted route availability is checked by the service.
355
403
 
356
404
  ```python
357
405
  from evalrouter import Client
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "evalrouter"
7
- version = "0.4.0a7"
7
+ version = "0.4.2"
8
8
  description = "Interactive evaluation workspace, command-line tools, and Python client for EvalRouter"
9
9
  readme = "README.md"
10
10
  license = "LicenseRef-Kimpton-EvalRouter-SDK"
@@ -44,6 +44,9 @@ benchmark = ["pydantic==2.13.5"]
44
44
  # installed; otherwise it uses a private 0600 file. Kept optional so the base
45
45
  # installation and every service/runner lock stay unchanged.
46
46
  keyring = ["keyring==25.7.0"]
47
+ # Agent evaluations (`evalrouter run --agent`): the ACP SDK the bundled controller
48
+ # (packages/agents acp_client.py) is pinned to, and its one dependency.
49
+ agents = ["agent-client-protocol==0.12.1", "pydantic==2.13.5"]
47
50
  # Pull LangSmith projects into a local EvalRouter live trace connection.
48
51
  langsmith = ["langsmith==0.12.6"]
49
52
 
@@ -0,0 +1,63 @@
1
+ """Evaluate agents on EvalRouter tasks on this machine (registry, local ACP or in-code agents)."""
2
+
3
+ from kimpton_evalrouter.agents import (
4
+ Agent,
5
+ AgentContext,
6
+ AgentEvaluation,
7
+ AgentRun,
8
+ AttemptEvent,
9
+ AttemptInfo,
10
+ AttemptOutcome,
11
+ EvaluationResult,
12
+ Gateway,
13
+ LocalAgent,
14
+ PreparedAgent,
15
+ RegistryAgent,
16
+ TaskTools,
17
+ benchmark,
18
+ compare,
19
+ define_agent,
20
+ environment,
21
+ evaluate,
22
+ evaluate_agents,
23
+ evaluate_async,
24
+ local_agent,
25
+ parse_agent,
26
+ private_benchmark,
27
+ quote,
28
+ quote_async,
29
+ registry_agent,
30
+ suite,
31
+ usd_to_micro,
32
+ )
33
+
34
+ __all__ = [
35
+ "Agent",
36
+ "AgentContext",
37
+ "AgentEvaluation",
38
+ "AgentRun",
39
+ "AttemptEvent",
40
+ "AttemptInfo",
41
+ "AttemptOutcome",
42
+ "EvaluationResult",
43
+ "Gateway",
44
+ "LocalAgent",
45
+ "PreparedAgent",
46
+ "RegistryAgent",
47
+ "TaskTools",
48
+ "benchmark",
49
+ "compare",
50
+ "define_agent",
51
+ "environment",
52
+ "evaluate",
53
+ "evaluate_agents",
54
+ "evaluate_async",
55
+ "local_agent",
56
+ "parse_agent",
57
+ "private_benchmark",
58
+ "quote",
59
+ "quote_async",
60
+ "registry_agent",
61
+ "suite",
62
+ "usd_to_micro",
63
+ ]
@@ -8,4 +8,4 @@ computes digests and refuses invalid packages; it never imports contributed
8
8
  code, opens a network connection, signs anything or carries operator state.
9
9
  """
10
10
 
11
- __version__ = "0.4.0a7"
11
+ __version__ = "0.4.2"
@@ -6,27 +6,30 @@ from typing import Any as _Any
6
6
  from . import types
7
7
  from ._resources import AgentBuilds as _AgentBuilds
8
8
  from ._resources import Agents as _Agents
9
- from ._resources import Campaigns as _Campaigns
10
- from ._resources import CampaignTemplates as _CampaignTemplates
11
9
  from ._resources import Catalog as _Catalog
10
+ from ._resources import ClientRuns as _ClientRuns
12
11
  from ._resources import Comparisons as _Comparisons
13
12
  from ._resources import Connections as _Connections
14
- from ._resources import CreatorProviders as _CreatorProviders
15
13
  from ._resources import Creators as _Creators
16
14
  from ._resources import Datasets as _Datasets
17
- from ._resources import EnvironmentChecks as _EnvironmentChecks
18
- from ._resources import EnvironmentDrafts as _EnvironmentDrafts
19
- from ._resources import EnvironmentPreparations as _EnvironmentPreparations
20
15
  from ._resources import Environments as _Environments
21
16
  from ._resources import Evals as _Evals
17
+ from ._resources import EvaluationJobs as _EvaluationJobs
22
18
  from ._resources import Evaluations as _Evaluations
23
19
  from ._resources import Protocols as _Protocols
24
20
  from ._resources import Quotes as _Quotes
25
21
  from ._resources import Regrades as _Regrades
22
+ from ._resources import Releases as _Releases
23
+ from ._resources import RemoteScorers as _RemoteScorers
24
+ from ._resources import ResultGroups as _ResultGroups
26
25
  from ._resources import RunGroups as _RunGroups
27
26
  from ._resources import Runs as _Runs
28
27
  from ._resources import TraceDiscovery as _TraceDiscovery
28
+ from ._resources import TraceIntegrations as _TraceIntegrations
29
29
  from ._resources import Traces as _Traces
30
+ from ._resources import Tune as _Tune
31
+ from ._resources import TuneMonitors as _TuneMonitors
32
+ from ._resources import WorkloadEvaluators as _WorkloadEvaluators
30
33
  from ._transport import APIError, ClientError, RequestOptions, RequestTimeout, WaitCancelled
31
34
  from ._transport import Transport as _Transport
32
35
 
@@ -45,29 +48,41 @@ __all__ = [
45
48
  "WaitCancelled",
46
49
  "types",
47
50
  ]
48
- __version__ = "0.4.0a7"
51
+ __version__ = "0.4.2"
49
52
 
50
53
 
51
54
  class Client(_Transport):
52
55
  @_cached_property
53
- def environment_drafts(self) -> _EnvironmentDrafts:
54
- return _EnvironmentDrafts(self)
56
+ def releases(self) -> _Releases:
57
+ return _Releases(self)
55
58
 
56
- @property
57
- def environments(self) -> _Environments:
58
- return _Environments(self)
59
+ @_cached_property
60
+ def remote_scorers(self) -> _RemoteScorers:
61
+ return _RemoteScorers(self)
59
62
 
60
63
  @_cached_property
61
- def environment_preparations(self) -> _EnvironmentPreparations:
62
- return _EnvironmentPreparations(self)
64
+ def tune_monitors(self) -> _TuneMonitors:
65
+ return _TuneMonitors(self)
63
66
 
64
67
  @_cached_property
65
- def creator_providers(self) -> _CreatorProviders:
66
- return _CreatorProviders(self)
68
+ def tune(self) -> _Tune:
69
+ return _Tune(self)
67
70
 
68
71
  @_cached_property
69
- def environment_checks(self) -> _EnvironmentChecks:
70
- return _EnvironmentChecks(self)
72
+ def workload_evaluators(self) -> _WorkloadEvaluators:
73
+ return _WorkloadEvaluators(self)
74
+
75
+ @_cached_property
76
+ def trace_integrations(self) -> _TraceIntegrations:
77
+ return _TraceIntegrations(self)
78
+
79
+
80
+ @property
81
+ def environments(self) -> _Environments:
82
+ return _Environments(self)
83
+
84
+
85
+
71
86
 
72
87
  @_cached_property
73
88
  def traces(self) -> _Traces:
@@ -97,6 +112,10 @@ class Client(_Transport):
97
112
  def connections(self) -> _Connections:
98
113
  return _Connections(self)
99
114
 
115
+ @_cached_property
116
+ def client_runs(self) -> _ClientRuns:
117
+ return _ClientRuns(self)
118
+
100
119
  @_cached_property
101
120
  def comparisons(self) -> _Comparisons:
102
121
  return _Comparisons(self)
@@ -130,12 +149,14 @@ class Client(_Transport):
130
149
  return _Evaluations(self)
131
150
 
132
151
  @_cached_property
133
- def campaigns(self) -> _Campaigns:
134
- return _Campaigns(self)
152
+ def evaluation_jobs(self) -> _EvaluationJobs:
153
+ return _EvaluationJobs(self)
154
+
155
+
135
156
 
136
157
  @_cached_property
137
- def campaign_templates(self) -> _CampaignTemplates:
138
- return _CampaignTemplates(self)
158
+ def result_groups(self) -> _ResultGroups:
159
+ return _ResultGroups(self)
139
160
 
140
161
  @_cached_property
141
162
  def run_groups(self) -> _RunGroups:
@@ -157,26 +178,52 @@ class Client(_Transport):
157
178
  timeout: float = 3600,
158
179
  poll_interval: float = 2,
159
180
  concurrency: str | int | None = _AUTO_CONCURRENCY,
181
+ agent: str | None = None,
182
+ agent_name: str | None = None,
183
+ allow_unverified_agent: bool = False,
160
184
  ) -> "types.RunRecord":
161
185
  """The canonical call: route `eval` to whichever provider owns it and run it.
162
186
 
163
187
  `model` is a managed route id or `connection:<uuid>`;
164
188
  `eval` is `eval://provider/name/version` or `name@version`. Returns the
165
189
  terminal run when `wait` is true, otherwise the admitted run.
166
- A supported native benchmark may omit its cap: the server freezes a
167
- finite cap from available wallet credit and returns `cap_microusd`.
190
+ One-time evaluations use available wallet credit for each operation.
168
191
  """
169
192
  from uuid import uuid4
170
193
 
194
+ if agent is not None:
195
+ # An ACP agent runs on this machine: an ACP Registry `id[@version]` or
196
+ # `local:<command>`. `model` must be a managed route, used only
197
+ # through the run's metered gateway. Needs evalrouter[agents].
198
+ # `evalrouter.agents` is the full programmable interface.
199
+ from . import agents
200
+
201
+ result = agents.evaluate(
202
+ self,
203
+ agent=agents.parse_agent(
204
+ agent, name=agent_name, allow_unverified=allow_unverified_agent
205
+ ),
206
+ model=model,
207
+ tasks=eval,
208
+ max_charge_microusd=max_charge_microusd,
209
+ budget_usd=None if max_charge_microusd is not None else budget_usd,
210
+ coverage=coverage,
211
+ name=name,
212
+ wait=wait,
213
+ timeout=timeout,
214
+ poll_interval=poll_interval,
215
+ )
216
+ return result.record if wait else self.runs.get(result.run.id)
217
+ if budget_usd is not None or max_charge_microusd is not None:
218
+ raise ClientError(
219
+ "spending_cap_removed",
220
+ "One-time evaluations use available wallet credit. Remove the spending cap argument.",
221
+ )
171
222
  body: dict = {"model": model, "eval": eval, "name": name, "metadata": metadata or {}}
172
223
  if provider:
173
224
  body["provider"] = provider
174
225
  if coverage:
175
226
  body["coverage"] = coverage
176
- if max_charge_microusd is not None:
177
- body["max_charge_microusd"] = max_charge_microusd
178
- elif budget_usd is not None:
179
- body["budget_usd"] = str(budget_usd)
180
227
  if concurrency is not None:
181
228
  body["concurrency"] = "auto" if concurrency is _AUTO_CONCURRENCY else concurrency
182
229
  key = idempotency_key or f"run-{uuid4()}"