Skip to content
Hoody.com

Manage Hoody agent workflow definitions and drive workflow run lifecycle. Use the definition routes to list, read, create/replace, hide, and delete multi-step workflow files visible to a cwd/config_dir. Use the run routes to dispatch a workflow onto a live session, snapshot and inspect in-flight or recent runs, cancel an in-flight run, or resume a failed/cancelled run. Realm scoping is enforced by the gateway itself: the realm is the gateway’s pinned realm (or its active realm when unpinned), and a client-supplied X-Hoody-Realm / ?realm= selector cannot pivot the request into another realm.

All endpoints run on the agent service inside the project container.

https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com

List, read, create/replace, hide, and delete workflow definition files.

List the workflow definitions visible to the requesting cwd/config_dir. Realm-scoped to the gateway’s own realm; a client-supplied X-Hoody-Realm or ?realm= is ignored and cannot select another realm’s definitions.

NameInTypeRequiredDescription
pagequeryintegerNo1-based page number for pagination.
limitqueryintegerNoMaximum items per page (0 = no pagination).
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=).
realmquerystringNoPer-request realm selector — the ?realm= alias of the X-Hoody-Realm header.
Terminal window
curl -X GET 'https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/workflows?page=1&limit=50' \
-H 'Authorization: Bearer <token>' \
-H 'X-Hoody-Cwd: /home/user/project'

Read one workflow definition. Returns the definition wrapped in the tool {output,is_error} envelope. With ?include_revision=true, the output’s first line is revision: r1:<64hex> — the optimistic-concurrency baseline to send back as putWorkflow’s expected_revision — and the JSON below it is unchanged.

NameInTypeRequiredDescription
namepathstringYesPath identifier.
include_revisionquerybooleanNoIf "true", the tool output’s first line is revision: <opaque> — pass that value as putWorkflow’s expected_revision to guard against concurrent edits; the JSON below it is unchanged. Strictly parsed: exactly one value, "true" or "false"; anything else (empty, "TRUE", "1", repeated) is a 400 bad_request.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector.
realmquerystringNoPer-request realm selector (query alias).
Terminal window
curl -X GET 'https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/workflows/code-review?include_revision=true' \
-H 'Authorization: Bearer <token>' \
-H 'X-Hoody-Cwd: /home/user/project'

Create or replace one workflow definition. The body carries the definition object; the {name} path value is authoritative. The daemon validates the definition strictly before writing atomically (unknown fields rejected, the loader’s structural gate enforced), so a malformed definition is refused (is_error:true) rather than corrupting workflow.json. The system flag is authoritative from the embedded defaults — a caller cannot forge it.

NameInTypeRequiredDescription
namepathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector.
realmquerystringNoPer-request realm selector (query alias).
FieldTypeRequiredDescription
definitionobjectYesThe full workflow definition object (steps, entry_point, summary). Validated strictly server-side before an atomic write.
expected_revisionstringNoOptional optimistic-concurrency guard: the revision: value from getWorkflow (?include_revision=true). If the stored workflow changed since that read, the upsert is refused with [revision_conflict] and nothing is written. Omit to save unconditionally.
expected_absentbooleanNoOptional create-only guard: refuse with [already_exists] (writing nothing) if any workflow with this name already exists. Use when creating a new workflow that must not overwrite an existing one. Mutually exclusive with expected_revision.
Terminal window
curl -X PUT 'https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/workflows/code-review' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-H 'X-Hoody-Cwd: /home/user/project' \
-d '{
"definition": {
"summary": "Run a structured review on a pull request",
"steps": [
{ "id": "fetch_diff", "type": "tool", "tool": "read_file" },
{ "id": "analyze", "type": "llm", "prompt": "Review the diff" }
],
"entry_point": "fetch_diff"
},
"expected_revision": "r1:a1b2c3d4e5f6789012345678901234567890123456789012345678901234abcd"
}'

Hide or un-hide a workflow from the Workflows tab. Hiding is the only way to remove a system workflow from view — system workflows are re-seeded on every boot and can never be deleted; user workflows can also be hidden. Pass hidden:false in the body to un-hide. Realm-scoped to the gateway’s own realm; a client-supplied X-Hoody-Realm / ?realm= is ignored.

NameInTypeRequiredDescription
namepathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector.
realmquerystringNoPer-request realm selector (query alias).
FieldTypeRequiredDescription
hiddenbooleanNotrue (default) to hide the workflow; false to un-hide it.
Terminal window
curl -X POST 'https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/workflows/deploy-staging/hide' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-H 'X-Hoody-Cwd: /home/user/project' \
-d '{ "hidden": true }'

