Skip to content

The Agent Sessions API exposes the full lifecycle of an agent session: browsing live sessions, creating and configuring sessions, sending prompts and commands, inspecting messages and parts, managing diffs/todos/tags, and performing session-level actions like abort, revert, fork, summarize, and delete.

All session-scoped operations are keyed by a workspace identifier (workspaceID — 24-character lowercase hex) and, where applicable, a session identifier (sessionID).

These endpoints return an HTML view of live agent sessions, intended for iframe embedding in dashboards.

Alias for /api/v1/agent/sessions/live. Renders the HTML sessions wall.

Terminal window
curl "https://api.hoody.com/api/v1/agent/all?workspace=5f9f5c5e7b1e0c0001a2b3c4&limit=50"
NameInTypeRequiredDescription
workspacequerystringNo
directoryquerystringNo
readonlyquerystringNo
read_onlyquerystringNo
cardWidthquerystringNo
limitquerystringNo
subquerystringNo
archivedquerystringNo
containerIdquerystringNo
projectIdquerystringNo
serverNodequerystringNo
containerAliasquerystringNo

Returns an HTML page representing the sessions wall.


Renders an HTML page showing live agent sessions, designed for iframe embedding.

Terminal window
curl "https://api.hoody.com/api/v1/agent/sessions/live?workspace=5f9f5c5e7b1e0c0001a2b3c4"
NameInTypeRequiredDescription
workspacequerystringNo
directoryquerystringNo
readonlyquerystringNo
read_onlyquerystringNo
cardWidthquerystringNo
limitquerystringNo
subquerystringNo
archivedquerystringNo
containerIdquerystringNo
projectIdquerystringNo
serverNodequerystringNo
containerAliasquerystringNo

Returns an HTML page representing the sessions wall.


GET /api/v1/workspaces/{workspaceID}/sessions

Section titled “GET /api/v1/workspaces/{workspaceID}/sessions”

Returns a paginated list of all sessions in a workspace, newest-first by session ID.

Terminal window
curl "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions?page=1&limit=50&roots=true"
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
pagequeryintegerNoPage number (1-indexed). Default: 1
limitqueryintegerNoItems per page (max 200). Default: 50
rootsquerybooleanNoOnly return root sessions (no parentID)
searchquerystringNoFilter by title (case-insensitive)
{
"items": [
{
"id": "5fa1bd2e9c1d2c0001b2a3f4",
"slug": "refactor-auth-flow",
"projectID": "5f9f5c5e7b1e0c0001a2b3c4",
"directory": "/home/user/projects/app",
"parentID": null,
"summary": {
"additions": 142,
"deletions": 38,
"files": 7,
"diffs": []
},
"title": "Refactor auth flow",
"version": "v1.2.3",
"time": {
"created": 1731000000000,
"updated": 1731000450000,
"compacting": 0,
"archived": 0
},
"permission": [
{ "permission": "edit", "pattern": "*", "action": "allow" }
],
"metadata": {},
"revert": {
"messageID": "msg_01HXY...",
"partID": "prt_01HXY...",
"snapshot": "snap_abc",
"diff": "diff --git ..."
}
}
],
"meta": {
"page": 1,
"limit": 50,
"total": 124,
"pages": 3
}
}

GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}

Section titled “GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}”

Retrieve a single session by ID within the workspace.

Terminal window
curl "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123"
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
{
"id": "5fa1bd2e9c1d2c0001b2a3f4",
"slug": "refactor-auth-flow",
"projectID": "5f9f5c5e7b1e0c0001a2b3c4",
"directory": "/home/user/projects/app",
"parentID": null,
"summary": {
"additions": 142,
"deletions": 38,
"files": 7,
"diffs": []
},
"title": "Refactor auth flow",
"version": "v1.2.3",
"time": {
"created": 1731000000000,
"updated": 1731000450000,
"compacting": 0,
"archived": 0
},
"permission": [
{ "permission": "edit", "pattern": "*", "action": "allow" }
],
"metadata": {
"featureFlag": "auth-v2"
},
"revert": {
"messageID": "msg_01HXY...",
"partID": "prt_01HXY...",
"snapshot": "snap_abc",
"diff": "diff --git a/..."
}
}

GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/children

Section titled “GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/children”

Retrieve all sessions forked from the specified parent.

