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 parameterssession_idstring (required)Session ID, for example sess_xxxsubagent_id string (required)Stable subagent ID, for example subagent_xxxThe path hierarchy must match. If the subagent does not belong to the session, or belongs to another workspace, no data is returned. | Request example |
Response fieldsidstringStable subagent IDobject stringSubagent object type, fixed as agent.session.subagentsession_id stringOwning sessionparent_agent_id stringParent agentname string / nullDisplay nameinstructions array / nullPublic instruction contentstatus stringSubagent status: active or closedopened_at integerOpen time in Unix secondsclosed_at integer / nullClose time in Unix seconds; null before the subagent is closedactive can be idle and waiting; it does not mean the subagent is continuously running. closed_at is null before the subagent is closed. | Response example |
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 |