API: agent tests are workspace resources (breaking at 2026-09-28)
API: agent tests are workspace resources (breaking at 2026-09-28)
Agent-test create and list move off the agent onto the workspace, marked at the 2026-09-28 API version. This is a hard breaking change, and unlike most version boundaries, pinning an earlier version does not keep the old behaviour — a removed route and a widened field cannot be reconstructed by a response transform, so the break reaches every caller the moment it ships. Plan to migrate, not to pin.
What changed:
POST /v1/agents/{agent_id}/testsandGET /v1/agents/{agent_id}/testsare removed. Every caller gets404on those paths, whatever version it pins.- Create and list move to
POST /v1/agents/testsandGET /v1/agents/tests. - List-by-agent survives as the
?agent_id=query filter onGET /v1/agents/tests(comma-separated agent IDs). AgentTest.agent_idis widened fromstringtostring | nullon every read. A test can now be a bare workspace asset with no authoring agent.
agent_id was never a scope and is not one now: it records the authoring agent (the source of the test’s tool schemas and variables), every read/list/run is scoped by workspace, and the run target is bound at run time (POST /v1/agents/tests/runs), independent of it. A test authored against an agent that is later deleted keeps its agent_id as a dangling provenance pointer.
Migrate: call POST /v1/agents/tests to create and GET /v1/agents/tests to list; to list one agent’s tests, pass ?agent_id=. Handle agent_id as nullable on every read.