Skip to content

A project's test set of an agent

View as Markdown
GET
/v1/agents/{agentId}/test-set
curl --request GET \
--url 'https://example.com/v1/agents/example/test-set?projectId=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--header 'Authorization: Bearer <token>'

How many cases the agent’s test set has in the project. Its cases are the agent’s corrections there, except Won’t fix and Removed ones (Fixed and With the owner included), and cases added by hand. It’s computed when it’s read. Needs read on the project.

agentId
required
string

AgentId — dotted namespace (acme.drafting).

projectId
required
string format: uuid

The project whose cases to read: the agent’s set, narrowed to that project’s cases.

The test set.

Media typeapplication/json
object
agentId
required
string
projectId
required
string format: uuid
cases
required
object
active
required

The cases a test run checks.

integer
retired
required
integer
lastAddedAt

When the newest case was added. Absent while it has none.

string format: date-time
frozenVersion

Absent until a test run has frozen it, or when the server freezes none.

object
testSetId
required

agent.<agentId>.<projectId>.

string
version
required
string
Examplegenerated
{
"agentId": "example",
"projectId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"cases": {
"active": 1,
"retired": 1
},
"lastAddedAt": "2026-04-15T12:00:00Z",
"frozenVersion": {
"testSetId": "example",
"version": "example"
}
}

projectId is missing, or not a project id (a UUID).

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Missing / malformed / expired / revoked bearer token.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

agent-not-found.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

The database was too busy to answer in time (database-busy); Retry-After (whole seconds) says when to try again.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

See also