Skip to main content

No project description provided

Project description

LangGraph Python SDK

This repository contains the Python SDK for interacting with the LangGraph 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.22.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

langgraph_sdk-0.1.22-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langgraph_sdk-0.1.22.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.8 Darwin/23.4.0

File hashes

Hashes for langgraph_sdk-0.1.22.tar.gz
Algorithm Hash digest
SHA256 57441d5ae5735ef2d48a15dcbd881ca59959cf0459f8884eb201b87d7eb71790
MD5 496f1159c9fe696f4d488800259bdb2b
BLAKE2b-256 1269ec84259d98e64114e7c5fe20cdda3c1f7fcb3d673fb9dde6f7638bfa634b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: langgraph_sdk-0.1.22-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.8 Darwin/23.4.0

File hashes

Hashes for langgraph_sdk-0.1.22-py3-none-any.whl
Algorithm Hash digest
SHA256 0e5962ce3b4a8e6769d25d674c5bf7e5b40e346d27565cfef7dc5d1736687d35
MD5 4007b16e48aa2092405da850ec37c054
BLAKE2b-256 1615bb59bfac4b77a43548e02f814d6dda699e1e25e4ddf89393f80407917bea

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