Stream Session Thread Events
beta.sessions.threads.events.stream(strthread_id, EventStreamParams**kwargs) -> BetaManagedAgentsStreamSessionThreadEventsGET/v1/sessions/{session_id}/threads/{thread_id}/stream
Stream Session Thread Events
import os
from anthropic import Anthropic
client = Anthropic(
api_key=os.environ.get(
"ANTHROPIC_API_KEY"
), # This is the default and can be omitted
)
for event in client.beta.sessions.threads.events.stream(
thread_id="sthr_011CZkZVWa6oIjw0rgXZpnBt",
session_id="sesn_011CZkZAtmR3yMPDzynEDxu7",
):
print(event){
"id": "sevt_011CZkZGOp0iBcp4kaQSihUmy",
"content": [
{
"text": "Where is my order #1234?",
"type": "text"
}
],
"type": "user.message",
"processed_at": "2026-03-15T10:00:00Z"
}Returns Examples
{
"id": "sevt_011CZkZGOp0iBcp4kaQSihUmy",
"content": [
{
"text": "Where is my order #1234?",
"type": "text"
}
],
"type": "user.message",
"processed_at": "2026-03-15T10:00:00Z"
}