Terminal window
curl "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/children"
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
{
"items": [
{
"id": "5fa1bd2e9c1d2c0001b2a3f5",
"slug": "refactor-auth-flow-experiment-1",
"projectID": "5f9f5c5e7b1e0c0001a2b3c4",
"directory": "/home/user/projects/app",
"parentID": "5fa1bd2e9c1d2c0001b2a3f4",
"summary": {
"additions": 24,
"deletions": 10,
"files": 2,
"diffs": []
},
"title": "Refactor auth flow — experiment 1",
"version": "v1.2.3",
"time": {
"created": 1731000500000,
"updated": 1731000700000,
"compacting": 0,
"archived": 0
},
"permission": [
{ "permission": "edit", "pattern": "*", "action": "ask" }
],
"metadata": {},
"revert": {
"messageID": "msg_01HXY..."
}
}
]
}

GET /api/v1/workspaces/{workspaceID}/sessions/status

Section titled “GET /api/v1/workspaces/{workspaceID}/sessions/status”

Retrieve the current status of every session in the workspace (active, idle, retry, busy).

Terminal window
curl "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/status"
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
{
"ses_01HXY123": { "type": "busy" },
"ses_01HXY124": { "type": "idle" },
"ses_01HXY125": {
"type": "retry",
"attempt": 2,
"message": "Provider returned 503",
"next": 1731000800000
}
}

Session insights: summary, diff, todos, tags

Section titled “Session insights: summary, diff, todos, tags”

GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/summary

Section titled “GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/summary”

Retrieve a lightweight summary: title, token/cost totals, file change stats, and the last message snippet. O(messages) reads with no AI call triggered.

Terminal window
curl "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/summary"
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
{
"sessionID": "ses_01HXY123",
"title": "Refactor auth flow",
"messageCount": 42,
"tokens": {
"total": 87420,
"input": 41200,
"output": 30120,
"reasoning": 9100,
"cache": {
"read": 3800,
"write": 5200
}
},
"cost": 0.1842,
"files": 7,
"additions": 142,
"deletions": 38,
"lastMessage": {
"role": "assistant",
"snippet": "I've finished wiring the OAuth callback handler.",
"time": 1731000450000
},
"time": {
"created": 1731000000000,
"updated": 1731000450000
}
}

GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/diff

Section titled “GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/diff”

Get file changes (diffs) resulting from the session. Optionally scope the diff to a specific message.

Terminal window
curl "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/diff?messageID=msg_01HXY..."
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
messageIDquerystringNoOptional message cursor for message-scoped diff
[
{
"file": "src/auth/callback.ts",
"before": "export const handler = (req, res) => { /* old */ }",
"after": "export const handler = async (req, res) => { /* new */ }",
"additions": 24,
"deletions": 10,
"status": "modified"
},
{
"file": "src/auth/oauth.ts",
"before": "",
"after": "export const config = { provider: 'github' }",
"additions": 12,
"deletions": 0,
"status": "added"
}
]

GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/todo

Section titled “GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/todo”

Retrieve the todo list associated with a session.

Terminal window
curl "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/todo"
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
[
{
"id": "todo_01HXY...",
"content": "Migrate callback handler to async/await",
"status": "completed",
"priority": "high"
},
{
"id": "todo_01HXY...",
"content": "Add integration test for OAuth refresh",
"status": "in_progress",
"priority": "medium"
},
{
"id": "todo_01HXY...",
"content": "Document the new env vars",
"status": "pending",
"priority": "low"
}
]

PATCH /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/tags

Section titled “PATCH /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/tags”

Replace the MITM tags on a session. This surface and /mitm/sessions/{sessionID}/tags share the same canonical-equality fast path.

Terminal window
curl -X PATCH "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/tags" \
-H "Content-Type: application/json" \
-d '{
"tags": ["needs-review", "security", "v2"]
}'
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
NameTypeRequiredDescription
tagsarrayYes
{
"tags": ["needs-review", "security", "v2"]
}
{
"id": "5fa1bd2e9c1d2c0001b2a3f4",
"slug": "refactor-auth-flow",
"projectID": "5f9f5c5e7b1e0c0001a2b3c4",
"directory": "/home/user/projects/app",
"parentID": null,
"summary": {
"additions": 142,
"deletions": 38,
"files": 7,
"diffs": []
},
"title": "Refactor auth flow",
"version": "v1.2.3",
"time": {
"created": 1731000000000,
"updated": 1731000800000,
"compacting": 0,
"archived": 0
},
"permission": [
{ "permission": "edit", "pattern": "*", "action": "allow" }
],
"metadata": {},
"revert": {
"messageID": "msg_01HXY..."
}
}

GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/messages

Section titled “GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/messages”

Retrieve messages from a session, oldest first. Use the after cursor parameter for incremental polling.

Terminal window
curl "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/messages?limit=20&role=assistant&after=msg_01HXY..."
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
limitqueryintegerNoMaximum messages to return
rolequerystringNoFilter by role. Allowed values: user, assistant
afterquerystringNoCursor: only return messages with ID strictly greater than this (newer)
[
{
"info": {
"id": "msg_01HXY...",
"sessionID": "ses_01HXY123",
"role": "user",
"time": { "created": 1731000000000 },
"summary": { "diffs": [] },
"agent": "build",
"model": { "providerID": "anthropic", "modelID": "claude-3-5-sonnet" },
"system": "You are a helpful coding assistant.",
"tools": { "bash": true, "edit": true },
"variant": "max"
},
"parts": [
{
"id": "prt_01HXY...",
"sessionID": "ses_01HXY123",
"messageID": "msg_01HXY...",
"type": "text",
"text": "Refactor the auth callback to be async.",
"time": { "start": 1731000000000 }
}
]
},
{
"info": {
"id": "msg_01HXY...",
"sessionID": "ses_01HXY123",
"role": "assistant",
"time": { "created": 1731000005000, "completed": 1731000030000 },
"parentID": "msg_01HXY...",
"modelID": "claude-3-5-sonnet",
"providerID": "anthropic",
"mode": "build",
"agent": "build",
"path": { "cwd": "/home/user/projects/app", "root": "/home/user/projects/app" },
"cost": 0.0124,
"tokens": {
"input": 412,
"output": 220,
"reasoning": 80,
"cache": { "read": 120, "write": 40 }
}
},
"parts": [
{
"id": "prt_01HXY...",
"sessionID": "ses_01HXY123",
"messageID": "msg_01HXY...",
"type": "text",
"text": "I'll refactor the auth callback handler."
}
]
}
]

GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/messages/{messageID}

Section titled “GET /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/messages/{messageID}”

Retrieve a specific message from a session, including all of its parts.

Terminal window
curl "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/messages/msg_01HXY..."
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
messageIDpathstringYes
{
"info": {
"id": "msg_01HXY...",
"sessionID": "ses_01HXY123",
"role": "assistant",
"time": { "created": 1731000005000, "completed": 1731000030000 },
"parentID": "msg_01HXY...",
"modelID": "claude-3-5-sonnet",
"providerID": "anthropic",
"mode": "build",
"agent": "build",
"path": { "cwd": "/home/user/projects/app", "root": "/home/user/projects/app" },
"cost": 0.0124,
"tokens": {
"input": 412,
"output": 220,
"reasoning": 80,
"cache": { "read": 120, "write": 40 }
}
},
"parts": [
{
"id": "prt_01HXY...",
"sessionID": "ses_01HXY123",
"messageID": "msg_01HXY...",
"type": "text",
"text": "I'll refactor the auth callback handler."
},
{
"id": "prt_01HXY...",
"sessionID": "ses_01HXY123",
"messageID": "msg_01HXY...",
"type": "step-finish",
"reason": "stop",
"cost": 0.0124,
"tokens": {
"input": 412,
"output": 220,
"reasoning": 80,
"cache": { "read": 120, "write": 40 }
}
}
]
}

PATCH /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/message/{messageID}

Section titled “PATCH /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/message/{messageID}”

Update mutable fields on a user message — for example, switching the model while retrying.

