Stream Session Thread Events
GET/v1/sessions/{session_id}/threads/{thread_id}/stream
Requires
anthropic-beta: managed-agents-2026-04-01. How to send beta headersStream Session Thread Events
Parameters
Returns
Stream Session Thread Events
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;
use Anthropic\Beta\Sessions\BetaManagedAgentsDeltaType;
$client = new Client(apiKey: 'my-anthropic-api-key');
$betaManagedAgentsStreamSessionThreadEvents = $client
->beta
->sessions
->threads
->events
->streamStream(
'sthr_011CZkZVWa6oJjw1rgXZpnBt',
sessionID: 'sesn_011CZkZAtmR3yMPDzynEDxu7',
eventDeltas: [BetaManagedAgentsDeltaType::AGENT_MESSAGE],
betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
workspaceID: 'wrkspc_011CZkZaBF1tNoB5wlCeusgy',
);
var_dump($betaManagedAgentsStreamSessionThreadEvents);Response 200
{
"id": "sevt_011CZkZGPp1iBcp4kaQSihUm",
"content": [
{
"text": "Where is my order #1234?",
"type": "text"
}
],
"type": "user.message",
"processed_at": "2026-03-15T10:00:00Z"
}Returns Examples
Response 200
{
"id": "sevt_011CZkZGPp1iBcp4kaQSihUm",
"content": [
{
"text": "Where is my order #1234?",
"type": "text"
}
],
"type": "user.message",
"processed_at": "2026-03-15T10:00:00Z"
}