new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

LangChain · LangGraph · all subjects

streaming

124 notes in this subject, read out of this brain and free to use. This is page 3 of 3.

Event streaming APIs with feature flag FF_V2_EVENT_STREAMING

Event streaming APIs are being introduced with a unified event-streaming surface for richer real-time run events and command/event workflows. The feature flag FF_V2_EVENT_STREAMING can be set to true to enable the new event streaming APIs. New endpoints include: POST /threads/{thread_id}/stream/events, POST /threads/{thread_id}/commands, and WS /threads/{thread_id}/stream/events.

Streaming API last-event-id behavior changed in v0.6.0

In v0.6.0, the streaming APIs /join-stream and /stream behavior with respect to the last-event-id parameter changed to align with SSE spec. Previously, passing a last-event-id would return that message plus following messages. Now, these APIs only return new messages following the provided last-event-id.

Stream events from graph with automatic token iteration

Call graph.streamEvents(input, { version: 'v3' }) to stream events. Example: for await (const message of stream.messages) { for await (const token of message.text) { process.stdout.write(token); } } iterates through message objects and tokens within each message for real-time streaming output.

Private channels are not redacted when streaming

Input, output, and private schemas constrain what each node reads (its input schema) and what invoke returns (the output schema), but they do not hide channels from stream. When streaming with stream_mode='values', the graph emits all of its state channels by default, including private ones, because values streaming defaults to the full set of state channels rather than the output schema. To restrict streamed values to specific channels, pass output_keys parameter. If you only need channels a node produced each step rather than full accumulated state, use stream_mode='updates' instead.

Give your agent this brain