Lab

Lab

Lab tests a platform agent by playing simulated people against it, judging the answers and reporting the result, billed to the workspace.

Building blocks

PartWhat it is
EnvironmentTest cases (simulated people who write to the agent), the files they hold, and the checks the answers must pass
GymPlays an environment against an agent to measure it, or to improve its configuration round by round
DiagnosisReads conversations the agent already had and says what fails, why, and where to fix it
CertificationMeasures an agent on test cases against a pass bar; a person approves or rejects the result in the web app

The agent must be a platform agent; publish one from files with Create and configure an agent.

Authentication

Every request sends X-Space-Slug and one credential; see Authentication and API keys. An API key needs the Lab scope.

TaskAuth
Environments, gym sessions and diagnosesKey or bearer
Launch, read and share a certification; change its reviewerKey or bearer
An agent's chats, through /api/v1/diagnostics/agents/{agent_id}/chats/Key or bearer
Approve or reject a certificationBearer only

A key without Lab gets 403 {"detail": {"code": "API_KEY_SCOPE_MISSING", "scope": "lab"}}.

Numbers and names

FieldOnMeaning
space_seqDiagnosis runs, gym sessions, certificationsThe number the web app shows (#3), counted per workspace. id stays the key in every path.
kit_nameDiagnosis runs, gym sessionsThe environment's name, also when the caller cannot read that environment.

Read the conversations behind a report

All paths start with /api/v1/diagnostics.

ReportConversation IDsRead them with
GymGET /gym/{session_id}/conversations/ → [].chat_idGET /agents/{fork_agent_id}/chats/{chat_id}/, with fork_agent_id from GET /gym/{session_id}/
Diagnosistrace_idsGET /agents/{agent_id}/chats/{chat_id}/
Certificationreport.cases[].executions[].chat_idGET /certifications/{certification_id}/chats/{chat_id}/

GET /agents/{agent_id}/chats/ lists the agent's chats the caller can open. With a key, these are the only routes that read an agent's chats.

On this page