Skip to content

The agent logs API exposes the active-supervisor log stream: query historical entries, read individual redacted entries, list log sources/facets, fetch volume statistics, and tail the log stream over Server-Sent Events. All routes are active-only — they have no realm dimension, and any X-Hoody-Realm header (or ?realm= query alias) is rejected with 400 realm_scope_unsupported. Use these endpoints from client.agent.logs.*.

Query the active-supervisor log stream. Filters ride as query params (source, level, host, since, until); ?limit=N caps the result set.

NameInTypeRequiredDescription
sourcequerystringNoFilter to a log source/facet (see logsSources).
levelquerystringNoFilter to a minimum log level.
hostquerystringNoFilter to a host.
sincequerystringNoLower time/cursor bound (since_seq cursor passes through verbatim).
untilquerystringNoUpper time bound.
limitqueryintegerNoCaps the result set (daemon default 200). A non-numeric value is rejected 400.
realmquerystringNoPer-request realm selector (§6.1) — the in:query alias of the X-Hoody-Realm header (read only when the header is absent). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override (§6.1).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1): "global" or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
Terminal window
curl -G "https://api.hoody.com/api/v1/agent/logs" \
-H "X-Hoody-Cwd: /home/user/project" \
--data-urlencode "source=supervisor" \
--data-urlencode "level=warn" \
--data-urlencode "host=worker-01" \
--data-urlencode "since=2025-01-15T10:00:00Z" \
--data-urlencode "limit=100"
{
"entries": [
{
"ref": "lg_01HMK3Q8Y3P9X7C2N5B6J8F4DA",
"seq": 12340,
"source": "supervisor",
"level": "warn",
"host": "worker-01",
"ts": "2025-01-15T10:23:17.482Z",
"message": "container heartbeat missed"
},
{
"ref": "lg_01HMK3Q8Y3P9X7C2N5B6J8F4DB",
"seq": 12341,
"source": "supervisor",
"level": "error",
"host": "worker-01",
"ts": "2025-01-15T10:23:18.011Z",
"message": "tool run aborted by gate"
}
],
"next_seq": 12342,
"has_more": false
}

Read a single log entry by ref. Entries are ALWAYS redacted.

NameInTypeRequiredDescription
refpathstringYesPath identifier.
realmquerystringNoPer-request realm selector (§6.1) — the in:query alias of the X-Hoody-Realm header (read only when the header is absent). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override (§6.1).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1): "global" or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
Terminal window
curl "https://api.hoody.com/api/v1/agent/logs/entries/lg_01HMK3Q8Y3P9X7C2N5B6J8F4DA" \
-H "X-Hoody-Cwd: /home/user/project"
{
"ref": "lg_01HMK3Q8Y3P9X7C2N5B6J8F4DA",
"seq": 12340,
"source": "supervisor",
"level": "warn",
"host": "worker-01",
"ts": "2025-01-15T10:23:17.482Z",
"message": "container heartbeat missed",
"fields": {
"container_id": "cnt_01HMK3Q8Y3P9X7C2N5B6J8F4DX"
}
}

List the available log sources/facets that can be passed to the source query filter on queryLogs and streamLogs.

NameInTypeRequiredDescription
realmquerystringNoPer-request realm selector (§6.1) — the in:query alias of the X-Hoody-Realm header (read only when the header is absent). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override (§6.1).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1): "global" or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
Terminal window
curl "https://api.hoody.com/api/v1/agent/logs/sources" \
-H "X-Hoody-Cwd: /home/user/project"
{
"sources": [
{ "id": "supervisor", "label": "Supervisor", "count": 5432 },
{ "id": "workflow", "label": "Workflow", "count": 8110 },
{ "id": "tool", "label": "Tool runs", "count": 345 },
{ "id": "system", "label": "System", "count": 73 }
]
}

Return log volume and level statistics.

NameInTypeRequiredDescription
realmquerystringNoPer-request realm selector (§6.1) — the in:query alias of the X-Hoody-Realm header (read only when the header is absent). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override (§6.1).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1): "global" or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
Terminal window
curl "https://api.hoody.com/api/v1/agent/logs/stats" \
-H "X-Hoody-Cwd: /home/user/project"
{
"total": 13960,
"by_level": {
"debug": 1024,
"info": 9120,
"warn": 3380,
"error": 436
},
"by_source": {
"supervisor": 5432,
"workflow": 8110,
"tool": 345,
"system": 73
},
"window": {
"from": "2025-01-15T00:00:00Z",
"to": "2025-01-15T10:30:00Z"
}
}

Tail the active-supervisor log stream over Server-Sent Events. The gateway forward-pages the daemon with a cursor it advances each round (since_seq = the previous reply’s next_seq) and DRAINS capped pages before idling, so no row is skipped under load.

The tail rides the same seq / replay convention the session stream uses:

  • An entry frame per redacted row CARRYING id: <seq> — a reconnecting client resumes via the Last-Event-ID header, which overrides ?since_seq.
  • A lagged {code:replay_gap} frame when the caller’s cursor fell behind the ring.
  • Periodic heartbeats.
  • end on disconnect.

Filters ride query params (source, level, host, since_seq, …); ?limit caps each poll batch. Local sources only.

NameInTypeRequiredDescription
sourcequerystringNoFilter the tail to a log source/facet.
levelquerystringNoFilter to a minimum log level.
hostquerystringNoFilter to a host.
since_seqqueryintegerNoInitial resume cursor (the Last-Event-ID header overrides it). A non-numeric value is rejected 400.
limitqueryintegerNoCaps each poll batch. A non-numeric value is rejected 400.
realmquerystringNoPer-request realm selector (§6.1) — the in:query alias of the X-Hoody-Realm header (read only when the header is absent). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
Last-Event-IDheaderstringNoSSE resume cursor — the gateway int64 seq to resume from; OVERRIDES the ?since_seq query param. Sent automatically by an SSE client on reconnect.
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override (§6.1).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1): "global" or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
Terminal window
curl -N "https://api.hoody.com/api/v1/agent/logs/stream?source=supervisor&level=info&since_seq=12340&limit=200" \
-H "X-Hoody-Cwd: /home/user/project" \
-H "Accept: text/event-stream"
HTTP/1.1 200 OK
Content-Type: text/event-stream
Cache-Control: no-cache
Connection: keep-alive
id: 12340
event: entry
data: {"ref":"lg_01HMK3Q8Y3P9X7C2N5B6J8F4DA","seq":12340,"source":"supervisor","level":"info","host":"worker-01","ts":"2025-01-15T10:30:00.114Z","message":"tool run started"}
id: 12341
event: entry
data: {"ref":"lg_01HMK3Q8Y3P9X7C2N5B6J8F4DB","seq":12341,"source":"supervisor","level":"warn","host":"worker-01","ts":"2025-01-15T10:30:00.842Z","message":"rate limit approached"}
: heartbeat
id: 12342
event: entry
data: {"ref":"lg_01HMK3Q8Y3P9X7C2N5B6J8F4DC","seq":12342,"source":"supervisor","level":"info","host":"worker-01","ts":"2025-01-15T10:30:01.077Z","message":"tool run finished"}