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

Uploaded Source

Built Distribution

langgraph_sdk-0.1.34-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langgraph_sdk-0.1.34.tar.gz
  • Upload date:
  • Size: 27.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for langgraph_sdk-0.1.34.tar.gz
Algorithm Hash digest
SHA256 ee76507018414a08bcf63e0de916e956340ee2e9b5c60d5252d1b2b1fe47c5f3
MD5 9fd204cc5b5157dd1cd1de51991c19f7
BLAKE2b-256 9a2c6d0afafac86b3c59726c2b845b392147160f1647221ddbc4f8e648dc8939

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langgraph_sdk-0.1.34-py3-none-any.whl
Algorithm Hash digest
SHA256 3c44967382e073055c1731d9dde004a49ca04a063183747031b8a8286bad0b19
MD5 ceaee8dce4f58e5c3368ea8251337fe4
BLAKE2b-256 9b00454f94ab2754392f5cb78bf8f8ea005ae1cfef17d257103126d19e3968c7

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