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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for langgraph_sdk-0.1.23.tar.gz
Algorithm Hash digest
SHA256 9439a52421859cc76b03d92d00d804803eae74c12c17cf035fb1383443facc6f
MD5 d09d4bd99c30d16442dfee37d243c8c3
BLAKE2b-256 5ca742d6f2bd2ebac3c40bb1618ec6fe1429362bb4f1869c9ad7672b54d9e668

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langgraph_sdk-0.1.23-py3-none-any.whl
Algorithm Hash digest
SHA256 c2e26a2ee9b2b28d750c03ea81c3b97cf35227f16b3715a79c29c60b6f84ac29
MD5 4a57fe4e194c3768bc7f4969889fc41b
BLAKE2b-256 e89d8b2f602c53efc16afb93f03a4047ba369ab592278ac8982ba523bfc67371

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