Skip to content
Hoody.com

The Agent Jobs endpoints manage async job lifecycle for the agent. Use these routes to poll a job’s status, fetch a terminal result, and cancel a pending or running job (or delete a finished record). Dispatch and workflow runs are also observable on the session stream — these endpoints are the canonical way to track a job by id.

Returns the status of an async job (dispatch, workflow run, or long tool call). The run_id field is null during the brief dispatch window for workflow runs.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves (HoodyPaths).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: "global" or a 24-hex id (also accepted as ?realm=). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
realmquerystringNoPer-request realm selector — the query alias of the X-Hoody-Realm header (read only when the header is absent).
{
"job_id": "job_01HMZK3X4F2N9P7QY8WT6VDRAB",
"kind": "session.workflow",
"session_id": "sess_01HMZK2XR9TJ6M3K0QW5BVPEFN",
"run_id": "run_01HMZK3X9C8W4PQ6Y2TBN5VKDA",
"status": "running",
"result": {},
"created_at": "2025-01-15T18:42:11.804Z",
"updated_at": "2025-01-15T18:42:14.217Z"
}
Terminal window
curl -X GET "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/jobs/job_01HMZK3X4F2N9P7QY8WT6VDRAB" \
-H "Authorization: Bearer <token>" \
-H "X-Hoody-Cwd: /workspace/project" \
-H "X-Hoody-Config-Dir: /home/user/.hoody" \
-H "X-Hoody-Container: {projectId}-{containerId}" \
-H "X-Hoody-Realm: global"

Returns the result of a completed job, or the running status. Dispatch jobs are observed on the session stream — the result endpoint reports the terminal status only.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves (HoodyPaths).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: "global" or a 24-hex id (also accepted as ?realm=). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
realmquerystringNoPer-request realm selector — the query alias of the X-Hoody-Realm header (read only when the header is absent).
{
"status": "succeeded",
"result": {
"answer_assist_suggestion": "The user is asking for the current build status. Reply: 'Build #482 passed all checks 3 minutes ago.'"
},
"session_id": "sess_01HMZK2XR9TJ6M3K0QW5BVPEFN"
}
Terminal window
curl -X GET "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/jobs/job_01HMZK3X4F2N9P7QY8WT6VDRAB/result" \
-H "Authorization: Bearer <token>" \
-H "X-Hoody-Cwd: /workspace/project" \
-H "X-Hoody-Config-Dir: /home/user/.hoody" \
-H "X-Hoody-Container: {projectId}-{containerId}" \
-H "X-Hoody-Realm: global"

Cancels a PENDING/RUNNING async job, or deletes a TERMINAL (succeeded / failed / canceled) job’s immutable historical record — the kit /jobs convention.

A pending or running job transitions to canceled and its work is stopped at the source:

  • A sessionless run (headless / long tool call) has its bounded context cancelled; the daemon honors the cancelled context.
  • A session dispatch / workflow turn is stopped via session.cancel; the active turn is cancelled, the session and its background tasks are spared.

A terminal job’s record is removed. The endpoint returns 200 {"status":"ok","canceled":true} on a cancel and 200 {"status":"ok","deleted":true} on a terminal-record delete. Returns 404 when the job id is unknown. The cancel is authoritative — a late terminator never flips a canceled job back to succeeded / failed.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves (HoodyPaths).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: "global" or a 24-hex id (also accepted as ?realm=). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
realmquerystringNoPer-request realm selector — the query alias of the X-Hoody-Realm header (read only when the header is absent).
{
"status": "ok",
"canceled": true
}
Terminal window
curl -X DELETE "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/jobs/job_01HMZK3X4F2N9P7QY8WT6VDRAB" \
-H "Authorization: Bearer <token>" \
-H "X-Hoody-Cwd: /workspace/project" \
-H "X-Hoody-Config-Dir: /home/user/.hoody" \
-H "X-Hoody-Container: {projectId}-{containerId}" \
-H "X-Hoody-Realm: global"