Skip to content

Add verify-agent-server: an executable feature map and control CLI for the Agent Server API - #5621

Merged
enyst merged 18 commits into
mainfrom
claude/agent-server-api-feature-map-fw7sju
Oct 12, 2026
Merged

enyst merged 18 commits into
mainfrom
claude/agent-server-api-feature-map-fw7sju

Conversation

@enyst

@enyst enyst commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

HUMAN:
This PR is an experiment in how we could put agent-server under auto-testing and enforcement of API contracts.

The PR maps the agent-server REST/WS APIs, creates a client CLI for real-time commands and fixtures for actually testing live all/most of it, and is the result of ALSO running a bunch of agents with this tooling.

The first run resulted in finding a large amount of bugs, though most were low-risk/low-severity. The medium and high are not many; they were filed under their own issues.


AGENT:

I'm an AI agent based on Opus 5.5, helping Engel Nyst (@enyst) with project maintenance.

Why

The Agent Server's surface is large — about 190 REST and WebSocket routes on the default app, more in Docker runtime mode, plus webhooks, telemetry and the Python and TypeScript clients that consume it. Its users are agents and the programs that carry them. Unit tests, the OpenAPI breakage check and the live-server tests each cover part of it, but there was no single place where an agent can drive the real server through a feature end to end, know what it should observe, and tell a stale instruction from a product bug.

OpenHands/OpenHands has this for the Agent Canvas UI (verify-openhands), adapted from poteto's pstack verification skills. The agent-sdk had nothing equivalent for the API. This PR adds it. Closes #5617.

Summary

  • A contributor skill under .agents/skills/verify-agent-server/: a control CLI (control-agent-server), an executable feature map (34 families, one file each), and maintenance levers.
  • control-agent-server launches isolated servers from the checkout (private HOME, persistence, keys, port), drives any REST route or WebSocket with assertions, arranges fixtures (git repos, skills, plugins, MCP servers, webhook sinks, a scripted LLM stub), and records evidence with secrets redacted. Model-backed recipes use DeepSeek through the server's own pre-flight.
  • The feature map owns every agent-facing route exactly once (map coverage is green: 193 of 203 routes owned and driven, 10 deliberately excluded with reasons) and replays end to end on fresh servers (map run --all --fresh). Known product bugs are kept as expected failures, so a fix shows up as an unexpected pass.
  • Maintenance: route coverage, recipe parse-checks against the real CLI, route-table diffs between two commits, and owner lookup for changed files. One cross-repo test (tests/cross/test_verify_agent_server_skill.py) guards the CLI and the committed map's structure.
  • The mapping pass found product bugs along the way. They are filed as separate issues (31 new, 6 existing ones reproduced) and listed in the umbrella issue Agent Server bugs found by the verify-agent-server feature map (umbrella) #5653; the map keeps each as a known-bug bullet so its fix shows up as an unexpected pass. It already caught one: fix(agent-server): resolve linked providers for plaintext profile reads #4952 fixed RemoteWorkspace.get_llm() on provider-linked profiles while this was in progress, and the map flagged it.

Issue Number

Closes #5617.

How to Test

uv sync --dev
export PATH="$PWD/.agents/skills/verify-agent-server/scripts:$PATH"
export DEEPSEEK_API_KEY=...            # for model-backed families
control-agent-server map check         # headings, IDs, recipes parse, routes exist
control-agent-server map coverage      # every route owned and driven
control-agent-server map run --file F01 --fresh --record   # one family end to end
uv run pytest tests/cross/test_verify_agent_server_skill.py

