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

# Get agent logs

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

## Request

- Base URL: `http://localhost:3000`
- URL: `http://localhost:3000/api/agents/{agentId}/logs`
- Auth: none declared

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.dev/elizaos/apis/eliza-os-api.md) - [All operations](https://skmtc.dev/elizaos/apis/eliza-os-api/llms.txt) - [OpenAPI document](https://skmtc.dev/elizaos/apis/eliza-os-api/revisions/d606a12682bb?raw)
