List live session events
Poll incremental agent activity. Paging: pass the previous next_seq as after_seq to receive only newer events, until items is empty. Add wait_ms to have a poll that finds nothing new wait for the next event of a running session instead of returning at once. Order: seq is the delivery cursor, not the order things happened in. A streamed event (a reply, reasoning, a tool's live output) keeps its id and reappears with a higher seq each time its snapshot grows, so by seq it can be listed after events that happened later, and a poller can receive the same id in more than one page. To read the transcript, keep the copy of each id with the highest seq and sort by position: the seq the event first appeared at, which never changes and is unique in the Session. Numbers: seq and position are the Attempt's number times 4294967296 (2^32) plus a counter inside that Attempt. They jump by about 4.29 billion whenever a follow-up, a retry or a machine change starts a new Attempt, and they have gaps where an event is hidden from this projection or a streamed event moved on from an earlier snapshot; compare them, never count with them. Content: view=conversation returns only assistant, reasoning, tool_use and tool_result events, for any caller, and leaves the cursor unchanged. In the debug projection a streamed event's data.stream_position_seq is its position and data.stream_revision is the counter part of its current seq. There, a result event's data.run_status is the internal lifecycle status of the execution Attempt that produced it (succeeded means it ran to completion, which the session reports as status exit); it is not the task verdict, which is the session's outcome. Without view, sessions:read returns status events with null text/data, plus assistant, reasoning, tool_use and tool_result events with their text and a fixed set of data fields (tool, tool_use_id, input, content, is_error, is_partial, duration_ms, stream_key, item_id). An organization owner/admin may add sessions:debug for the full diagnostic projection: diagnostic event kinds, status text and raw event metadata.
<sub>Scope: sessions:read or sessions:debug</sub>
Request
- Base URL: https://api.reasonmachines.com
- URL: https://api.reasonmachines.com/v3/organizations/{orgId}/sessions/{sessionId}/events
- Auth: one of:
- HTTP bearer
- HTTP bearer
Query parameters
Return only events whose seq is higher than this value: pass the previous response's next_seq, or -1 (the default) to start before the first event. Use it as a cursor to compare, not a count: seq is the Attempt's number times 4294967296 plus a counter inside that Attempt, so it jumps by about 4.29 billion whenever a follow-up, a retry or a machine change starts a new Attempt, and it has gaps. seq is delivery order; sort by each event's position for the order things happened in.
conversation returns only what was said and done: assistant, reasoning, tool_use and tool_result events with their text and the fixed data fields, and no status, tracing or diagnostic events, whatever the caller's scopes. Omit it for the caller's full projection. Both use the same cursor, so a next_seq from one is a valid after_seq for the other. With wait_ms, the wait passes over events the view does not list.
Maximum events to return (default 200, max 1000).
When no event follows after_seq and the session is running, the server may wait up to this many milliseconds (max 20000) for one before responding. It may also answer immediately, and a response may carry no events; poll again with the same cursor.
Response
The current session plus a bounded page of live events.
Changes
No recorded changes to this operation across all 1 revision of this API.