Delete one user workflow definition. System workflows are refused (is_error:true) — they re-seed on boot; hide them via hideWorkflow instead.

NameInTypeRequiredDescription
namepathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector.
realmquerystringNoPer-request realm selector (query alias).
Terminal window
curl -X DELETE 'https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/workflows/code-review' \
-H 'Authorization: Bearer <token>' \
-H 'X-Hoody-Cwd: /home/user/project'

Dispatch a run onto a live session, snapshot and inspect in-flight or recent runs, cancel an in-flight run, or resume a failed/cancelled run. Run events flow on the owning session’s WS/SSE attach; there is no per-run event bus.

Returns a snapshot of in-flight and recently-finished workflow runs (the registry exposes Snapshot(), not Subscribe()). Poll this to track a run’s progress; live events also flow on the owning session’s stream.

NameInTypeRequiredDescription
pagequeryintegerNo1-based page number for pagination.
limitqueryintegerNoMaximum items per page (0 = no pagination).
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector.
realmquerystringNoPer-request realm selector (query alias).
Terminal window
curl -X GET 'https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/workflows/runs?page=1&limit=50' \
-H 'Authorization: Bearer <token>' \
-H 'X-Hoody-Cwd: /home/user/project'

Returns a single workflow run by id, including per-step outcomes (step id, status, duration, tokens, and error). The leaner listWorkflowRuns snapshot omits per-step outcomes. Returns 404 not_found when the run id is no longer retained (evicted or never existed), or belongs to another realm/account.

NameInTypeRequiredDescription
run_idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector.
realmquerystringNoPer-request realm selector (query alias).
Terminal window
curl -X GET 'https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/workflows/runs/run_01HZX8KP9ABCDEF' \
-H 'Authorization: Bearer <token>' \
-H 'X-Hoody-Cwd: /home/user/project'

POST /api/v1/agent/sessions/{id}/workflows/{name}/runs

Section titled “POST /api/v1/agent/sessions/{id}/workflows/{name}/runs”

Dispatch a workflow run onto a live session and return {job_id}. job.run_id is null during the brief dispatch window and is populated once the workflow loop registers the run (observe workflow_start on the session’s stream). The session must already exist.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
namepathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector.
realmquerystringNoPer-request realm selector (query alias).
FieldTypeRequiredDescription
promptstringNoOptional input text fed to the workflow run ($(workflow.prompt)).
inputsobjectNoOptional run-time values for the workflow’s declared input parameters (declared name → string value; resolves to $(input.<name>) in every step). A workflow with a required declared parameter cannot run without these. Values must be strings; a non-string value is a 400.
Terminal window
curl -X POST 'https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/sessions/sess_01HZX8KP9SESSID/workflows/code-review/runs' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-H 'X-Hoody-Cwd: /home/user/project' \
-d '{
"prompt": "Review PR #1234 for security and style issues",
"inputs": { "pr_number": "1234", "repo": "hoody-platform/core" }
}'

POST /api/v1/agent/workflows/runs/{run_id}/cancel

Section titled “POST /api/v1/agent/workflows/runs/{run_id}/cancel”

Cancel an in-flight workflow run by run id.

NameInTypeRequiredDescription
run_idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector.
realmquerystringNoPer-request realm selector (query alias).
Terminal window
curl -X POST 'https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/workflows/runs/run_01HZX8KP9ABCDEF/cancel' \
-H 'Authorization: Bearer <token>' \
-H 'X-Hoody-Cwd: /home/user/project'

POST /api/v1/agent/workflows/runs/{run_id}/resume

Section titled “POST /api/v1/agent/workflows/runs/{run_id}/resume”

Resume a terminal (failed/cancelled) run in a live session. Committed steps replay from the run’s recorded journal and execution continues live from the first incomplete step. The resuming session must match the run’s realm, owner, working directory, and container binding; refusals return an actionable message.

NameInTypeRequiredDescription
run_idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector.
realmquerystringNoPer-request realm selector (query alias).
FieldTypeRequiredDescription
session_idstringYesA live session matching the run’s realm, owner, working directory, and container binding.
Terminal window
curl -X POST 'https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/workflows/runs/run_01HZX8KP9ABCDEF/resume' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-H 'X-Hoody-Cwd: /home/user/project' \
-d '{ "session_id": "sess_01HZX8KP9SESSID" }'