map run --all --fresh replays the whole map (needs the machine prerequisites each family's Needs: line lists; control-agent-server capabilities reports what the current machine can drive and what is blocked). This change is docs-and-tooling only; it does not touch server or SDK code.

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

  • New files live under .agents/skills/verify-agent-server/ (an AgentSkills contributor skill) plus one cross-repo test; no runtime code changes.
  • The CLI drives raw HTTP and WebSocket rather than the TypeScript client (the client is itself a consumer under test, pinned to a released server and not wrapping every route); the SDK and TypeScript clients are covered as their own consumer families (F33, F34).
  • Evidence: a full fresh replay of all 34 families on this head is in .pr/verify-agent-server-replay.md: 771 pass, 156 known-bug expected failures, 6 blocked (Docker, GitHub token, VS Code binary, ChatGPT login), no failures and no unexpected passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01W9qxyUBKhzmbLrTK2wi7D7


🐳 Agent Server images for this PR — GHCR package, pull/run commands, and all pushed tags (click to expand)

• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python-slim amd64, arm64 python-node-runtime Link
python-minimal amd64, arm64 python-node-runtime Link
python amd64, arm64 python-node-runtime Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:3c940b8-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-3c940b8-python \
  ghcr.io/openhands/agent-server:3c940b8-python

All tags pushed for this build

ghcr.io/openhands/agent-server:3c940b8-golang-amd64
ghcr.io/openhands/agent-server:3c940b84eb09f46fbce812b509482e55b3071a0d-golang-amd64
ghcr.io/openhands/agent-server:claude-agent-server-api-feature-map-fw7sju-golang-amd64
ghcr.io/openhands/agent-server:3c940b8-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:3c940b8-golang-arm64
ghcr.io/openhands/agent-server:3c940b84eb09f46fbce812b509482e55b3071a0d-golang-arm64
ghcr.io/openhands/agent-server:claude-agent-server-api-feature-map-fw7sju-golang-arm64
ghcr.io/openhands/agent-server:3c940b8-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:3c940b8-java-amd64
ghcr.io/openhands/agent-server:3c940b84eb09f46fbce812b509482e55b3071a0d-java-amd64
ghcr.io/openhands/agent-server:claude-agent-server-api-feature-map-fw7sju-java-amd64
ghcr.io/openhands/agent-server:3c940b8-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:3c940b8-java-arm64
ghcr.io/openhands/agent-server:3c940b84eb09f46fbce812b509482e55b3071a0d-java-arm64
ghcr.io/openhands/agent-server:claude-agent-server-api-feature-map-fw7sju-java-arm64
ghcr.io/openhands/agent-server:3c940b8-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:3c940b8-python-amd64
ghcr.io/openhands/agent-server:3c940b84eb09f46fbce812b509482e55b3071a0d-python-amd64
ghcr.io/openhands/agent-server:claude-agent-server-api-feature-map-fw7sju-python-amd64
ghcr.io/openhands/agent-server:3c940b8-python-node-runtime-amd64
ghcr.io/openhands/agent-server:3c940b8-python-arm64
ghcr.io/openhands/agent-server:3c940b84eb09f46fbce812b509482e55b3071a0d-python-arm64
ghcr.io/openhands/agent-server:claude-agent-server-api-feature-map-fw7sju-python-arm64
ghcr.io/openhands/agent-server:3c940b8-python-node-runtime-arm64
ghcr.io/openhands/agent-server:3c940b8-python-minimal-amd64
ghcr.io/openhands/agent-server:3c940b84eb09f46fbce812b509482e55b3071a0d-python-minimal-amd64
ghcr.io/openhands/agent-server:claude-agent-server-api-feature-map-fw7sju-python-minimal-amd64
ghcr.io/openhands/agent-server:3c940b8-python-node-runtime-minimal-amd64
ghcr.io/openhands/agent-server:3c940b8-python-minimal-arm64
ghcr.io/openhands/agent-server:3c940b84eb09f46fbce812b509482e55b3071a0d-python-minimal-arm64
ghcr.io/openhands/agent-server:claude-agent-server-api-feature-map-fw7sju-python-minimal-arm64
ghcr.io/openhands/agent-server:3c940b8-python-node-runtime-minimal-arm64
ghcr.io/openhands/agent-server:3c940b8-python-slim-amd64
ghcr.io/openhands/agent-server:3c940b84eb09f46fbce812b509482e55b3071a0d-python-slim-amd64
ghcr.io/openhands/agent-server:claude-agent-server-api-feature-map-fw7sju-python-slim-amd64
ghcr.io/openhands/agent-server:3c940b8-python-node-runtime-slim-amd64
ghcr.io/openhands/agent-server:3c940b8-python-slim-arm64
ghcr.io/openhands/agent-server:3c940b84eb09f46fbce812b509482e55b3071a0d-python-slim-arm64
ghcr.io/openhands/agent-server:claude-agent-server-api-feature-map-fw7sju-python-slim-arm64
ghcr.io/openhands/agent-server:3c940b8-python-node-runtime-slim-arm64
ghcr.io/openhands/agent-server:3c940b8-golang
ghcr.io/openhands/agent-server:3c940b84eb09f46fbce812b509482e55b3071a0d-golang
ghcr.io/openhands/agent-server:claude-agent-server-api-feature-map-fw7sju-golang
ghcr.io/openhands/agent-server:3c940b8-golang_tag_1.21-bookworm
ghcr.io/openhands/agent-server:3c940b8-java
ghcr.io/openhands/agent-server:3c940b84eb09f46fbce812b509482e55b3071a0d-java
ghcr.io/openhands/agent-server:claude-agent-server-api-feature-map-fw7sju-java
ghcr.io/openhands/agent-server:3c940b8-eclipse-temurin_tag_17-jdk
ghcr.io/openhands/agent-server:3c940b8-python-minimal
ghcr.io/openhands/agent-server:3c940b84eb09f46fbce812b509482e55b3071a0d-python-minimal
ghcr.io/openhands/agent-server:claude-agent-server-api-feature-map-fw7sju-python-minimal
ghcr.io/openhands/agent-server:3c940b8-python-node-runtime-minimal
ghcr.io/openhands/agent-server:3c940b8-python-slim
ghcr.io/openhands/agent-server:3c940b84eb09f46fbce812b509482e55b3071a0d-python-slim
ghcr.io/openhands/agent-server:claude-agent-server-api-feature-map-fw7sju-python-slim
ghcr.io/openhands/agent-server:3c940b8-python-node-runtime-slim
ghcr.io/openhands/agent-server:3c940b8-python
ghcr.io/openhands/agent-server:3c940b84eb09f46fbce812b509482e55b3071a0d-python
ghcr.io/openhands/agent-server:claude-agent-server-api-feature-map-fw7sju-python
ghcr.io/openhands/agent-server:3c940b8-python-node-runtime

About Multi-Architecture Support

  • Each variant tag (e.g., 3c940b8-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., 3c940b8-python-amd64) are also available if needed

…r the Agent Server API

A contributor skill under .agents/skills/verify-agent-server/ for driving
the real Agent Server through its REST and WebSocket API:

- control-agent-server: launches isolated servers from the checkout
  (private HOME, persistence, keys, port), drives any route or socket
  with assertions, arranges fixtures (git repos, skills, plugins, MCP
  servers, webhook sinks, a scripted LLM stub) and records redacted
  evidence.
- An executable feature map: 34 families with stable sub-feature IDs.
  Every route of the default app and of Docker runtime mode has one
  owning family (193 owned and driven, 10 excluded with reasons), and
  each family replays end to end on a fresh server. Known product bugs
  are expected failures marked at the failing assertion, so a fix shows
  up as an unexpected pass.
- Maintenance levers: map check, map coverage, map diff, map owners.
- tests/cross/test_verify_agent_server_skill.py covers the CLI and the
  committed map's structure.

Closes #5617.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W9qxyUBKhzmbLrTK2wi7D7
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

REST API breakage checks (OpenAPI) — ✅ PASSED

Result: ✅ PASSED

Action log

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Coverage

Coverage Report •
FileStmtsMissCoverMissing
TOTAL485831925160% 
report-only-changed-files is enabled. No changed files were found in the coverage report :)

