What the LangGraph SDK provides
The LangGraph SDK is the interface between application code and a deployed LangGraph Platform instance. It provides methods for creating new workflow threads (individual execution contexts), running workflows with specified inputs, streaming intermediate outputs as they are generated, checking workflow status, resuming interrupted workflows, and accessing historical run data. The SDK handles the HTTP communication with the LangGraph Platform server, authentication, and error handling, so application code works with Python objects rather than raw API calls. Both synchronous and asynchronous interfaces are available to fit different application architectures.
Thread and run management
LangGraph SDK organizes workflow execution around two concepts. A thread is a persistent execution context — it holds the state for a workflow instance and accumulates history across multiple interactions. Runs are individual executions within a thread — each message or input creates a new run that continues from where the thread left off. This model supports conversational agents (each conversation is a thread, each turn is a run) as well as long-running autonomous workflows (a task is a thread, each step completion creates a new run). Thread management through the SDK includes creating threads, listing active threads, retrieving thread state, and deleting threads when they are no longer needed.
Streaming and real-time output
Streaming support in the LangGraph SDK allows applications to receive workflow outputs as they are generated rather than waiting for the entire workflow to complete. The SDK provides streaming iterators that yield events as the workflow executes — model token outputs, tool call initiations, state updates, and completion events. This is the mechanism behind real-time agent UIs that show users what the agent is doing while it works. Consuming streaming output requires handling an event stream asynchronously, which suits web applications and chat interfaces but requires more care in synchronous application contexts.