curl --request POST \
--url https://api.example.com/threads/{thread_id}/stream/events \
--header 'Content-Type: application/json' \
--data '
{
"channels": [
"<string>"
],
"namespaces": [
[
"<string>"
]
],
"depth": 1,
"since": 1
}
'import requests
url = "https://api.example.com/threads/{thread_id}/stream/events"
payload = {
"channels": ["<string>"],
"namespaces": [["<string>"]],
"depth": 1,
"since": 1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({channels: ['<string>'], namespaces: [['<string>']], depth: 1, since: 1})
};
fetch('https://api.example.com/threads/{thread_id}/stream/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/threads/{thread_id}/stream/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'channels' => [
'<string>'
],
'namespaces' => [
[
'<string>'
]
],
'depth' => 1,
'since' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/threads/{thread_id}/stream/events"
payload := strings.NewReader("{\n \"channels\": [\n \"<string>\"\n ],\n \"namespaces\": [\n [\n \"<string>\"\n ]\n ],\n \"depth\": 1,\n \"since\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/threads/{thread_id}/stream/events")
.header("Content-Type", "application/json")
.body("{\n \"channels\": [\n \"<string>\"\n ],\n \"namespaces\": [\n [\n \"<string>\"\n ]\n ],\n \"depth\": 1,\n \"since\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/threads/{thread_id}/stream/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"channels\": [\n \"<string>\"\n ],\n \"namespaces\": [\n [\n \"<string>\"\n ]\n ],\n \"depth\": 1,\n \"since\": 1\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Stream Thread Events
Open a channel-filtered SSE stream of the thread’s run events.
Thread-scoped: events for any run on the thread flow through, so a
client can open the stream then issue run.start. Each SSE frame’s
data: is a protocol event envelope; id: is the seq a client
echoes back as since on resume.
DB work runs in short-lived sessions (the upfront ownership check here, and each run-lister poll) so no connection is held for the SSE lifetime (#423).
curl --request POST \
--url https://api.example.com/threads/{thread_id}/stream/events \
--header 'Content-Type: application/json' \
--data '
{
"channels": [
"<string>"
],
"namespaces": [
[
"<string>"
]
],
"depth": 1,
"since": 1
}
'import requests
url = "https://api.example.com/threads/{thread_id}/stream/events"
payload = {
"channels": ["<string>"],
"namespaces": [["<string>"]],
"depth": 1,
"since": 1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({channels: ['<string>'], namespaces: [['<string>']], depth: 1, since: 1})
};
fetch('https://api.example.com/threads/{thread_id}/stream/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/threads/{thread_id}/stream/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'channels' => [
'<string>'
],
'namespaces' => [
[
'<string>'
]
],
'depth' => 1,
'since' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/threads/{thread_id}/stream/events"
payload := strings.NewReader("{\n \"channels\": [\n \"<string>\"\n ],\n \"namespaces\": [\n [\n \"<string>\"\n ]\n ],\n \"depth\": 1,\n \"since\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/threads/{thread_id}/stream/events")
.header("Content-Type", "application/json")
.body("{\n \"channels\": [\n \"<string>\"\n ],\n \"namespaces\": [\n [\n \"<string>\"\n ]\n ],\n \"depth\": 1,\n \"since\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/threads/{thread_id}/stream/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"channels\": [\n \"<string>\"\n ],\n \"namespaces\": [\n [\n \"<string>\"\n ]\n ],\n \"depth\": 1,\n \"since\": 1\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Body
Body for POST /threads/{thread_id}/stream/events.
Thread-scoped, matching the LangGraph SDK: no run id — the stream carries events for whatever run(s) execute on the thread.
Channels to subscribe to (e.g. messages, values, lifecycle).
Subgraph namespace prefixes to include.
Max subgraph nesting depth to include.
x >= 0Last seq the client saw; events at or below it are skipped on resume.
x >= 0Response
SSE stream of protocol event envelopes