Skip to content

Latest commit

 

History

History
117 lines (71 loc) · 6.39 KB

File metadata and controls

117 lines (71 loc) · 6.39 KB
graph LR
    LangGraphClient["LangGraphClient"]
    ThreadsClient["ThreadsClient"]
    StoreClient["StoreClient"]
    AssistantsClient["AssistantsClient"]
    RunsClient["RunsClient"]
    CronClient["CronClient"]
    HttpClient["HttpClient"]
    JSON_Serialization_Deserialization_Utilities["JSON Serialization/Deserialization Utilities"]
    LangGraphClient -- "composes" --> ThreadsClient
    LangGraphClient -- "composes" --> StoreClient
    LangGraphClient -- "composes" --> AssistantsClient
    LangGraphClient -- "composes" --> RunsClient
    LangGraphClient -- "composes" --> CronClient
    LangGraphClient -- "delegates to" --> HttpClient
    ThreadsClient -- "utilized by" --> LangGraphClient
    ThreadsClient -- "utilizes" --> HttpClient
    StoreClient -- "utilized by" --> LangGraphClient
    StoreClient -- "utilizes" --> HttpClient
    AssistantsClient -- "utilized by" --> LangGraphClient
    AssistantsClient -- "utilizes" --> HttpClient
    RunsClient -- "utilized by" --> LangGraphClient
    RunsClient -- "utilizes" --> HttpClient
    CronClient -- "utilized by" --> LangGraphClient
    CronClient -- "utilizes" --> HttpClient
    HttpClient -- "utilized by" --> ThreadsClient
    HttpClient -- "utilized by" --> StoreClient
    HttpClient -- "utilized by" --> AssistantsClient
    HttpClient -- "utilized by" --> RunsClient
    HttpClient -- "utilized by" --> CronClient
    HttpClient -- "uses" --> JSON_Serialization_Deserialization_Utilities
    JSON_Serialization_Deserialization_Utilities -- "used by" --> HttpClient
Loading

CodeBoardingDemoContact

Details

The langgraph_sdk.client subsystem provides a comprehensive client-side interface for interacting with the LangGraph API. At its core, the LangGraphClient serves as a high-level entry point, orchestrating interactions by composing specialized clients such as ThreadsClient, StoreClient, AssistantsClient, RunsClient, and CronClient. Each of these specialized clients is responsible for managing specific LangGraph entities (threads, state store, assistants, runs, and scheduled tasks, respectively). All network communication for these clients is handled by the HttpClient, which abstracts the low-level HTTP request details and incorporates internal JSON serialization/deserialization utilities for data exchange with the LangGraph API. This architecture ensures a modular and extensible client, where high-level operations are delegated to focused components, all relying on a common HTTP communication layer.

LangGraphClient

Provides a unified, high-level programmatic interface for external applications to interact with and manage deployed LangGraph workflows. It acts as an orchestrator, abstracting the underlying API interactions.

Related Classes/Methods:

ThreadsClient

Manages operations related to LangGraph threads, including creation, retrieval, and updates of conversational states.

Related Classes/Methods:

StoreClient

Manages operations related to the LangGraph state store, enabling persistence and retrieval of workflow execution states.

Related Classes/Methods:

AssistantsClient

Manages operations related to LangGraph assistants, abstracting API calls for defining, deploying, and managing AI agent configurations.

Related Classes/Methods:

RunsClient

Manages operations related to LangGraph workflow executions (runs), including initiating, monitoring, and retrieving results of workflow instances.

Related Classes/Methods:

CronClient

Manages operations related to scheduled LangGraph tasks, allowing for the scheduling and management of recurring workflow executions.

Related Classes/Methods:

HttpClient

Executes low-level asynchronous HTTP requests to LangGraph API endpoints, handling the direct network communication. (This component conceptually covers both HttpClient and SyncHttpClient for this high-level overview).

Related Classes/Methods:

JSON Serialization/Deserialization Utilities

Provides internal helper functions (_aencode_json, _adecode_json) within the HttpClient for converting Python objects to JSON for outgoing API requests and parsing incoming JSON responses into Python objects.

Related Classes/Methods: