---
title: "Follow the live events of one agent run"
method: GET
path: "/sandboxes/{sandboxId}/events"
tags: ["sandboxes"]
---

# Follow the live events of one agent run

`GET /sandboxes/{sandboxId}/events`

## Request

- Base URL: `https://api.letsship.ai/v1`
- URL: `https://api.letsship.ai/v1/sandboxes/{sandboxId}/events`
- Auth: none declared

Server-sent events. The stream starts with `state`, then sends the recent events of the agent and each new event as the agent emits it. It ends with `end` when the run ends, when the mission of the run moves to another stage, or after `maxSeconds`. A comment line comes at least every 15 seconds while the stream is quiet. To continue after an end, open the stream again with the last `id` as `since`. A reconnect with a `Last-Event-ID` header to a run that ended gets 204, which tells an EventSource to stop.

## Path parameters

- `sandboxId` string, required

## Query parameters

- `since` integer, nullable: The `id` of the last event that you have. The stream sends the events after it, at most the newest 800. Ids count up by one, so a jump shows that older events were left out. Without a cursor, the stream starts with the last 20 events of the run. A `Last-Event-ID` header has the same effect.
- `maxSeconds` integer: The longest time that the stream stays open, in seconds (default 300, at most 600). At that time the stream sends `end` with the reason `time_cap`.

## Response `200`

The event stream. Each frame matches `SandboxEvent`.

## Other responses

- `204`: A reconnect with `Last-Event-ID` to a run that ended: nothing more comes.
- `401`: Unauthenticated
- `404`: Not found

---

[API](https://skmtc.dev/letsship/apis/ship-api.md) · [All operations](https://skmtc.dev/letsship/apis/ship-api/llms.txt) · [OpenAPI document](https://skmtc.dev/letsship/apis/ship-api/revisions/e6eac1bcadd4?raw)
