# Agent: Logs

**Page:** api/agent/logs

[Download Raw Markdown](./api/agent/logs.md)

---

{/* AUTO-GENERATED — Do not edit manually. Regenerate with: npm run docs:api:generate */}



## Agent: Logs

The Agent Logs API exposes the daemon's redacted log stream for query, single-entry fetch, source listing, volume statistics, SSE tailing, and filtered file export. All log entries returned by these routes are ALWAYS redacted at the gateway before reaching the client. These endpoints are **active-only**: there is no `realm` dimension to scope, so any per-request `X-Hoody-Realm` header or `?realm=` query parameter is rejected with `realm_scope_unsupported`. Local sources export a point-in-time-consistent snapshot of the in-daemon ring; platform sources export a single query page and mark the export partial when more rows remained.


The agent daemon runs inside the bound container and is reached through the Hoody proxy. Requests that bypass the proxy and hit the container directly are rejected with `forbidden`.


---

### Query logs

`GET /api/v1/agent/logs`

Queries the active log stream (`logs.query`). Filters ride on query parameters (source, level, host, since, until, ...). `?limit=N` caps the result set (the daemon default is 200) and is forwarded; the stream paginates by cursor (`since_seq` / `before_seq`), not by page.

#### Parameters

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `source` | query | string | No | Filter to a log source/facet (see `logsSources`). |
| `level` | query | string | No | Filter to a minimum log level. |
| `host` | query | string | No | Filter to a host. |
| `since` | query | string | No | Lower time/cursor bound (`since_seq` cursor passes through verbatim). |
| `until` | query | string | No | Upper time bound. |
| `limit` | query | integer | No | Caps the result set (daemon default 200). A non-numeric value is rejected 400. |
| `X-Hoody-Cwd` | header | string | No | Per-request working-directory scope: the `.hoody` project layer / record cwd / tool+workflow cwd. |
| `X-Hoody-Config-Dir` | header | string | No | Per-request `--config-dir` override selecting which on-disk `.hoody` install a stateless read/write resolves (HoodyPaths). |
| `X-Hoody-Container` | header | string | No | Per-request bound remote container (omitted = local). Rejected (400) on routes with no container dimension. |
| `X-Hoody-Realm` | header | string | No | Per-request realm selector: `"global"` or a 24-hex id (also accepted as `?realm=`). Rejected (400 `realm_scope_unsupported`) on active-only / no-realm routes. |
| `realm` | query | string | No | Per-request realm selector — the `in:query` alias of the `X-Hoody-Realm` header (read only when the header is absent): `"global"` or a 24-hex id. Rejected (400 `realm_scope_unsupported`) on active-only / no-realm routes. |

#### Response



```json
{
  "rows": [
    {
      "seq": 18421,
      "ts": "2025-01-15T14:32:08.117Z",
      "level": "info",
      "source": "daemon",
      "host": "agent-1",
      "message": "session resumed",
      "attrs": { "session_id": "5f3e1c0d9b2a4f1e8c7d6b5a" }
    },
    {
      "seq": 18422,
      "ts": "2025-01-15T14:32:08.243Z",
      "level": "debug",
      "source": "tool",
      "host": "agent-1",
      "message": "tool invoked",
      "attrs": {
        "session_id": "5f3e1c0d9b2a4f1e8c7d6b5a",
        "tool": "bash",
        "status": "ok"
      }
    }
  ],
  "next_seq": 18423
}
```