This was referenced Oct 9, 2026

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This review was posted by an AI agent (OpenHands).

Review of verify-agent-server at head fff65e3

Scope check: this PR adds a contributor skill under .agents/skills/verify-agent-server/ (control CLI + executable feature map), one cross-repo test, and .pr/ review artifacts, plus a short pointer in openhands-agent-server/AGENTS.md and a .impeccable/config.json ignore entry. It belongs in this repository and changes no runtime code, so the scope gate passes.

Current state verified on this head:

  • head fff65e3ebff18786e389c161dbdd30f955e3bb6b matches; PR open, non-draft, no labels, mergeable_state: blocked.
  • CI: every check run on this head is success (49) or skipped (2); no failures.
  • Local: tests/cross/test_verify_agent_server_skill.py 39/39 pass; map check green (34 files, 935 IDs); map coverage green (204 routes, 194 owned, 194 driven, no unowned/undriven/stale); ruff check and ruff format --check clean on the changed Python.

Both findings from the previous review round are fixed and re-verified here:

  • F09-model-switching-plugins.md encrypted reads (config.api_key, config, agent_settings) and F19-mcp.md encrypted/plaintext reads (qa-env env value, oauth_state, stored access token) now pass --unsafe-unredacted for the round-trip values, while --check and saved evidence stay redacted. No encrypted or plaintext --field read in the map is left without the opt-in.
  • cmd_map_coverage includes undriven in its verdict, and the earlier --field/--print-header redaction bypass is closed.

New code on this head also reads correctly:

  • The helper start|stop subcommand gives recipe-local background processes their own session and registers them with the run, so they survive a bullet and are cleaned up by stop/restart/Stop paths (stop_helpers runs in cmd_stop); the started process is checked after --settle so a helper that dies immediately fails loudly.
  • Per-recipe Needs: are parsed, validated against the known token set, rejected on the family Preconditions line, propagated through the Requires: closure, and reported as blocked per recipe (with dependents) by map run/capabilities rather than failing the family.
  • undeclared_dependencies now counts a read as external when it appears before the bullet's own binding (including read -r NAME, --env CID="$CID"), which addresses the Requires: gaps it was meant to catch, with a focused unit test.
  • start_server only accepts readiness when the listener on the port belongs to this run's process group (unknown owners still accepted), which prevents a parallel launch from adopting another run's server.

No material correctness, security, compatibility, or acceptance-criterion defect found on this head. The remaining .pr/ review artifacts and the .impeccable ignore entry are temporary reviewer context and out of the product surface.

✅ APPROVED

@enyst
enyst merged commit acca181 into main Oct 12, 2026
51 checks passed
@enyst
enyst deleted the claude/agent-server-api-feature-map-fw7sju branch October 12, 2026 19:22
This was referenced Oct 12, 2026
@github-actions github-actions Bot mentioned this pull request Oct 15, 2026
1 of 7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Executable feature map and control CLI for verifying the Agent Server's REST and WebSocket APIs

5 participants