Terminal window
curl -X PATCH "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/message/msg_01HXY..." \
-H "Content-Type: application/json" \
-d '{
"model": { "providerID": "anthropic", "modelID": "claude-3-5-sonnet" }
}'
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
messageIDpathstringYes
NameTypeRequiredDescription
modelobjectYesproviderID and modelID (both required)
{
"model": {
"providerID": "anthropic",
"modelID": "claude-3-5-sonnet"
}
}
{
"info": {
"id": "msg_01HXY...",
"sessionID": "ses_01HXY123",
"role": "user",
"time": { "created": 1731000000000 },
"agent": "build",
"model": { "providerID": "anthropic", "modelID": "claude-3-5-sonnet" }
},
"parts": [
{
"id": "prt_01HXY...",
"sessionID": "ses_01HXY123",
"messageID": "msg_01HXY...",
"type": "text",
"text": "Refactor the auth callback to be async."
}
]
}

PATCH /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/message/{messageID}/part/{partID}

Section titled “PATCH /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/message/{messageID}/part/{partID}”

Update a part attached to a message.

Terminal window
curl -X PATCH "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/message/msg_01HXY.../part/prt_01HXY..." \
-H "Content-Type: application/json" \
-d '{
"id": "prt_01HXY...",
"sessionID": "ses_01HXY123",
"messageID": "msg_01HXY...",
"type": "text",
"text": "Updated text content"
}'
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
messageIDpathstringYes
partIDpathstringYesPart ID

The request body matches the Part schema (a tagged union of TextPart, SubtaskPart, ReasoningPart, FilePart, ToolPart, JobResultPart, StepStartPart, StepFinishPart, SnapshotPart, PatchPart, AgentPart, RetryPart, CompactionPart).

{
"id": "prt_01HXY...",
"sessionID": "ses_01HXY123",
"messageID": "msg_01HXY...",
"type": "text",
"text": "Updated text content"
}
{
"id": "prt_01HXY...",
"sessionID": "ses_01HXY123",
"messageID": "msg_01HXY...",
"type": "text",
"text": "Updated text content",
"time": { "start": 1731000000000 }
}

DELETE /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/message/{messageID}/part/{partID}

Section titled “DELETE /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/message/{messageID}/part/{partID}”

Delete a part from a message.

Terminal window
curl -X DELETE "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/message/msg_01HXY.../part/prt_01HXY..."
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
messageIDpathstringYes
partIDpathstringYesPart ID
true

POST /api/v1/workspaces/{workspaceID}/sessions

Section titled “POST /api/v1/workspaces/{workspaceID}/sessions”

Create a new session in the workspace. Pass a parentID to fork from an existing session.

Terminal window
curl -X POST "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions" \
-H "Content-Type: application/json" \
-d '{
"title": "Investigate flaky CI test",
"permission": [
{ "permission": "edit", "pattern": "*", "action": "ask" }
],
"metadata": { "priority": "high" }
}'
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
NameTypeRequiredDescription
parentIDstringNoMust match ^[0-9a-f]{24}$
titlestringNo
permissionarrayNoPermissionRuleset — array of { permission, pattern, action }
metadataobjectNoFree-form key/value map
{
"title": "Investigate flaky CI test",
"permission": [
{ "permission": "edit", "pattern": "*", "action": "ask" }
],
"metadata": { "priority": "high" }
}
{
"id": "5fa1bd2e9c1d2c0001b2a3f6",
"slug": "investigate-flaky-ci-test",
"projectID": "5f9f5c5e7b1e0c0001a2b3c4",
"directory": "/home/user/projects/app",
"parentID": null,
"summary": {
"additions": 0,
"deletions": 0,
"files": 0,
"diffs": []
},
"title": "Investigate flaky CI test",
"version": "v1.2.3",
"time": {
"created": 1731000900000,
"updated": 1731000900000,
"compacting": 0,
"archived": 0
},
"permission": [
{ "permission": "edit", "pattern": "*", "action": "ask" }
],
"metadata": { "priority": "high" },
"revert": {
"messageID": "msg_01HXY..."
}
}

PATCH /api/v1/workspaces/{workspaceID}/sessions/{sessionID}

Section titled “PATCH /api/v1/workspaces/{workspaceID}/sessions/{sessionID}”

Update session-level properties: title, time.archived, and/or permission.

The permission field is a session-scoped ruleset merged on top of config.permission at evaluation time (last-match-wins).

  • Pass permission: [] to clear session overrides (keeps the field).
  • Pass permission: null to remove the field entirely (revert to config defaults).
  • Omit permission to leave the existing rules untouched.
