Lifecycle
Retrieve a session
Retrieve the full session object, with its agent, status, and latest answer.
GET
/
api
/
v2
/
sessions
/
{id}
holo sessions get $SESSION_ID
from hai_agents import Client
client = Client()
session = client.sessions.get_session(session_id)
print(session.status.status, session.latest_answer)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const session = await client.sessions.getSession({ id: sessionId });
console.log(session.status.status, session.latestAnswer);
curl https://agp.eu.hcompany.ai/api/v2/sessions/$SESSION_ID \
-H "Authorization: Bearer $HAI_API_KEY"
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"request": {
"agent": {"name": "h/web-surfer-flash", "model": "holo4-35b-a3b", "...": "..."},
"messages": [
{"type": "user_message", "message": "Find the top 3 stories on Hacker News"}
],
"...": "..."
},
"agent_revision": 4,
"status": {
"status": "completed",
"error": null,
"error_code": null,
"outcome": "success",
"steps": 12,
"usage_per_model": [
{
"name": "holo4-35b-a3b",
"input_tokens": 24800,
"cached_tokens": 18000,
"output_tokens": 1420,
"reasoning_tokens": 0
}
],
"subagent_session_ids": []
},
"agent_view_url": "https://platform.hcompany.ai/agents/sessions/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"latest_answer": "1. ... 2. ... 3. ...",
"created_at": "2026-05-07T14:30:00Z",
"started_at": "2026-05-07T14:30:02Z",
"finished_at": "2026-05-07T14:31:15Z"
}
Behavior
latest_answer reads a finished session’s result without tracking an event index. To follow a session until it finishes, use the polling rules. Works without a key on shared sessions.
Path parameters
string
required
The session ID returned when the session was created.
Response
200 with the session object, also returned by create.
string
Session UUID, used by every follow-up call.
integer | null
The catalog agent’s revision the session runs:
request.agent is that revision, with request.overrides applied. null for inline agents.string | null
The session’s Agent View page, for live viewing and replay.
string | object | null
The agent’s latest final answer: text, or an object matching the agent’s
answer_format. Mirrors the answer from changes. null until the agent first answers.string
ISO 8601 creation time.
string | null
When the agent started.
null until then.string | null
When the session reached a terminal state.
null until then.holo sessions get $SESSION_ID
from hai_agents import Client
client = Client()
session = client.sessions.get_session(session_id)
print(session.status.status, session.latest_answer)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const session = await client.sessions.getSession({ id: sessionId });
console.log(session.status.status, session.latestAnswer);
curl https://agp.eu.hcompany.ai/api/v2/sessions/$SESSION_ID \
-H "Authorization: Bearer $HAI_API_KEY"
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"request": {
"agent": {"name": "h/web-surfer-flash", "model": "holo4-35b-a3b", "...": "..."},
"messages": [
{"type": "user_message", "message": "Find the top 3 stories on Hacker News"}
],
"...": "..."
},
"agent_revision": 4,
"status": {
"status": "completed",
"error": null,
"error_code": null,
"outcome": "success",
"steps": 12,
"usage_per_model": [
{
"name": "holo4-35b-a3b",
"input_tokens": 24800,
"cached_tokens": 18000,
"output_tokens": 1420,
"reasoning_tokens": 0
}
],
"subagent_session_ids": []
},
"agent_view_url": "https://platform.hcompany.ai/agents/sessions/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"latest_answer": "1. ... 2. ... 3. ...",
"created_at": "2026-05-07T14:30:00Z",
"started_at": "2026-05-07T14:30:02Z",
"finished_at": "2026-05-07T14:31:15Z"
}
Errors
| Status | Cause |
|---|---|
404 | Not found, or not in your organization. |
Was this page helpful?
⌘I
holo sessions get $SESSION_ID
from hai_agents import Client
client = Client()
session = client.sessions.get_session(session_id)
print(session.status.status, session.latest_answer)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const session = await client.sessions.getSession({ id: sessionId });
console.log(session.status.status, session.latestAnswer);
curl https://agp.eu.hcompany.ai/api/v2/sessions/$SESSION_ID \
-H "Authorization: Bearer $HAI_API_KEY"
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"request": {
"agent": {"name": "h/web-surfer-flash", "model": "holo4-35b-a3b", "...": "..."},
"messages": [
{"type": "user_message", "message": "Find the top 3 stories on Hacker News"}
],
"...": "..."
},
"agent_revision": 4,
"status": {
"status": "completed",
"error": null,
"error_code": null,
"outcome": "success",
"steps": 12,
"usage_per_model": [
{
"name": "holo4-35b-a3b",
"input_tokens": 24800,
"cached_tokens": 18000,
"output_tokens": 1420,
"reasoning_tokens": 0
}
],
"subagent_session_ids": []
},
"agent_view_url": "https://platform.hcompany.ai/agents/sessions/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"latest_answer": "1. ... 2. ... 3. ...",
"created_at": "2026-05-07T14:30:00Z",
"started_at": "2026-05-07T14:30:02Z",
"finished_at": "2026-05-07T14:31:15Z"
}