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 LangGraph Cloud 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


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.1.29.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

langgraph_sdk-0.1.29-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langgraph_sdk-0.1.29.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for langgraph_sdk-0.1.29.tar.gz
Algorithm Hash digest
SHA256 9bf43cb7fb90f8f612287642105611671f91bb923aedc21ea2ab9eda1f1e994c
MD5 0d0829ad802fa1242c4dfd1f04a1cf55
BLAKE2b-256 fe9b096050c66bce66c9b131ece24cbd5fd650e281dbf0824d23ec2fe1a5fb65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langgraph_sdk-0.1.29-py3-none-any.whl
Algorithm Hash digest
SHA256 5baa45cda9f7ec7784fda7f11717401c409cd96678e58485ff57e83a82760a89
MD5 75c912376d24b006f893893b9da632e3
BLAKE2b-256 6389c13136489cfefd5c17a664532a7f6620c5719ce4f835ee5740a33d0e475e

See more details on using hashes here.

Supported by

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