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.
curl " https://api.hoody.com/api/v1/agent/all?workspace=5f9f5c5e7b1e0c0001a2b3c4&limit=50 "
await client . agent . sessions . listAll ({
workspace: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
Name In Type Required Description workspacequery string No directoryquery string No readonlyquery string No read_onlyquery string No cardWidthquery string No limitquery string No subquery string No archivedquery string No containerIdquery string No projectIdquery string No serverNodequery string No containerAliasquery string No
Returns an HTML page representing the sessions wall.
Renders an HTML page showing live agent sessions, designed for iframe embedding.
curl " https://api.hoody.com/api/v1/agent/sessions/live?workspace=5f9f5c5e7b1e0c0001a2b3c4 "
await client . agent . sessions . listLive ({
workspace: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
Name In Type Required Description workspacequery string No — directoryquery string No — readonlyquery string No — read_onlyquery string No — cardWidthquery string No — limitquery string No — subquery string No — archivedquery string No — containerIdquery string No — projectIdquery string No — serverNodequery string No — containerAliasquery string No —
Returns an HTML page representing the sessions wall.
Returns a paginated list of all sessions in a workspace, newest-first by session ID.
curl " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions?page=1&limit=50&roots=true "
await client . agent . sessions . list ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) pagequery integer No Page number (1-indexed). Default: 1 limitquery integer No Items per page (max 200). Default: 50 rootsquery boolean No Only return root sessions (no parentID) searchquery string No Filter by title (case-insensitive)
"id" : " 5fa1bd2e9c1d2c0001b2a3f4 " ,
"slug" : " refactor-auth-flow " ,
"projectID" : " 5f9f5c5e7b1e0c0001a2b3c4 " ,
"directory" : " /home/user/projects/app " ,
"title" : " Refactor auth flow " ,
"created" : 1731000000000 ,
"updated" : 1731000450000 ,
{ "permission" : " edit " , "pattern" : " * " , "action" : " allow " }
"messageID" : " msg_01HXY... " ,
"partID" : " prt_01HXY... " ,
Retrieve a single session by ID within the workspace.
curl " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123 "
await client . agent . sessions . get ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
"id" : " 5fa1bd2e9c1d2c0001b2a3f4 " ,
"slug" : " refactor-auth-flow " ,
"projectID" : " 5f9f5c5e7b1e0c0001a2b3c4 " ,
"directory" : " /home/user/projects/app " ,
"title" : " Refactor auth flow " ,
"created" : 1731000000000 ,
"updated" : 1731000450000 ,
{ "permission" : " edit " , "pattern" : " * " , "action" : " allow " }
"messageID" : " msg_01HXY... " ,
"partID" : " prt_01HXY... " ,
"diff" : " diff --git a/... "
"message" : " Session not found "
Retrieve all sessions forked from the specified parent.
curl " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/children "
await client . agent . sessions . getChildren ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
"id" : " 5fa1bd2e9c1d2c0001b2a3f5 " ,
"slug" : " refactor-auth-flow-experiment-1 " ,
"projectID" : " 5f9f5c5e7b1e0c0001a2b3c4 " ,
"directory" : " /home/user/projects/app " ,
"parentID" : " 5fa1bd2e9c1d2c0001b2a3f4 " ,
"title" : " Refactor auth flow — experiment 1 " ,
"created" : 1731000500000 ,
"updated" : 1731000700000 ,
{ "permission" : " edit " , "pattern" : " * " , "action" : " ask " }
"messageID" : " msg_01HXY... "
"message" : " Session not found "
Retrieve the current status of every session in the workspace (active, idle, retry, busy).
curl " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/status "
await client . agent . sessions . getStatuses ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
"ses_01HXY123" : { "type" : " busy " },
"ses_01HXY124" : { "type" : " idle " },
"message" : " Provider returned 503 " ,
Retrieve a lightweight summary: title, token/cost totals, file change stats, and the last message snippet. O(messages) reads with no AI call triggered.
curl " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/summary "
await client . agent . sessions . getSummary ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
"sessionID" : " ses_01HXY123 " ,
"title" : " Refactor auth flow " ,
"snippet" : " I've finished wiring the OAuth callback handler. " ,
"created" : 1731000000000 ,
"message" : " Session not found "
Get file changes (diffs) resulting from the session. Optionally scope the diff to a specific message.
curl " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/diff?messageID=msg_01HXY... "
await client . agent . sessions . getDiff ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
messageID: " msg_01HXY... " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes messageIDquery string No Optional 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 */ } " ,
"file" : " src/auth/oauth.ts " ,
"after" : " export const config = { provider: 'github' } " ,
"message" : " Session not found "
Retrieve the todo list associated with a session.
curl " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/todo "
await client . agent . sessions . getTodo ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
"content" : " Migrate callback handler to async/await " ,
"content" : " Add integration test for OAuth refresh " ,
"content" : " Document the new env vars " ,
"message" : " Session not found "
Replace the MITM tags on a session. This surface and /mitm/sessions/{sessionID}/tags share the same canonical-equality fast path.
curl -X PATCH " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/tags " \
-H " Content-Type: application/json " \
"tags": ["needs-review", "security", "v2"]
await client . agent . sessions . updateTags ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
tags: [ " needs-review " , " security " , " v2 " ],
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
Name Type Required Description tagsarray Yes
"tags" : [ " needs-review " , " security " , " v2 " ]
"id" : " 5fa1bd2e9c1d2c0001b2a3f4 " ,
"slug" : " refactor-auth-flow " ,
"projectID" : " 5f9f5c5e7b1e0c0001a2b3c4 " ,
"directory" : " /home/user/projects/app " ,
"title" : " Refactor auth flow " ,
"created" : 1731000000000 ,
"updated" : 1731000800000 ,
{ "permission" : " edit " , "pattern" : " * " , "action" : " allow " }
"messageID" : " msg_01HXY... "
{ "path" : " tags " , "message" : " tags must be an array of strings " }
"message" : " Session not found "
Retrieve messages from a session, oldest first. Use the after cursor parameter for incremental polling.
curl " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/messages?limit=20&role=assistant&after=msg_01HXY... "
await client . agent . sessions . listMessages ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes limitquery integer No Maximum messages to return rolequery string No Filter by role. Allowed values: user, assistant afterquery string No Cursor: only return messages with ID strictly greater than this (newer)
"sessionID" : " ses_01HXY123 " ,
"time" : { "created" : 1731000000000 },
"summary" : { "diffs" : [] },
"model" : { "providerID" : " anthropic " , "modelID" : " claude-3-5-sonnet " },
"system" : " You are a helpful coding assistant. " ,
"tools" : { "bash" : true , "edit" : true },
"sessionID" : " ses_01HXY123 " ,
"messageID" : " msg_01HXY... " ,
"text" : " Refactor the auth callback to be async. " ,
"time" : { "start" : 1731000000000 }
"sessionID" : " ses_01HXY123 " ,
"time" : { "created" : 1731000005000 , "completed" : 1731000030000 },
"parentID" : " msg_01HXY... " ,
"modelID" : " claude-3-5-sonnet " ,
"providerID" : " anthropic " ,
"path" : { "cwd" : " /home/user/projects/app " , "root" : " /home/user/projects/app " },
"cache" : { "read" : 120 , "write" : 40 }
"sessionID" : " ses_01HXY123 " ,
"messageID" : " msg_01HXY... " ,
"text" : " I'll refactor the auth callback handler. "
"message" : " Session not found "
Retrieve a specific message from a session, including all of its parts.
curl " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/messages/msg_01HXY... "
await client . agent . sessions . getMessage ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
messageID: " msg_01HXY... " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes messageIDpath string Yes
"sessionID" : " ses_01HXY123 " ,
"time" : { "created" : 1731000005000 , "completed" : 1731000030000 },
"parentID" : " msg_01HXY... " ,
"modelID" : " claude-3-5-sonnet " ,
"providerID" : " anthropic " ,
"path" : { "cwd" : " /home/user/projects/app " , "root" : " /home/user/projects/app " },
"cache" : { "read" : 120 , "write" : 40 }
"sessionID" : " ses_01HXY123 " ,
"messageID" : " msg_01HXY... " ,
"text" : " I'll refactor the auth callback handler. "
"sessionID" : " ses_01HXY123 " ,
"messageID" : " msg_01HXY... " ,
"cache" : { "read" : 120 , "write" : 40 }
"message" : " Message not found "
Update mutable fields on a user message — for example, switching the model while retrying.
curl -X PATCH " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/message/msg_01HXY... " \
-H " Content-Type: application/json " \
"model": { "providerID": "anthropic", "modelID": "claude-3-5-sonnet" }
await client . agent . sessions . updateMessage ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
messageID: " msg_01HXY... " ,
model: { providerID: " anthropic " , modelID: " claude-3-5-sonnet " },
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes messageIDpath string Yes
Name Type Required Description modelobject Yes providerID and modelID (both required)
"providerID" : " anthropic " ,
"modelID" : " claude-3-5-sonnet "
"sessionID" : " ses_01HXY123 " ,
"time" : { "created" : 1731000000000 },
"model" : { "providerID" : " anthropic " , "modelID" : " claude-3-5-sonnet " }
"sessionID" : " ses_01HXY123 " ,
"messageID" : " msg_01HXY... " ,
"text" : " Refactor the auth callback to be async. "
{ "path" : " model.modelID " , "message" : " modelID is required " }
"message" : " Message not found "
Update a part attached to a message.
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 " \
"sessionID": "ses_01HXY123",
"messageID": "msg_01HXY...",
"text": "Updated text content"
await client . agent . sessions . updatePart ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
messageID: " msg_01HXY... " ,
sessionID: " ses_01HXY123 " ,
messageID: " msg_01HXY... " ,
text: " Updated text content " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes messageIDpath string Yes partIDpath string Yes Part 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).
"sessionID" : " ses_01HXY123 " ,
"messageID" : " msg_01HXY... " ,
"text" : " Updated text content "
"sessionID" : " ses_01HXY123 " ,
"messageID" : " msg_01HXY... " ,
"text" : " Updated text content " ,
"time" : { "start" : 1731000000000 }
{ "path" : " type " , "message" : " unsupported part type " }
"message" : " Part not found "
Delete a part from a message.
curl -X DELETE " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/message/msg_01HXY.../part/prt_01HXY... "
await client . agent . sessions . deletePart ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
messageID: " msg_01HXY... " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes messageIDpath string Yes partIDpath string Yes Part ID
{ "path" : " partID " , "message" : " partID is malformed " }
"message" : " Part not found "
Create a new session in the workspace. Pass a parentID to fork from an existing session.
curl -X POST " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions " \
-H " Content-Type: application/json " \
"title": "Investigate flaky CI test",
{ "permission": "edit", "pattern": "*", "action": "ask" }
"metadata": { "priority": "high" }
await client . agent . sessions . create ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
title: " Investigate flaky CI test " ,
{ permission: " edit " , pattern: " * " , action: " ask " },
metadata: { priority: " high " },
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex)
Name Type Required Description parentIDstring No Must match ^[0-9a-f]{24}$ titlestring No permissionarray No PermissionRuleset — array of { permission, pattern, action }metadataobject No Free-form key/value map
"title" : " Investigate flaky CI test " ,
{ "permission" : " edit " , "pattern" : " * " , "action" : " ask " }
"metadata" : { "priority" : " high " }
"id" : " 5fa1bd2e9c1d2c0001b2a3f6 " ,
"slug" : " investigate-flaky-ci-test " ,
"projectID" : " 5f9f5c5e7b1e0c0001a2b3c4 " ,
"directory" : " /home/user/projects/app " ,
"title" : " Investigate flaky CI test " ,
"created" : 1731000900000 ,
"updated" : 1731000900000 ,
{ "permission" : " edit " , "pattern" : " * " , "action" : " ask " }
"metadata" : { "priority" : " high " },
"messageID" : " msg_01HXY... "
{ "path" : " parentID " , "message" : " parentID must match ^[0-9a-f]{24}$ " }
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.
curl -X PATCH " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123 " \
-H " Content-Type: application/json " \
"title": "Refactor auth flow (renamed)",
"time": { "archived": 0 },
{ "permission": "edit", "pattern": "src/auth/**", "action": "ask" }
await client . agent . sessions . update ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
title: " Refactor auth flow (renamed) " ,
{ permission: " edit " , pattern: " src/auth/** " , action: " ask " },
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
Name Type Required Description titlestring No New session title (min length 1) timeobject No Timestamp fields to update. Contains archived (ms since epoch, or 0 to unarchive) permissionarray | null No Session-scoped ruleset. [] clears overrides; null removes the field
"title" : " Refactor auth flow (renamed) " ,
"time" : { "archived" : 0 },
{ "permission" : " edit " , "pattern" : " src/auth/** " , "action" : " ask " }
"id" : " 5fa1bd2e9c1d2c0001b2a3f4 " ,
"slug" : " refactor-auth-flow-renamed " ,
"projectID" : " 5f9f5c5e7b1e0c0001a2b3c4 " ,
"directory" : " /home/user/projects/app " ,
"title" : " Refactor auth flow (renamed) " ,
"created" : 1731000000000 ,
"updated" : 1731001000000 ,
{ "permission" : " edit " , "pattern" : " src/auth/** " , "action" : " ask " }
"messageID" : " msg_01HXY... "
{ "path" : " permission " , "message" : " permission must be an array, null, or omitted " }
"message" : " Session not found "
Delete a session and all associated data. This action is irreversible.
curl -X DELETE " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123 "
await client . agent . sessions . delete ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
"message" : " Session not found "
Send a message to a session, streaming the AI response.
curl -X POST " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/message " \
-H " Content-Type: application/json " \
"messageID": "msg_01HXY...",
"model": { "providerID": "anthropic", "modelID": "claude-3-5-sonnet" },
{ "type": "text", "text": "Add a retry policy to the HTTP client." }
await client . agent . sessions . prompt ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
messageID: " msg_01HXY... " ,
model: { providerID: " anthropic " , modelID: " claude-3-5-sonnet " },
{ type: " text " , text: " Add a retry policy to the HTTP client. " },
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
Name Type Required Description messageIDstring No Matches ^msg.* modelobject No providerID and modelID (both required when present)agentstring No noReplyboolean No toolsobject No Deprecated — set permission on the session instead. Map of tool name to boolean systemstring No variantstring No partsarray Yes Array of TextPartInput, FilePartInput, AgentPartInput, or SubtaskPartInput
"messageID" : " msg_01HXY... " ,
"model" : { "providerID" : " anthropic " , "modelID" : " claude-3-5-sonnet " },
{ "type" : " text " , "text" : " Add a retry policy to the HTTP client. " }
"sessionID" : " ses_01HXY123 " ,
"time" : { "created" : 1731001000000 , "completed" : 1731001030000 },
"parentID" : " msg_01HXY... " ,
"modelID" : " claude-3-5-sonnet " ,
"providerID" : " anthropic " ,
"path" : { "cwd" : " /home/user/projects/app " , "root" : " /home/user/projects/app " },
"cache" : { "read" : 80 , "write" : 40 }
"sessionID" : " ses_01HXY123 " ,
"messageID" : " msg_01HXY... " ,
"text" : " I'll add a retry policy to the HTTP client. "
{ "path" : " parts " , "message" : " parts must be a non-empty array " }
"message" : " Session not found "
Send a message to a session asynchronously. The endpoint returns immediately after the prompt is accepted; stream the response separately.
curl -X POST " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/prompt_async " \
-H " Content-Type: application/json " \
"model": { "providerID": "anthropic", "modelID": "claude-3-5-sonnet" },
{ "type": "text", "text": "Add a retry policy to the HTTP client." }
await client . agent . sessions . promptAsync ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
model: { providerID: " anthropic " , modelID: " claude-3-5-sonnet " },
{ type: " text " , text: " Add a retry policy to the HTTP client. " },
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
Name Type Required Description messageIDstring No Matches ^msg.* modelobject No providerID and modelID (both required when present)agentstring No noReplyboolean No toolsobject No Deprecated — set permission on the session instead. Map of tool name to boolean systemstring No variantstring No partsarray Yes Array of TextPartInput, FilePartInput, AgentPartInput, or SubtaskPartInput
"model" : { "providerID" : " anthropic " , "modelID" : " claude-3-5-sonnet " },
{ "type" : " text " , "text" : " Add a retry policy to the HTTP client. " }
The prompt was accepted. The session processes the message in the background.
{ "path" : " parts " , "message" : " parts must be a non-empty array " }
"message" : " Session not found "
Send a slash command to a session for execution by the AI assistant.
curl -X POST " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/command " \
-H " Content-Type: application/json " \
"messageID": "msg_01HXY...",
"model": "claude-3-5-sonnet",
"arguments": "scan the repo"
await client . agent . sessions . command ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
messageID: " msg_01HXY... " ,
model: " claude-3-5-sonnet " ,
arguments: " scan the repo " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
Name Type Required Description messageIDstring No Matches ^msg.* agentstring No modelstring No argumentsstring Yes commandstring Yes variantstring No partsarray No Array of file parts (type: "file", mime, url required)
"messageID" : " msg_01HXY... " ,
"model" : " claude-3-5-sonnet " ,
"arguments" : " scan the repo "
"sessionID" : " ses_01HXY123 " ,
"time" : { "created" : 1731001100000 , "completed" : 1731001130000 },
"parentID" : " msg_01HXY... " ,
"modelID" : " claude-3-5-sonnet " ,
"providerID" : " anthropic " ,
"path" : { "cwd" : " /home/user/projects/app " , "root" : " /home/user/projects/app " },
"cache" : { "read" : 60 , "write" : 30 }
"sessionID" : " ses_01HXY123 " ,
"messageID" : " msg_01HXY... " ,
"text" : " Running /init... "
{ "path" : " command " , "message" : " command is required " }
"message" : " Session not found "
Execute a shell command within the session context. Returns the assistant’s response.
curl -X POST " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/shell " \
-H " Content-Type: application/json " \
"model": { "providerID": "anthropic", "modelID": "claude-3-5-sonnet" },
"command": "ls -la src/auth"
await client . agent . sessions . shell ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
model: { providerID: " anthropic " , modelID: " claude-3-5-sonnet " },
command: " ls -la src/auth " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
Name Type Required Description agentstring Yes modelobject No providerID and modelID (both required when present)commandstring Yes
"model" : { "providerID" : " anthropic " , "modelID" : " claude-3-5-sonnet " },
"command" : " ls -la src/auth "
"sessionID" : " ses_01HXY123 " ,
"time" : { "created" : 1731001200000 , "completed" : 1731001210000 },
"parentID" : " msg_01HXY... " ,
"modelID" : " claude-3-5-sonnet " ,
"providerID" : " anthropic " ,
"path" : { "cwd" : " /home/user/projects/app " , "root" : " /home/user/projects/app " },
"cache" : { "read" : 20 , "write" : 10 }
{ "path" : " command " , "message" : " command is required " }
"message" : " Session not found "
Create a new session forked at a specific message point. The new session starts empty but inherits state up to messageID.
curl -X POST " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/fork " \
-H " Content-Type: application/json " \
-d ' { "messageID": "msg_01HXY..." } '
await client . agent . sessions . fork ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
data: { messageID: " msg_01HXY... " },
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
Name Type Required Description messageIDstring No Matches ^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 " ,
"title" : " Refactor auth flow (fork) " ,
"created" : 1731001300000 ,
"updated" : 1731001300000 ,
{ "permission" : " edit " , "pattern" : " * " , "action" : " ask " }
"messageID" : " msg_01HXY... "
{ "path" : " messageID " , "message" : " messageID must match ^msg.* " }
"message" : " Source session not found "
Revert a session to a specific message, undoing all subsequent changes.
curl -X POST " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/revert " \
-H " Content-Type: application/json " \
"messageID": "msg_01HXY...",
await client . agent . sessions . revert ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
messageID: " msg_01HXY... " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
Name Type Required Description messageIDstring Yes Matches ^msg.* partIDstring No Matches ^prt.*
"messageID" : " msg_01HXY... " ,
"id" : " 5fa1bd2e9c1d2c0001b2a3f4 " ,
"slug" : " refactor-auth-flow " ,
"projectID" : " 5f9f5c5e7b1e0c0001a2b3c4 " ,
"directory" : " /home/user/projects/app " ,
"title" : " Refactor auth flow " ,
"created" : 1731000000000 ,
"updated" : 1731001400000 ,
{ "permission" : " edit " , "pattern" : " * " , "action" : " ask " }
"messageID" : " msg_01HXY... " ,
"partID" : " prt_01HXY... " ,
"diff" : " diff --git a/... "
{ "path" : " messageID " , "message" : " messageID is required " }
"message" : " Session not found "
Restore all messages that were previously reverted.
curl -X POST " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/unrevert "
await client . agent . sessions . unrevert ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
"id" : " 5fa1bd2e9c1d2c0001b2a3f4 " ,
"slug" : " refactor-auth-flow " ,
"projectID" : " 5f9f5c5e7b1e0c0001a2b3c4 " ,
"directory" : " /home/user/projects/app " ,
"title" : " Refactor auth flow " ,
"created" : 1731000000000 ,
"updated" : 1731001500000 ,
{ "permission" : " edit " , "pattern" : " * " , "action" : " ask " }
"messageID" : " msg_01HXY... "
{ "path" : " session " , "message" : " no prior revert to restore " }
"message" : " Session not found "
Abort any in-progress AI processing for the session.
curl -X POST " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/abort "
await client . agent . sessions . abort ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
"message" : " Session not found "
Generate a concise summary of the session using AI compaction. Use auto: true to run compaction automatically.
curl -X POST " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/summarize " \
-H " Content-Type: application/json " \
"providerID": "anthropic",
"modelID": "claude-3-5-sonnet",
"systemPrompt": "Summarize concisely."
await client . agent . sessions . summarize ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
modelID: " claude-3-5-sonnet " ,
systemPrompt: " Summarize concisely. " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
Name Type Required Description providerIDstring Yes modelIDstring Yes autoboolean No Default: false systemPromptstring No
"providerID" : " anthropic " ,
"modelID" : " claude-3-5-sonnet " ,
"systemPrompt" : " Summarize concisely. "
{ "path" : " modelID " , "message" : " modelID is required " }
"message" : " Session not found "
"error" : " Session is busy " ,
Note
The 409 response includes an optional code field that discriminates sub-cases such as loop_already_active, session_busy, and loop_install_aborted, so SDK consumers don’t have to regex-match human messages.
Trigger AI-based workspace analysis to generate or update an AGENTS.md configuration file.
curl -X POST " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/init " \
-H " Content-Type: application/json " \
"providerID": "anthropic",
"modelID": "claude-3-5-sonnet",
"messageID": "msg_01HXY..."
await client . agent . sessions . init ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
modelID: " claude-3-5-sonnet " ,
messageID: " msg_01HXY... " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
Name Type Required Description modelIDstring Yes providerIDstring Yes messageIDstring Yes Matches ^msg.*
"providerID" : " anthropic " ,
"modelID" : " claude-3-5-sonnet " ,
"messageID" : " msg_01HXY... "
{ "path" : " messageID " , "message" : " messageID is required " }
"message" : " Session not found "
Export a session in Markdown, JSON, or Plain Text format.
curl -X POST " https://api.hoody.com/api/v1/workspaces/5f9f5c5e7b1e0c0001a2b3c4/sessions/ses_01HXY123/export " \
-H " Accept: text/markdown "
await client . agent . sessions . export ({
workspaceID: " 5f9f5c5e7b1e0c0001a2b3c4 " ,
sessionID: " ses_01HXY123 " ,
Name In Type Required Description workspaceIDpath string Yes Workspace identifier (project ID or workspace entry ID; 24-char lowercase hex) sessionIDpath string Yes
Returns the exported session content. The response content type depends on the request’s Accept header (text/markdown, application/json, or text/plain).
{ "path" : " Accept " , "message" : " unsupported content type " }
"message" : " Session not found "
Tip
The export format is selected via the request’s Accept header: text/markdown (default), application/json, or text/plain. Compression options and per-format content selection are configured on the request via the same Accept negotiation surface.