Read append-only session events
1 min read
sessionId*stringSession id whose events should be returned. Requests without it fail with 400 invalid_request.
afterSeq?integerPreferred cursor. Returns events with seq > afterSeq; pass
nextCursor.afterSeq from the previous page to resume reading.
Takes precedence over afterEventId when both are supplied.
Non-integer values fail with 400 invalid_request.
0 <= valueafterEventId?stringCompatibility cursor for clients that stored event ids instead of
sequence numbers. The daemon resolves the id to its sequence position
and returns events after it. Ignored when afterSeq is also
supplied; unknown ids read from the start of the log.
limit?integerMaximum number of events to return. Out-of-range values are clamped
to 1–1000 rather than rejected; non-integer values fail with
400 invalid_request. When omitted, all events after the cursor are
returned in one page. hasMore in the response is only meaningful
when a limit is set — it is true when the page filled the limit.
1 <= value <= 1000A page of events.
application/json- response
events*array<>nextCursor*|Cursor to read the next page — afterSeq is the seq of the last
event in this page. null when the page is empty.
Persist nextCursor.afterSeq to resume across restarts.
hasMore*booleanWhether more events may follow the returned page. true when the
page filled a requested limit; always false when limit was
omitted (the full remainder was returned).
curl -X GET 'http://localhost:3000/api/v1/events?sessionId=session-1'{ "events": [ { "seq": 42, "id": "event-1", "session_id": "session-1", "kind": "output", "payload_json": "{\"data\":\"hello\"}", "created_at": "2026-05-09T06:43:10Z" } ], "nextCursor": { "afterSeq": 42 }, "hasMore": false}Last updated on