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
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.1.27.tar.gz
(12.8 kB
view details)
Built Distribution
File details
Details for the file langgraph_sdk-0.1.27.tar.gz
.
File metadata
- Download URL: langgraph_sdk-0.1.27.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10cc82c33f5d0f2527d3ae3cec9c4da6480685f05ea1b0932728550790199290 |
|
MD5 | d8bcb7d47a4939aa0c4c30f649944c92 |
|
BLAKE2b-256 | 19d7ada22ff85d650efe88a17cf076b8a7a13648ae444703428e093af0ea3e17 |
File details
Details for the file langgraph_sdk-0.1.27-py3-none-any.whl
.
File metadata
- Download URL: langgraph_sdk-0.1.27-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfe669fc49d1f5fce15d43b7592149c39e095b861a86b69fa4292d2873cabc05 |
|
MD5 | abb9fd7d9a0ef14c677c366e6ac209a9 |
|
BLAKE2b-256 | 39676d621081c22f96d62215a3e8f1deda8da82078283700078c64c580a6dea9 |