---
title: "Get agent logs"
method: GET
path: "/api/agents/{agentId}/logs"
tags: ["logs"]
---

# Get agent logs

`GET /api/agents/{agentId}/logs`

Retrieve logs for a specific agent

## Path parameters

- `agentId` string, uuid, required

## Query parameters

- `since` integer — Timestamp (ms) to get logs from
- `until` integer — Timestamp (ms) to get logs until
- `level` 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal'
- `limit` integer

## Response `200`

Agent logs retrieved successfully

- object
  - `success` boolean
  - `data` object
    - `logs` LogEntry[]
      - `level` number — Log level
      - `time` number — Timestamp of the log entry
      - `msg` string — Log message
      - `agentId` string, uuid — ID of the related agent (if applicable)
      - `agentName` string — Name of the related agent (if applicable)
    - `count` integer

## Other responses

- `400` — Invalid agent ID
- `404` — Agent not found
- `500` — Error retrieving logs

---

[API](https://skmtc.net/elizaos/apis/eliza-os-api.md) · [All operations](https://skmtc.net/elizaos/apis/eliza-os-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elizaos/eliza-os-api/revisions/f43280bfdb0c/schema)
