LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph-sdk_syncrunsSyncRunsClient
    Classā—Since v0.3

    SyncRunsClient

    Copy
    SyncRunsClient(
        self,
        http: SyncHttpClient,
    )

    Constructors

    Attributes

    Methods

    View source on GitHub
    constructor
    __init__
    NameType
    httpSyncHttpClient
    attribute
    http: http
    method
    stream

    Create a run and stream the results.

    method
    create

    Create a background run.

    method
    create_batch

    Create a batch of stateless background runs.

    method
    wait

    Create a run, wait until it finishes and return the final state.

    method
    list

    List runs.

    method
    get

    Get a run.

    method
    cancel

    Get a run.

    method
    cancel_many

    Cancel one or more runs.

    Can cancel runs by thread ID and run IDs, or by status filter.

    method
    join

    Block until a run is done. Returns the final state of the thread.

    method
    join_stream

    Stream output from a run in real-time, until the run is done. Output is not buffered, so any output produced before this call will not be received here.

    method
    delete

    Delete a run.

    Synchronous client for managing runs in LangGraph.

    This class provides methods to create, retrieve, and manage runs, which represent individual executions of graphs.

    Example
    client = get_sync_client(url="http://localhost:2024")
    run = client.runs.create(thread_id="thread_123", assistant_id="asst_456")