Data models for interacting with the LangGraph API.
Represents the status of a run:
Represents the status of a thread:
Defines the mode of streaming:
Defines the mode of streaming:
Specifies behavior on disconnection:
Defines how to handle multiple tasks:
Specifies behavior on conflict:
Defines action after completion:
Durability mode for the graph execution.
"sync": Changes are persisted synchronously before the next step starts."async": Changes are persisted asynchronously while the next step executes."exit": Changes are persisted only when the graph exits.Represents a wildcard or 'all' selector.
Specifies behavior if the thread doesn't exist:
Strategy for pruning threads:
Action to take when cancelling the run.
Filter runs by status when bulk-cancelling:
The field to sort by.
The field to sort by.
The field to sort by.
The order to sort by.
Stream format version.
"v1": Traditional format — raw SSE StreamPart NamedTuples."v2": Each event is a typed dict with type, ns, and data keys.Configuration options for a call.
Represents a checkpoint in the execution process.
Defines the structure and properties of a graph.
Base model for an assistant.
Represents a specific version of an assistant.
Represents an assistant with additional properties.
Paginated response for assistant search results.
Represents an interruption in the execution flow.
Represents a conversation thread.
Represents a task within a thread.
Represents the state of a thread.
Represents the response from updating a thread's state.
Represents a single execution run.
Represents a scheduled task.
Payload for updating a cron job. All fields are optional.
Defines the parameters for initiating a background run.
Represents a single document or data entry in the graph's Store.
Items are used to store cross-thread memories.
Response structure for listing namespaces.
Item with an optional relevance score from search operations.
Response structure for searching items.
Represents a part of a stream response.
Payload for a task start event.
Payload for a task result event.
A task entry within a CheckpointPayload.
The keys present depend on the task's state:
id, name, error, stateid, name, result, interrupts, stateid, name, interrupts, statePayload for a checkpoint event.
Payload for the metadata control event.
Stream part emitted for stream_mode="values".
Stream part emitted for stream_mode="updates".
Stream part emitted for partial message chunks (messages/partial).
Stream part emitted for complete messages (messages/complete).
Stream part emitted for message metadata (messages/metadata).
Stream part emitted for stream_mode="messages" (raw message+metadata pair).
Stream part emitted for stream_mode="custom".
Stream part emitted for stream_mode="checkpoints".
Stream part emitted for stream_mode="tasks".
Stream part emitted for stream_mode="debug".
Control event with run_id and other run metadata.
Represents a message to be sent to a specific node in the graph.
This type is used to explicitly send messages to nodes in the graph, typically used within Command objects to control graph execution flow.
Represents one or more commands to control graph execution flow and state.
This type defines the control commands that can be returned by nodes to influence graph execution. It lets you navigate to other nodes, update graph state, and resume from interruptions.
Metadata for a run creation request.
Represents a JSON-like structure, which can be None or a dictionary with string keys and any values.
Wrapper payload for debug events. Discriminate on type.
Discriminated union of all v2 stream part types.
Use part["type"] to narrow the type.