Retrieve a single subagent to inspect its parent agent, public instructions, and lifecycle status.
Endpoint
GET /agents/sessions/{session_id}/subagents/{subagent_id}
Returns 200 with a single Subagent. The query does not start or resume a subagent, and does not create resources.
Path parameters
| Field | Required | Type | Description |
|---|---|---|---|
session_id | Yes | string | Session ID, for example sess_xxx |
subagent_id | Yes | string | Stable subagent ID, for example subagent_xxx |
Request example
Response example
Response fields
| Field | Type | Description |
|---|---|---|
id | string | Stable subagent ID |
object | string | Subagent object type, fixed as agent.session.subagent |
session_id | string | Owning session |
parent_agent_id | string | Parent agent |
name | string / null | Display name |
instructions | array / null | Public instruction content |
status | string | Subagent status: active or closed |
opened_at | integer | Open time in Unix seconds |
closed_at | integer / null | Close time in Unix seconds; null before the subagent is closed |
active can be idle and waiting; it does not mean the subagent is continuously running. closed_at is null before the subagent is closed.
Error codes
| HTTP status | Error type / code | Solution |
|---|---|---|
404 | not_found_error / not_found_error | Confirm that the session and subagent exist in the same workspace, and use matching path levels |
502 | server_error / agents_api_upstream_unavailable | Retry later. If it keeps failing, submit a ticket with the x-request-id from the response headers |