```json
{
  "code": "bad_request",
  "message": "invalid request"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `bad_request` | Bad request | The request was malformed or carried invalid parameters. | Correct the request body or query parameters. |
| `realm_scope_unsupported` | Realm scope unsupported | A per-request realm header was supplied to an active-only / global-no-realm RPC, which has no realm dimension to scope. | Omit the realm header on this route, or open a session to scope by realm. |


```json
{
  "code": "forbidden",
  "message": "request must arrive through the Hoody proxy"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `forbidden` | Forbidden (not via the Hoody proxy) | Forbidden — the request did not reach the service through the public endpoint. | Reach the agent through `hoody-proxy` (e.g. `hoody agent …` → platform → proxy), not by connecting to the container directly. |


```json
{
  "code": "rate_limited",
  "message": "request rate limit exceeded"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `rate_limited` | Too many requests | The per-client request rate limit was exceeded; the gateway throttled the request before dispatch. | Honor the `Retry-After` header and retry; reduce the request rate. |


```json
{
  "code": "internal_error",
  "message": "internal server error"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `internal_error` | Internal error | An unexpected error occurred while handling the request. | Retry; if persistent, inspect the daemon logs. |



#### SDK

```ts
await client.agent.logs.queryLogs({ source: "daemon", level: "info", limit: 50 });
```

#### cURL

```bash
curl -G "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/logs" \
  --data-urlencode "source=daemon" \
  --data-urlencode "level=info" \
  --data-urlencode "limit=50"
```

---

### Read a log entry

`GET /api/v1/agent/logs/entries/{ref}`

Reads one log entry by `ref`. Entries are ALWAYS redacted. Active-only: a realm header is rejected.

#### Parameters

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `ref` | path | string | Yes | Path identifier. |
| `X-Hoody-Cwd` | header | string | No | Per-request working-directory scope. |
| `X-Hoody-Config-Dir` | header | string | No | Per-request `--config-dir` override. |
| `X-Hoody-Container` | header | string | No | Per-request bound remote container. |
| `X-Hoody-Realm` | header | string | No | Per-request realm selector. Rejected (400 `realm_scope_unsupported`). |
| `realm` | query | string | No | Per-request realm selector — query alias of `X-Hoody-Realm`. Rejected (400 `realm_scope_unsupported`). |

#### Response



```json
{
  "seq": 18421,
  "ts": "2025-01-15T14:32:08.117Z",
  "level": "info",
  "source": "daemon",
  "host": "agent-1",
  "message": "session resumed",
  "attrs": { "session_id": "5f3e1c0d9b2a4f1e8c7d6b5a" }
}
```


```json
{
  "code": "bad_request",
  "message": "invalid request"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `bad_request` | Bad request | The request was malformed or carried invalid parameters. | Correct the request body or query parameters. |
| `realm_scope_unsupported` | Realm scope unsupported | A per-request realm header was supplied to an active-only / global-no-realm RPC. | Omit the realm header on this route, or open a session to scope by realm. |


```json
{
  "code": "forbidden",
  "message": "request must arrive through the Hoody proxy"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `forbidden` | Forbidden (not via the Hoody proxy) | Forbidden — the request did not reach the service through the public endpoint. | Reach the agent through `hoody-proxy`, not by connecting to the container directly. |


```json
{
  "code": "rate_limited",
  "message": "request rate limit exceeded"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `rate_limited` | Too many requests | The per-client request rate limit was exceeded; the gateway throttled the request before dispatch. | Honor the `Retry-After` header and retry; reduce the request rate. |


```json
{
  "code": "internal_error",
  "message": "internal server error"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `internal_error` | Internal error | An unexpected error occurred while handling the request. | Retry; if persistent, inspect the daemon logs. |



#### SDK

```ts
await client.agent.logs.readLogEntry("18421");
```

#### cURL

```bash
curl "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/logs/entries/18421"
```

---

### Log sources

`GET /api/v1/agent/logs/sources`

Lists the available log sources / facets (`logs.sources`). Active-only: a realm header is rejected.

#### Parameters

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `X-Hoody-Cwd` | header | string | No | Per-request working-directory scope. |
| `X-Hoody-Config-Dir` | header | string | No | Per-request `--config-dir` override. |
| `X-Hoody-Container` | header | string | No | Per-request bound remote container. |
| `X-Hoody-Realm` | header | string | No | Per-request realm selector. Rejected (400 `realm_scope_unsupported`). |
| `realm` | query | string | No | Per-request realm selector — query alias of `X-Hoody-Realm`. Rejected (400 `realm_scope_unsupported`). |

#### Response



```json
{
  "sources": [
    { "id": "daemon",  "label": "Daemon",         "local": true },
    { "id": "session", "label": "Session",        "local": true },
    { "id": "tool",    "label": "Tool",           "local": true },
    { "id": "llm",     "label": "LLM",            "local": true },
    { "id": "activity","label": "Activity",       "local": false },
    { "id": "events",  "label": "Events",         "local": false },
    { "id": "proxy",   "label": "Proxy",          "local": false }
  ]
}
```


```json
{
  "code": "bad_request",
  "message": "invalid request"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `bad_request` | Bad request | The request was malformed or carried invalid parameters. | Correct the request body or query parameters. |
| `realm_scope_unsupported` | Realm scope unsupported | A per-request realm header was supplied to an active-only / global-no-realm RPC. | Omit the realm header on this route, or open a session to scope by realm. |


```json
{
  "code": "forbidden",
  "message": "request must arrive through the Hoody proxy"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `forbidden` | Forbidden (not via the Hoody proxy) | Forbidden — the request did not reach the service through the public endpoint. | Reach the agent through `hoody-proxy`, not by connecting to the container directly. |


```json
{
  "code": "rate_limited",
  "message": "request rate limit exceeded"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `rate_limited` | Too many requests | The per-client request rate limit was exceeded; the gateway throttled the request before dispatch. | Honor the `Retry-After` header and retry; reduce the request rate. |


```json
{
  "code": "internal_error",
  "message": "internal server error"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `internal_error` | Internal error | An unexpected error occurred while handling the request. | Retry; if persistent, inspect the daemon logs. |



#### SDK

```ts
await client.agent.logs.logsSources();
```

#### cURL

```bash
curl "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/logs/sources"
```

---

### Log statistics

`GET /api/v1/agent/logs/stats`

Returns log volume / level statistics (`logs.stats`). Active-only: a realm header is rejected.

#### Parameters

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `X-Hoody-Cwd` | header | string | No | Per-request working-directory scope. |
| `X-Hoody-Config-Dir` | header | string | No | Per-request `--config-dir` override. |
| `X-Hoody-Container` | header | string | No | Per-request bound remote container. |
| `X-Hoody-Realm` | header | string | No | Per-request realm selector. Rejected (400 `realm_scope_unsupported`). |
| `realm` | query | string | No | Per-request realm selector — query alias of `X-Hoody-Realm`. Rejected (400 `realm_scope_unsupported`). |

#### Response



```json
{
  "by_source": {
    "daemon": 18421,
    "session": 472,
    "tool": 9381,
    "llm": 1102
  },
  "by_level": {
    "debug": 14218,
    "info":  12073,
    "warn":  1984,
    "error": 101
  },
  "window": { "since": "2025-01-15T00:00:00Z", "until": "2025-01-15T23:59:59Z" }
}
```


```json
{
  "code": "bad_request",
  "message": "invalid request"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `bad_request` | Bad request | The request was malformed or carried invalid parameters. | Correct the request body or query parameters. |
| `realm_scope_unsupported` | Realm scope unsupported | A per-request realm header was supplied to an active-only / global-no-realm RPC. | Omit the realm header on this route, or open a session to scope by realm. |


```json
{
  "code": "forbidden",
  "message": "request must arrive through the Hoody proxy"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `forbidden` | Forbidden (not via the Hoody proxy) | Forbidden — the request did not reach the service through the public endpoint. | Reach the agent through `hoody-proxy`, not by connecting to the container directly. |


```json
{
  "code": "rate_limited",
  "message": "request rate limit exceeded"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `rate_limited` | Too many requests | The per-client request rate limit was exceeded; the gateway throttled the request before dispatch. | Honor the `Retry-After` header and retry; reduce the request rate. |


```json
{
  "code": "internal_error",
  "message": "internal server error"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `internal_error` | Internal error | An unexpected error occurred while handling the request. | Retry; if persistent, inspect the daemon logs. |



#### SDK

```ts
await client.agent.logs.logsStats();
```

#### cURL

```bash
curl "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/logs/stats"
```

---

### Stream the log tail (SSE)

`GET /api/v1/agent/logs/stream`

Tails the active log stream over Server-Sent Events (`logs.tail`). The stream paginates with a cursor it advances each round (`since_seq` = the previous reply's `next_seq`), 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: &lt;seq&gt;` (a reconnecting client resumes via the `Last-Event-ID` header, which overrides `?since_seq`)
- a `lagged` frame with `{code: "replay_gap"}` when the caller's cursor fell behind the ring
- periodic heartbeats
- `end` on disconnect

Filters ride query parameters (`source`, `level`, `host`, `since_seq`, ...); `?limit` caps each poll batch. Local sources only. Active-only: a realm header returns 400 `realm_scope_unsupported`. Entries are ALWAYS redacted.

#### Parameters

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `source` | query | string | No | Filter the tail to a log source/facet. |
| `level` | query | string | No | Filter to a minimum log level. |
| `host` | query | string | No | Filter to a host. |
| `since_seq` | query | integer | No | Initial resume cursor (the `Last-Event-ID` header overrides it). A non-numeric value is rejected 400. |
| `limit` | query | integer | No | Caps each poll batch. A non-numeric value is rejected 400. |
| `Last-Event-ID` | header | string | No | SSE 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-Cwd` | header | string | No | Per-request working-directory scope. |
| `X-Hoody-Config-Dir` | header | string | No | Per-request `--config-dir` override. |
| `X-Hoody-Container` | header | string | No | Per-request bound remote container. |
| `X-Hoody-Realm` | header | string | No | Per-request realm selector. Rejected (400 `realm_scope_unsupported`). |
| `realm` | query | string | No | Per-request realm selector — query alias of `X-Hoody-Realm`. Rejected (400 `realm_scope_unsupported`). |

#### Response



```
event: entry
id: 18421
data: {"seq":18421,"ts":"2025-01-15T14:32:08.117Z","level":"info","source":"daemon","host":"agent-1","message":"session resumed","attrs":{"session_id":"5f3e1c0d9b2a4f1e8c7d6b5a"}}

event: entry
id: 18422
data: {"seq":18422,"ts":"2025-01-15T14:32:08.243Z","level":"debug","source":"tool","host":"agent-1","message":"tool invoked","attrs":{"session_id":"5f3e1c0d9b2a4f1e8c7d6b5a","tool":"bash","status":"ok"}}

event: lagged
data: {"code":"replay_gap","from_seq":18001,"head_seq":18399}

: hb

event: end
data: {"reason":"client_disconnect"}
```


```json
{
  "code": "bad_request",
  "message": "invalid request"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `bad_request` | Bad request | The request was malformed or carried invalid parameters. | Correct the request body or query parameters. |
| `realm_scope_unsupported` | Realm scope unsupported | A per-request realm header was supplied to an active-only / global-no-realm RPC. | Omit the realm header on this route, or open a session to scope by realm. |


```json
{
  "code": "forbidden",
  "message": "request must arrive through the Hoody proxy"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `forbidden` | Forbidden (not via the Hoody proxy) | Forbidden — the request did not reach the service through the public endpoint. | Reach the agent through `hoody-proxy`, not by connecting to the container directly. |


```json
{
  "code": "rate_limited",
  "message": "request rate limit exceeded"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `rate_limited` | Too many requests | The per-client request rate limit was exceeded; the gateway throttled the request before dispatch. | Honor the `Retry-After` header and retry; reduce the request rate. |


```json
{
  "code": "internal_error",
  "message": "internal server error"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `internal_error` | Internal error | An unexpected error occurred while handling the request. | Retry; if persistent, inspect the daemon logs. |


```json
{
  "code": "service_unavailable",
  "message": "service unavailable"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `service_unavailable` | Service unavailable | The daemon could not service the request (too busy, or a per-client stream concurrency cap was hit). | Honor `Retry-After` and retry. |



#### SDK

```ts
await client.agent.logs.streamLogs({ source: "daemon", level: "info", limit: 100 });
```

#### cURL

```bash
curl -N "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/logs/stream?source=daemon&level=info&limit=100"
```

---

### Export logs as a downloadable file

`GET /api/v1/agent/logs/export`

Streams the filtered, ALWAYS-redacted log set as a download (`Content-Disposition: attachment`).

- `format=jsonl` (default, one wire row per line) or `txt` (human-readable).
- Local sources export a point-in-time-consistent snapshot of the in-daemon ring (bounded at the `seq` observed when the export starts).
- `source=activity|events|proxy` exports ONE platform query page (default `limit=2000`) and marks the export partial when more remained.
- Every export ends with an **in-band terminator** — `jsonl` emits a final `{"_hoody_export":{...}}` line and `txt` emits a trailing `# export: …` comment carrying `rows` / `gap` / `partial`. Its absence means the download was truncated.

Filters mirror the Logs tab exactly (`source`, `min_level`, `comp`, `session_id`, `text`, `since`, `until`, `event`, `tool`, `model`, `status`, `method`, `min_status`, `max_status`, `errors_only`, `event_type`, `resource_type`, `container_id`, `kind`, `host`); `?since_seq` exports incrementally; `?limit` caps total rows; `?filename` overrides the download name (reduced to a safe basename). Active-only: a realm header returns 400 `realm_scope_unsupported`.

#### Parameters

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `source` | query | string | No | Log source to export (see `logsSources`; one local source, one platform source, or omitted for all local sources). |
| `min_level` | query | string | No | Minimum log level (`debug`\|`info`\|`warn`\|`error`). |
| `comp` | query | string | No | Component filter (daemon source). |
| `session_id` | query | string | No | Session id filter. |
| `text` | query | string | No | Case-insensitive substring filter over `message` + `attrs`. |
| `since` | query | string | No | Lower time bound (RFC3339 or relative like `1h`/`7d`). |
| `until` | query | string | No | Upper time bound (RFC3339 or relative). |
| `event` | query | string | No | Session lifecycle event filter (session source). |
| `tool` | query | string | No | Tool name filter (tool source). |
| `model` | query | string | No | Model filter (llm source). |
| `status` | query | string | No | Tool outcome filter: `ok`\|`error`\|`cancelled` (tool source). |
| `method` | query | string | No | HTTP method filter (activity source). |
| `min_status` | query | integer | No | Minimum HTTP status (activity source). |
| `max_status` | query | integer | No | Maximum HTTP status (activity source). |
| `errors_only` | query | boolean | No | Only error rows (activity source; `true`/`false`). |
| `event_type` | query | string | No | Event type filter (events source). |
| `resource_type` | query | string | No | Resource type filter (events source). |
| `container` | query | string | No | Container filter (proxy source; empty = all running realm containers). Maps to the daemon's `container_id` filter. |
| `kind` | query | string | No | Proxy row kind: `request`\|`response`\|`event` (proxy source). |
| `host` | query | string | No | Proxy URL host filter (exact or dot-aligned suffix). |
| `since_seq` | query | integer | No | Exclusive lower seq bound for incremental exports (local sources). |
| `limit` | query | integer | No | TOTAL row cap across the export (default: everything the snapshot matches; platform default 2000). |
| `format` | query | string | No | Export format: `jsonl` (default) or `txt`. |
| `filename` | query | string | No | Download filename override (reduced to a safe basename). |
| `X-Hoody-Cwd` | header | string | No | Per-request working-directory scope. |
| `X-Hoody-Config-Dir` | header | string | No | Per-request `--config-dir` override. |
| `X-Hoody-Container` | header | string | No | Per-request bound remote container. |
| `X-Hoody-Realm` | header | string | No | Per-request realm selector. Rejected (400 `realm_scope_unsupported`). |
| `realm` | query | string | No | Per-request realm selector — query alias of `X-Hoody-Realm`. Rejected (400 `realm_scope_unsupported`). |

#### Response



```jsonl
{"seq":18421,"ts":"2025-01-15T14:32:08.117Z","level":"info","source":"daemon","host":"agent-1","message":"session resumed","attrs":{"session_id":"5f3e1c0d9b2a4f1e8c7d6b5a"}}
{"seq":18422,"ts":"2025-01-15T14:32:08.243Z","level":"debug","source":"tool","host":"agent-1","message":"tool invoked","attrs":{"session_id":"5f3e1c0d9b2a4f1e8c7d6b5a","tool":"bash","status":"ok"}}
{"_hoody_export":{"rows":2,"gap":false,"partial":false,"head_seq":18422,"format":"jsonl"}}
```


```json
{
  "code": "bad_request",
  "message": "invalid request"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `bad_request` | Bad request | The request was malformed or carried invalid parameters. | Correct the request body or query parameters. |
| `realm_scope_unsupported` | Realm scope unsupported | A per-request realm header was supplied to an active-only / global-no-realm RPC. | Omit the realm header on this route, or open a session to scope by realm. |


```json
{
  "code": "forbidden",
  "message": "request must arrive through the Hoody proxy"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `forbidden` | Forbidden (not via the Hoody proxy) | Forbidden — the request did not reach the service through the public endpoint. | Reach the agent through `hoody-proxy`, not by connecting to the container directly. |


```json
{
  "code": "rate_limited",
  "message": "request rate limit exceeded"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `rate_limited` | Too many requests | The per-client request rate limit was exceeded; the gateway throttled the request before dispatch. | Honor the `Retry-After` header and retry; reduce the request rate. |


```json
{
  "code": "internal_error",
  "message": "internal server error"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `internal_error` | Internal error | An unexpected error occurred while handling the request. | Retry; if persistent, inspect the daemon logs. |


```json
{
  "code": "service_unavailable",
  "message": "service unavailable"
}
```

| Error Code | Title | Description | Resolution |
|------------|-------|-------------|------------|
| `service_unavailable` | Service unavailable | The daemon could not service the request (too busy, or a per-client stream concurrency cap was hit). | Honor `Retry-After` and retry. |



#### SDK

```ts
await client.agent.exportLogs({
  source: "daemon",
  min_level: "info",
  format: "jsonl",
  filename: "agent-daemon-info.jsonl"
});
```

#### cURL

```bash
curl -OJ \
  "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/logs/export?source=daemon&min_level=info&format=jsonl&filename=agent-daemon-info.jsonl"
```