Stream Session Thread Events
client.Beta.Sessions.Threads.Events.Stream(ctx, threadID, params) (*BetaManagedAgentsStreamSessionThreadEventsUnion, error)GET/v1/sessions/{session_id}/threads/{thread_id}/stream
Stream Session Thread Events
package main
import (
"context"
"fmt"
"github.com/anthropics/anthropic-sdk-go"
"github.com/anthropics/anthropic-sdk-go/option"
)
func main() {
client := anthropic.NewClient(
option.WithAPIKey("my-anthropic-api-key"),
)
stream := client.Beta.Sessions.Threads.Events.StreamEvents(
context.TODO(),
"sthr_011CZkZVWa6oIjw0rgXZpnBt",
anthropic.BetaSessionThreadEventStreamParams{
SessionID: "sesn_011CZkZAtmR3yMPDzynEDxu7",
},
)
for stream.Next() {
fmt.Printf("%+v\n", stream.Current())
}
err := stream.Err()
if err != nil {
panic(err.Error())
}
}{
"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"
}