DATE:
AUTHOR:
The LangChain Team
LangGraph

đŸ¤– Reliable streaming and efficient state management in LangGraph

DATE:
AUTHOR: The LangChain Team

We're excited to roll out several key updates that enhance the LangGraph API/Cloud experience. These includeL

  1. Streaming runs are now powered by the job queue used for background runs.
    This ensures greater reliability for your streaming runs without losing low-latency, real-time output. Whether you're streaming chat messages token-by-token or running other processes, you'll experience consistent performance.

  2. New Streaming Endpoint & SDK Method:
    We've introduced the GET /threads/{thread_id}/runs/{run_id}/stream endpoint and the client.runs.join_stream() SDK method. This enables real-time streaming output from any run, including background runs. With this, you can create new UXs, such as a chatbot that continues streaming even when users navigate away and return to the page.

  3. Enhanced Final State Retrieval:
    The updated GET /threads/{thread_id}/runs/{run_id}/join endpoint and client.runs.join() SDK method now reliably return the final state values after a run completes, ensuring consistent results whether the run is ongoing or finished—essential for workflows requiring dependable state retrieval.

  4. Expanded Thread Status Values:
    The GET /threads/{id} and client.threads.get() now support two new status values: error and interrupted.
    These status indicators help you manage and troubleshoot your threads by knowing when something goes wrong or a process is interrupted. The existing idle and busy statuses are still supported.

  5. Streamlined State Retrieval:
    Endpoints GET /threads/{id} and GET /threads now include the latest state values of each thread. This removes the need for separate "get state" calls, reducing the number of API requests needed to retrieve thread states.

  6. Advanced Thread Search:
    The POST /threads/search and client.threads.search() can now be filtered by thread state values. Combined with status filtering, this filtering allows you to build highly specific UIs - such as agent inboxes - where you can easily list threads in precise states.

These updates collectively enhance the reliability, efficiency, and flexibility of LangGraph, enabling you to build more robust and user-friendly applications.

Powered by LaunchNotes