Terminal window
curl -X PATCH "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123" \
-H "Content-Type: application/json" \
-d '{
"title": "Refactor auth flow (renamed)",
"time": { "archived": 0 },
"permission": [
{ "permission": "edit", "pattern": "src/auth/**", "action": "ask" }
]
}'
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
NameTypeRequiredDescription
titlestringNoNew session title (min length 1)
timeobjectNoTimestamp fields to update. Contains archived (ms since epoch, or 0 to unarchive)
permissionarray | nullNoSession-scoped ruleset. [] clears overrides; null removes the field
{
"title": "Refactor auth flow (renamed)",
"time": { "archived": 0 },
"permission": [
{ "permission": "edit", "pattern": "src/auth/**", "action": "ask" }
]
}
{
"id": "5fa1bd2e9c1d2c0001b2a3f4",
"slug": "refactor-auth-flow-renamed",
"projectID": "5f9f5c5e7b1e0c0001a2b3c4",
"directory": "/home/user/projects/app",
"parentID": null,
"summary": {
"additions": 142,
"deletions": 38,
"files": 7,
"diffs": []
},
"title": "Refactor auth flow (renamed)",
"version": "v1.2.3",
"time": {
"created": 1731000000000,
"updated": 1731001000000,
"compacting": 0,
"archived": 0
},
"permission": [
{ "permission": "edit", "pattern": "src/auth/**", "action": "ask" }
],
"metadata": {},
"revert": {
"messageID": "msg_01HXY..."
}
}

DELETE /api/v1/workspaces/{workspaceID}/sessions/{sessionID}

Section titled “DELETE /api/v1/workspaces/{workspaceID}/sessions/{sessionID}”

Delete a session and all associated data. This action is irreversible.

Terminal window
curl -X DELETE "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123"
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
true

POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/message

Section titled “POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/message”

Send a message to a session, streaming the AI response.

Terminal window
curl -X POST "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/message" \
-H "Content-Type: application/json" \
-d '{
"messageID": "msg_01HXY...",
"model": { "providerID": "anthropic", "modelID": "claude-3-5-sonnet" },
"agent": "build",
"system": "Be concise.",
"parts": [
{ "type": "text", "text": "Add a retry policy to the HTTP client." }
]
}'
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
NameTypeRequiredDescription
messageIDstringNoMatches ^msg.*
modelobjectNoproviderID and modelID (both required when present)
agentstringNo
noReplybooleanNo
toolsobjectNoDeprecated — set permission on the session instead. Map of tool name to boolean
systemstringNo
variantstringNo
partsarrayYesArray of TextPartInput, FilePartInput, AgentPartInput, or SubtaskPartInput
{
"messageID": "msg_01HXY...",
"model": { "providerID": "anthropic", "modelID": "claude-3-5-sonnet" },
"agent": "build",
"system": "Be concise.",
"parts": [
{ "type": "text", "text": "Add a retry policy to the HTTP client." }
]
}
{
"info": {
"id": "msg_01HXY...",
"sessionID": "ses_01HXY123",
"role": "assistant",
"time": { "created": 1731001000000, "completed": 1731001030000 },
"parentID": "msg_01HXY...",
"modelID": "claude-3-5-sonnet",
"providerID": "anthropic",
"mode": "build",
"agent": "build",
"path": { "cwd": "/home/user/projects/app", "root": "/home/user/projects/app" },
"cost": 0.0242,
"tokens": {
"input": 612,
"output": 320,
"reasoning": 110,
"cache": { "read": 80, "write": 40 }
}
},
"parts": [
{
"id": "prt_01HXY...",
"sessionID": "ses_01HXY123",
"messageID": "msg_01HXY...",
"type": "text",
"text": "I'll add a retry policy to the HTTP client."
}
]
}

POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/prompt_async

Section titled “POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/prompt_async”

Send a message to a session asynchronously. The endpoint returns immediately after the prompt is accepted; stream the response separately.

Terminal window
curl -X POST "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/prompt_async" \
-H "Content-Type: application/json" \
-d '{
"model": { "providerID": "anthropic", "modelID": "claude-3-5-sonnet" },
"agent": "build",
"parts": [
{ "type": "text", "text": "Add a retry policy to the HTTP client." }
]
}'
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
NameTypeRequiredDescription
messageIDstringNoMatches ^msg.*
modelobjectNoproviderID and modelID (both required when present)
agentstringNo
noReplybooleanNo
toolsobjectNoDeprecated — set permission on the session instead. Map of tool name to boolean
systemstringNo
variantstringNo
partsarrayYesArray of TextPartInput, FilePartInput, AgentPartInput, or SubtaskPartInput
{
"model": { "providerID": "anthropic", "modelID": "claude-3-5-sonnet" },
"agent": "build",
"parts": [
{ "type": "text", "text": "Add a retry policy to the HTTP client." }
]
}

