Skip to main content

SDK for interacting with LangGraph API

Project description

LangGraph Python SDK

This repository contains the Python SDK for interacting with the LangSmith Deployment REST API.

Quick Start

To get started with the Python SDK, install the package

pip install -U langgraph-sdk

You will need a running LangGraph API server. If you're running a server locally using langgraph-cli, SDK will automatically point at http://localhost:8123, otherwise you would need to specify the server URL when creating a client.

from langgraph_sdk import get_client

# If you're using a remote server, initialize the client with `get_client(url=REMOTE_URL)`
client = get_client()

# List all assistants
assistants = await client.assistants.search()

# We auto-create an assistant for each graph you register in config.
agent = assistants[0]

# Start a new thread
thread = await client.threads.create()

# Start a streaming run
input = {"messages": [{"role": "human", "content": "what's the weather in la"}]}
async for chunk in client.runs.stream(thread['thread_id'], agent['assistant_id'], input=input):
    print(chunk)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langgraph_sdk-0.3.7.tar.gz (182.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langgraph_sdk-0.3.7-py3-none-any.whl (88.4 kB view details)

Uploaded Python 3

File details

Details for the file langgraph_sdk-0.3.7.tar.gz.

File metadata

  • Download URL: langgraph_sdk-0.3.7.tar.gz
  • Upload date:
  • Size: 182.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for langgraph_sdk-0.3.7.tar.gz
Algorithm Hash digest
SHA256 52b82536c6662658822b72fe7089fea74a477f9f64780462e46c8a122371e3d3
MD5 c3a9ac143122f4a238ba76df81a4c9ae
BLAKE2b-256 276910f40d41741e2956859ba5dcbdf9ab409908dbbd254335bee0e7209813a2

See more details on using hashes here.

File details

Details for the file langgraph_sdk-0.3.7-py3-none-any.whl.

File metadata

  • Download URL: langgraph_sdk-0.3.7-py3-none-any.whl
  • Upload date:
  • Size: 88.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for langgraph_sdk-0.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8824df0f5dcfb2eab6d3c7ef00cf01bca1d1411afaa6c7dbc68cc46bca7d7b56
MD5 67b41f6ab3c4956362c9e4d0d27291b2
BLAKE2b-256 c25ff0a73e0e2ec316ad96db662f0038a251f74ca1e412c0798391c1a3925a0b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page