Pi Durable Platformdocs
ReferenceAgents, threads and templates

Server-sent events with the conversation's view after every change

GET
/v1/agents/{agentId}/threads/{threadId}/events

Each view event's data is a ChatView (JSON). The stream keeps the agent awake while open.

Path Parameters

agentId*string
Formatuuid
threadId*string

Client-chosen thread ID (1-64 letters, digits, dashes or underscores)

Match^[A-Za-z0-9_-]{1,64}$

Query Parameters

once?boolean

Send the current view as one event, then end the stream

Response Body

An event stream

response?stringtext/event-stream
curl -X GET 'https://agents.example.com/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/threads/string/events'
"string"