Skip to content
Letta Platform Letta Platform Letta Docs
Sign up

Retrieve Conversation Stream

conversations.messages.stream(strconversation_id, MessageStreamParams**kwargs) -> object
post/v1/conversations/{conversation_id}/stream

Resume the stream for the most recent active run in a conversation.

This endpoint allows you to reconnect to an active background stream for a conversation, enabling recovery from network interruptions.

ParametersExpand Collapse
conversation_id: str

The conversation identifier. Either the special value 'default' or an ID in the format 'conv-'

minLength1
maxLength41
batch_size: Optional[int]

Number of entries to read per batch.

include_pings: Optional[bool]

Whether to include periodic keepalive ping messages in the stream to prevent connection timeouts.

poll_interval: Optional[float]

Seconds to wait between polls when no new data.

starting_after: Optional[int]

Sequence id to use as a cursor for pagination. Response will start streaming after this chunk sequence id

ReturnsExpand Collapse
object
Retrieve Conversation Stream
import os
from letta_client import Letta

client = Letta(
    api_key=os.environ.get("LETTA_API_KEY"),  # This is the default and can be omitted
)
response = client.conversations.messages.stream(
    conversation_id="default",
)
print(response)
{}
Returns Examples
{}