[GH-ISSUE #4072] [langchain]: Misleading docs for React useStream and HttpAgentServerAdapter #2778

Open
opened 2026-06-05 17:26:45 -04:00 by yindo · 0 comments
Owner

Originally created by @samuelcm-bflexion on GitHub (May 19, 2026).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/4072

Type of issue

question

Language

JavaScript

Description

I am refactoring a custom backend to be compatible with Agent Streaming Protocol. As such I am passing a HttpAgentServerAdapter as a transport to my useStream instance.

However, useStream accepts threadId: string | null, whereas HttpAgentServerAdapter requires threadId to be a non-null string.

The docs do not sufficiently explain where the process for creating new threads should lie.

https://github.com/langchain-ai/langgraphjs/blob/main/libs/sdk-react/docs/custom-transport.md

Originally created by @samuelcm-bflexion on GitHub (May 19, 2026). Original GitHub issue: https://github.com/langchain-ai/docs/issues/4072 ### Type of issue question ### Language JavaScript ### Description I am refactoring a custom backend to be compatible with Agent Streaming Protocol. As such I am passing a [`HttpAgentServerAdapter`](https://github.com/langchain-ai/langgraphjs/blob/4a7d9a7c5ddedc2ee6867db4ed7bf288ca6145a1/libs/sdk/src/client/stream/transport/agent-server.ts#L60) as a `transport` to my `useStream` instance. However, `useStream` accepts `threadId: string | null`, whereas `HttpAgentServerAdapter` requires `threadId` to be a non-null `string`. The docs do not sufficiently explain where the process for creating new threads should lie. https://github.com/langchain-ai/langgraphjs/blob/main/libs/sdk-react/docs/custom-transport.md
yindo added the langchainexternal labels 2026-06-05 17:26:45 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#2778