Repository navigation
Conversation
…d traces An `activeagent` executable in the gem (stdlib OptionParser and Net::HTTP, no new dependencies) that works with a dashboard over HTTP: login/logout with 0600 profiles and env overrides for CI, status, evals list/runs/run/report/import, catalogs list/import, agents list and traces list, with --json output and distinct exit codes. `evals run --min-pass-rate` waits for the run and exits 4 below the threshold. Reads and runs go through the MCP facade's dashboard tools with a dashboard API key; import and report use the report collector with the ingest key, which the dashboard authenticates separately. `evals report --format json|html|md` targets the export endpoint the report export branch adds. Commands whose routes are session-only today (catalog export and import preview, agent versions) exit 5 and name the route they need. Refs #619 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KhpgqyUrmSDK8cLDSheH3W
This was referenced Oct 21, 2026
The CLI entry moves into an Unreleased section: 1.9.3 shipped without it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RSuPEbVwjxwJub8eAmGM9N
…s, trace export and import The three commands that exited 5 for lack of an API-key route now work. The MCP facade gains catalogs_export (a catalog's canonical document as YAML or JSON, whole or one product or set), catalogs_preview (what an import would change, writing nothing) and agents_versions (what GET /api/agents/:id/versions lists), and catalogs_import takes mode as the API does. Traces move between dashboards the way runs do: traces_export returns one trace whole, as the payload trace ingest takes, and `traces export` and `traces import` write and post it, the import with the ingest key; `traces get` reads one. Every run summary carries run_id, the handle the report export and `evals report` take, which `evals runs` shows and the CI gate prints. `evals report` runs against the export that shipped in 1.9.3: a run id the dashboard holds no complete run under exits 1, a dashboard that predates the export exits 5. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RSuPEbVwjxwJub8eAmGM9N
Both Unreleased sections are kept: the CLI under Added, #623's badge under Changed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RSuPEbVwjxwJub8eAmGM9N
…ke or UI AGENTS.md gains the CLI and the evals library in its quick reference, a section on the command line as the gem's third surface (what it may load, which endpoint each command answers through, the rule that a dashboard feature ships with its CLI command, API-key endpoint and UI together, how a command and a facade tool are added, where the tests and docs live), the facade's dashboard tools and the run_id every run summary carries, the CLI test files, and the placeholder provider keys a full local run needs. The gem and engine READMEs, the docs index, the dashboard, evaluations, self-hosted observability and telemetry pages point at the CLI commands beside the rake tasks, downloads and ingest routes they already describe, and the run fields list run_id. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RSuPEbVwjxwJub8eAmGM9N
… needs Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RSuPEbVwjxwJub8eAmGM9N
TonsOfFun
marked this pull request as ready for review
October 22, 2026 15:24
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #619. Targets 1.9.4: the framework and the dashboard engine move together, with no migration.
The
activeagentCLI: an executable in theactiveagentgem (exe/activeagent, stdlibOptionParser+Net::HTTP, no new runtime dependencies). It loads neither Rails nor the framework. HTTP, auth and error handling followActiveAgent::Evals::Publisher: bounded timeouts, no redirects, HTTPS except on loopback, and server messages sanitized with the keys filtered out.Merged with
mainafter 1.9.3:evals reportreads the report export that shipped in #621, and the three commands that exited 5 for lack of an API-key route (catalogs export,catalogs import --preview,agents versions) now have one, as new tools on the MCP facade. Against a 1.9.4 dashboard with its dashboard tools on, nothing exits 5; a 1.9.3 dashboard answers those three andtraces exportwith exit 5.Two keys
POST <mount>/mcp) takes a dashboard API key (ApiKey,aa_...): every read and runActionAgent.ingest_api_key, or the tenant'stelemetry_api_key):evals import/evals report(<mount>/api/evaluation_reports) andtraces import(<mount>/api/traces)A profile stores
api_keyplus an optionalingest_key(defaults toapi_key);--ingest-keyandACTIVEAGENT_INGEST_KEYset it.statuschecks both.Commands
login [--url --key --ingest-key --profile --no-verify],logout,statusinitialize;Publisher#verify!on the collectorevals list [--agent --limit]evaluations_listevals runs EVALUATION(id or name; shows each run'sRUN_ID)evaluations_getevals run EVALUATION [--models --keys --group --sandbox --wait --min-pass-rate --timeout --interval]evaluations_run, thenevaluation_runs_get; exit 4 below the gate, prints theevals reportcommand for the runevals report RUN --format json|html|md [-o FILE]GET <mount>/api/evaluation_reports/:run_idevals import FILE [--run-id --source --agent --suite]POST <mount>/api/evaluation_reportscatalogs listcatalogs_listcatalogs import FILE [--name KEY] [--mode replace|merge]catalogs_import(now takesmode)catalogs import FILE --previewcatalogs_preview(new)catalogs export KEY [--product KEY [--set KEY]] [--format yaml|json] [-o FILE]catalogs_export(new)agents listresources/listagents versions AGENT [--limit]agents_versions(new)traces list [--agent --since 6h --status --service --limit]traces_searchtraces get TRACEtraces_gettraces export TRACE [-o FILE]traces_export(new)traces import FILEPOST <mount>/api/tracesEvery command takes
--json,--profileand--url. Exit codes: 0 ok, 1 failed, 2 usage, 3 not configured, 4 evaluation gate failed, 5 the dashboard does not offer what the command needs (an older engine, orActionAgent.mcp_dashboard_tools = false). Profiles are stored in~/.config/activeagent/credentials.yml($XDG_CONFIG_HOMEwhen set), written0600in a0700directory.ACTIVEAGENT_URL,ACTIVEAGENT_API_KEY,ACTIVEAGENT_INGEST_KEYandACTIVEAGENT_PROFILEoverride the stored profile.JSON import/export between installs
A run, a catalog and a trace each move between dashboards as one file:
evals report RUN --format jsonwrites the version-1 envelopeevals importposts, so a run copied to another install and posted back where it came from is an identical retry (200).--format htmlis the standalone report page and--format mdits GitHub-flavored Markdown (... --format md | gh pr comment N --body-file -). A run id the dashboard holds no complete run under exits 1 (the collector's own 404); a dashboard with no export route exits 5 (Rails' 404).catalogs export KEYwrites the canonical document from the records (YAML, or--format json; a.jsonoutput file implies it), whole or one product or set, whichcatalogs importreads back (YAML reads JSON).--previewshows what the import would do (catalog created/updated/kept, counts of products, sets and scenarios created/updated/removed/kept, each change by path) and writes nothing;--mode mergekeeps what the document leaves out.traces export TRACEwrites the trace whole as the{ traces: [...], sdk }payload trace ingest takes (spans untruncated, the owner's credentials masked), andtraces import FILEposts it with the ingest key; an install skips atrace_idit already holds, so importing twice stores nothing more.Engine changes (
actionagent)catalogs_export,catalogs_preview,agents_versionsandtraces_export;catalogs_importtakesmodeasPOST /api/scenario_catalogsdoes. Listed in the facade'sinitializeinstructions and the docs table.EvaluationSerializer.run_summarycarriesrun_id(EvaluationReportExport.run_id_for: a published run's own, a dashboard run'sdashboard-run-<id>-<created_at>), soGET /api/evaluations,evaluations_get,evaluations_runandevaluation_runs_getall name the handle the report export takes. Nil on an install whose runs predate migration 010.AgentVersionSerializer(extracted fromAgentsController#version_json, same JSON) andScenarioCatalog#export_catalog(theActiveAgent::Evals::Catalogthat#export_yamlnow wraps).Tests
test/cli/cli_test.rb: 39 standalone WebMock tests (no Rails loaded, as the executable runs): profiles and permissions, environment precedence, keys filtered from errors, every command, the gate, the report formats and their 404/422 cases, catalog preview/export, agent versions, trace get/export/import.actionagent/test/cli_contract_test.rb: 10 contract tests that hand the CLI's requests to the dummy app (WebMockto_rack): status, import → list → runs → report (JSON round trip posted back as a duplicate, Markdown, HTML), catalog import → export (whole and one set, YAML and JSON) → preview → merge, agent versions with diffs, trace export → import → get → list.actionagent/test/mcp_dashboard_tools_test.rb: the four new tools (export re-ingests throughPOST /api/traces, tenant scoping, secret masking, narrowing, import mode, every refusal).bin/teston the merged tree under CI's placeholder keys: 4150 runs, 0 failures, 0 errors, 25 skips.bin/rubocopon every changed file: no offenses.gem buildpackagesexe/activeagentandlib/active_agent/cli/*.vitepress build docspasses.Docs
docs/framework/cli.md(sidebar: Framework → Command Line) is the page, with the dashboard version each command needs; a Command Line card on the docs index.AGENTS.md: the CLI and the evals library in the quick reference; a section on the command line as the gem's third surface (what it may load, which endpoint each command answers through, the rule from Add an activeagent CLI for core dashboard features (evals, catalogs, reports) #619 that a dashboard feature ships with its CLI command, API-key endpoint and UI together, how a command and a facade tool are added, where the tests live); the facade's dashboard tools and therun_idevery run summary carries; the CLI test files and the placeholder provider keys a full localbin/testneeds.docs/evals/publication.mdgets theevals report/evals importround trip.Left as is, on purpose: the collector and trace ingest take the ingest key rather than a dashboard
ApiKey, so one key does not cover every command; the profile'singest_keycovers the difference.🤖 Generated with Claude Code
https://claude.ai/code/session_01RSuPEbVwjxwJub8eAmGM9N