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

Uploaded Source

Built Distribution

langgraph_sdk-0.1.36-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langgraph_sdk-0.1.36.tar.gz
  • Upload date:
  • Size: 28.2 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.36.tar.gz
Algorithm Hash digest
SHA256 2a2c651b7851ba15aeaab7e4e3ea7fd8357ef1cb0b592f264916fa990cdda6e7
MD5 4e594744e3153b50f3911b820cdaef48
BLAKE2b-256 cadf9316a356f75027d5d70a6b694fa31ed62b1070d5ae9013e84c3c8829a9b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langgraph_sdk-0.1.36-py3-none-any.whl
Algorithm Hash digest
SHA256 b11e1f0bc67631134d09d50c812dc73f9eb30394764ae1144d7d2a786a715355
MD5 0285c8e262e75bd543f13cb281cfd9d5
BLAKE2b-256 6aadd2fdb570373afe03bc7110561a4866e9d5175d8f7b2cda2a04f84265b1fd

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