Retrieve an agent session
GET/agents/sessions/{session_id}
Retrieves the current state of a managed agent session. See managing sessions.
Retrieve an agent session
curl https://api.openai.com/v1/agents/sessions/$SESSION_ID \
-H 'OpenAI-Beta: agents=v1' \
-H "Authorization: Bearer $OPENAI_API_KEY"{
"id": "id",
"agent": {
"id": "id",
"instructions": "instructions",
"model": "model",
"multi_agent": {
"enabled": true,
"max_concurrent_subagents": 1
},
"name": "name",
"reasoning": {
"effort": "none",
"summary": "concise"
},
"service_tier": "auto",
"text": {
"format": {
"type": "text"
},
"verbosity": "low"
},
"tools": [
{
"defer_loading": true,
"description": "description",
"name": "name",
"parameters": {
"foo": "bar"
},
"type": "function"
}
]
},
"created_at": 0,
"environment": {
"type": "none"
},
"error": "error",
"last_active_at": 0,
"metadata": {
"foo": "string"
},
"object": "agent.session",
"required_actions": [
{
"arguments": {},
"call_id": "call_id",
"name": "name",
"turn_id": "turn_id",
"type": "function_call"
}
],
"status": "idle",
"usage": {
"input_tokens": 0,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 0,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 0
},
"vault_ids": [
"string"
]
}Returns Examples
{
"id": "id",
"agent": {
"id": "id",
"instructions": "instructions",
"model": "model",
"multi_agent": {
"enabled": true,
"max_concurrent_subagents": 1
},
"name": "name",
"reasoning": {
"effort": "none",
"summary": "concise"
},
"service_tier": "auto",
"text": {
"format": {
"type": "text"
},
"verbosity": "low"
},
"tools": [
{
"defer_loading": true,
"description": "description",
"name": "name",
"parameters": {
"foo": "bar"
},
"type": "function"
}
]
},
"created_at": 0,
"environment": {
"type": "none"
},
"error": "error",
"last_active_at": 0,
"metadata": {
"foo": "string"
},
"object": "agent.session",
"required_actions": [
{
"arguments": {},
"call_id": "call_id",
"name": "name",
"turn_id": "turn_id",
"type": "function_call"
}
],
"status": "idle",
"usage": {
"input_tokens": 0,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 0,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 0
},
"vault_ids": [
"string"
]
}