langgraph-api

Crates.iolanggraph-api
lib.rslanggraph-api
version0.1.1
created_at2025-12-18 03:09:51.416833+00
updated_at2025-12-30 06:30:15.790818+00
descriptionRust Client API of LangGraph
homepagehttps://github.com/nurokhq/langgraph-api-rust
repositoryhttps://github.com/nurokhq/langgraph-api-rust
max_upload_size
id1991627
size675,570
Frank Fang (fj-nurok)

documentation

https://docs.langchain.com

README

langgraph-api

Build Rust Code style: rustfmt Linter: clippy

Rust API Client SDK for LangGraph API

Overview

This is an auto-generated Rust client library for the LangGraph API. It provides type-safe bindings for interacting with LangGraph Cloud, which enables building and running stateful, multi-actor applications with LLMs.

Features

  • Type-safe API client: Auto-generated from OpenAPI specification
  • Async/await support: Built on reqwest with async/await
  • Flexible TLS backends: Choose between rustls-tls (default) or native-tls
  • Comprehensive API coverage: Full support for all LangGraph endpoints including:
    • Assistant management (create, search, versioning, graph inspection)
    • Thread and conversation management
    • Run execution (stateful and stateless, with streaming support)
    • Scheduled runs with cron jobs
    • Key-value store operations
    • Agent-to-Agent Protocol (A2A) communication
    • Model Context Protocol (MCP) support
    • System operations (health checks, server info, metrics)

Installation

Add this to your Cargo.toml:

[dependencies]
langgraph-api = { version = "0.1.1", features = ["rustls-tls"] }

Or with native TLS:

[dependencies]
langgraph-api = { version = "0.1.1", features = ["native-tls"] }

Version Compatibility

The following table shows the version correspondence between the client and LangGraph API:

Client Version LangGraph API Version
0.1.0 0.1.0
0.1.1 0.1.0

Please ensure you use a compatible client version for your LangGraph API version to avoid compatibility issues.

Usage

use langgraph_api::apis::*;
use langgraph_api::models::*;
...

Features

  • default: Enables rustls-tls feature
  • rustls-tls: Use rustls for TLS (default, recommended)
  • native-tls: Use native TLS implementation

Development

This SDK is generated from the OpenAPI specification using OpenAPI Generator.

To regenerate the SDK:

./scripts/generate_api_sdk.sh

This script:

  1. Generates the SDK from api/langgraph-openapi.json
  2. Copies the generated code to src/generated/
  3. Formats the code with cargo fmt

Requirements

  • Rust 1.85 or later
  • OpenAPI Generator CLI (for regeneration)

License

See LICENSE file for details.

Contributing

Contributions are welcome! Please ensure that:

  • Code is formatted with cargo fmt
  • All tests pass with cargo test
  • Clippy checks pass with cargo clippy
Commit count: 0

cargo fmt