The prompt was accepted. The session processes the message in the background.


POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/command

Section titled “POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/command”

Send a slash command to a session for execution by the AI assistant.

Terminal window
curl -X POST "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/command" \
-H "Content-Type: application/json" \
-d '{
"messageID": "msg_01HXY...",
"agent": "build",
"model": "claude-3-5-sonnet",
"command": "init",
"arguments": "scan the repo"
}'
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
NameTypeRequiredDescription
messageIDstringNoMatches ^msg.*
agentstringNo
modelstringNo
argumentsstringYes
commandstringYes
variantstringNo
partsarrayNoArray of file parts (type: "file", mime, url required)
{
"messageID": "msg_01HXY...",
"agent": "build",
"model": "claude-3-5-sonnet",
"command": "init",
"arguments": "scan the repo"
}
{
"info": {
"id": "msg_01HXY...",
"sessionID": "ses_01HXY123",
"role": "assistant",
"time": { "created": 1731001100000, "completed": 1731001130000 },
"parentID": "msg_01HXY...",
"modelID": "claude-3-5-sonnet",
"providerID": "anthropic",
"mode": "build",
"agent": "build",
"path": { "cwd": "/home/user/projects/app", "root": "/home/user/projects/app" },
"cost": 0.0184,
"tokens": {
"input": 480,
"output": 240,
"reasoning": 60,
"cache": { "read": 60, "write": 30 }
}
},
"parts": [
{
"id": "prt_01HXY...",
"sessionID": "ses_01HXY123",
"messageID": "msg_01HXY...",
"type": "text",
"text": "Running /init..."
}
]
}

POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/shell

Section titled “POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/shell”

Execute a shell command within the session context. Returns the assistant’s response.

Terminal window
curl -X POST "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/shell" \
-H "Content-Type: application/json" \
-d '{
"agent": "build",
"model": { "providerID": "anthropic", "modelID": "claude-3-5-sonnet" },
"command": "ls -la src/auth"
}'
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
NameTypeRequiredDescription
agentstringYes
modelobjectNoproviderID and modelID (both required when present)
commandstringYes
{
"agent": "build",
"model": { "providerID": "anthropic", "modelID": "claude-3-5-sonnet" },
"command": "ls -la src/auth"
}
{
"id": "msg_01HXY...",
"sessionID": "ses_01HXY123",
"role": "assistant",
"time": { "created": 1731001200000, "completed": 1731001210000 },
"parentID": "msg_01HXY...",
"modelID": "claude-3-5-sonnet",
"providerID": "anthropic",
"mode": "build",
"agent": "build",
"path": { "cwd": "/home/user/projects/app", "root": "/home/user/projects/app" },
"cost": 0.0042,
"tokens": {
"input": 220,
"output": 60,
"reasoning": 0,
"cache": { "read": 20, "write": 10 }
}
}

POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/fork

Section titled “POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/fork”

Create a new session forked at a specific message point. The new session starts empty but inherits state up to messageID.

Terminal window
curl -X POST "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/fork" \
-H "Content-Type: application/json" \
-d '{ "messageID": "msg_01HXY..." }'
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
NameTypeRequiredDescription
messageIDstringNoMatches ^msg.*. If omitted, the new session forks at the latest message
{
"messageID": "msg_01HXY..."
}
{
"id": "5fa1bd2e9c1d2c0001b2a3f7",
"slug": "refactor-auth-flow-fork-1",
"projectID": "5f9f5c5e7b1e0c0001a2b3c4",
"directory": "/home/user/projects/app",
"parentID": "5fa1bd2e9c1d2c0001b2a3f4",
"summary": {
"additions": 0,
"deletions": 0,
"files": 0,
"diffs": []
},
"title": "Refactor auth flow (fork)",
"version": "v1.2.3",
"time": {
"created": 1731001300000,
"updated": 1731001300000,
"compacting": 0,
"archived": 0
},
"permission": [
{ "permission": "edit", "pattern": "*", "action": "ask" }
],
"metadata": {},
"revert": {
"messageID": "msg_01HXY..."
}
}

POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/revert

Section titled “POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/revert”

Revert a session to a specific message, undoing all subsequent changes.

Terminal window
curl -X POST "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/revert" \
-H "Content-Type: application/json" \
-d '{
"messageID": "msg_01HXY...",
"partID": "prt_01HXY..."
}'
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
NameTypeRequiredDescription
messageIDstringYesMatches ^msg.*
partIDstringNoMatches ^prt.*
{
"messageID": "msg_01HXY...",
"partID": "prt_01HXY..."
}
{
"id": "5fa1bd2e9c1d2c0001b2a3f4",
"slug": "refactor-auth-flow",
"projectID": "5f9f5c5e7b1e0c0001a2b3c4",
"directory": "/home/user/projects/app",
"parentID": null,
"summary": {
"additions": 0,
"deletions": 0,
"files": 0,
"diffs": []
},
"title": "Refactor auth flow",
"version": "v1.2.3",
"time": {
"created": 1731000000000,
"updated": 1731001400000,
"compacting": 0,
"archived": 0
},
"permission": [
{ "permission": "edit", "pattern": "*", "action": "ask" }
],
"metadata": {},
"revert": {
"messageID": "msg_01HXY...",
"partID": "prt_01HXY...",
"snapshot": "snap_abc",
"diff": "diff --git a/..."
}
}

POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/unrevert

Section titled “POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/unrevert”

Restore all messages that were previously reverted.

Terminal window
curl -X POST "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/unrevert"
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
{
"id": "5fa1bd2e9c1d2c0001b2a3f4",
"slug": "refactor-auth-flow",
"projectID": "5f9f5c5e7b1e0c0001a2b3c4",
"directory": "/home/user/projects/app",
"parentID": null,
"summary": {
"additions": 142,
"deletions": 38,
"files": 7,
"diffs": []
},
"title": "Refactor auth flow",
"version": "v1.2.3",
"time": {
"created": 1731000000000,
"updated": 1731001500000,
"compacting": 0,
"archived": 0
},
"permission": [
{ "permission": "edit", "pattern": "*", "action": "ask" }
],
"metadata": {},
"revert": {
"messageID": "msg_01HXY..."
}
}

POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/abort

Section titled “POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/abort”

Abort any in-progress AI processing for the session.

Terminal window
curl -X POST "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/abort"
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
true

POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/summarize

Section titled “POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/summarize”

Generate a concise summary of the session using AI compaction. Use auto: true to run compaction automatically.

Terminal window
curl -X POST "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/summarize" \
-H "Content-Type: application/json" \
-d '{
"providerID": "anthropic",
"modelID": "claude-3-5-sonnet",
"auto": false,
"systemPrompt": "Summarize concisely."
}'
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
NameTypeRequiredDescription
providerIDstringYes
modelIDstringYes
autobooleanNoDefault: false
systemPromptstringNo
{
"providerID": "anthropic",
"modelID": "claude-3-5-sonnet",
"auto": false,
"systemPrompt": "Summarize concisely."
}
true

POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/init

Section titled “POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/init”

Trigger AI-based workspace analysis to generate or update an AGENTS.md configuration file.

Terminal window
curl -X POST "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/init" \
-H "Content-Type: application/json" \
-d '{
"providerID": "anthropic",
"modelID": "claude-3-5-sonnet",
"messageID": "msg_01HXY..."
}'
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes
NameTypeRequiredDescription
modelIDstringYes
providerIDstringYes
messageIDstringYesMatches ^msg.*
{
"providerID": "anthropic",
"modelID": "claude-3-5-sonnet",
"messageID": "msg_01HXY..."
}
true

POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/export

Section titled “POST /api/v1/workspaces/{workspaceID}/sessions/{sessionID}/export”

Export a session in Markdown, JSON, or Plain Text format.

Terminal window
curl -X POST "https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/export" \
-H "Accept: text/markdown"
NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
sessionIDpathstringYes

Returns the exported session content. The response content type depends on the request’s Accept header (text/markdown, application/json, or text/plain).