* Options for streamOpenUI.
| 4 | * Options for {@link streamOpenUI}. |
| 5 | */ |
| 6 | interface StreamOpenUIOptions { |
| 7 | /** |
| 8 | * Base URL of the LangGraph server (agent protocol v2), e.g. |
| 9 | * `http://localhost:2024`. Trailing slashes are stripped before use. |
| 10 | */ |
| 11 | apiUrl: string; |
| 12 | /** |
| 13 | * The id of the graph/assistant to run (the `graph_id` registered with the |
| 14 | * LangGraph server, e.g. `"agent"`). |
| 15 | */ |
| 16 | assistantId: string; |
| 17 | /** |
| 18 | * Optional API key forwarded as the `x-api-key` header (required by |
| 19 | * LangSmith deployments, omitted for local `langgraphjs dev`). |
| 20 | */ |
| 21 | apiKey?: string; |
| 22 | /** |
| 23 | * The run input handed to the graph — typically `{ messages: [...] }` in |
| 24 | * LangChain message format. Kept as `unknown` since this helper does not |
| 25 | * interpret it. |
| 26 | */ |
| 27 | input: unknown; |
| 28 | /** |
| 29 | * Caller's abort signal (Next.js aborts this when the browser disconnects). |
| 30 | * Aborting tears down the upstream LangGraph fetches and closes the stream. |
| 31 | */ |
| 32 | signal?: AbortSignal; |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * A single Server-Sent Events frame parsed out of the LangGraph response body, |
nothing calls this directly
no outgoing calls
no test coverage detected