Skip to main content

SDK for interacting with LangGraph API

Project description

This project is a branch of langgraph-sdk on QPython.

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_aipy-0.1.61.tar.gz (44.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langgraph_sdk_aipy-0.1.61-py3-none-any.whl (46.9 kB view details)

Uploaded Python 3

File details

Details for the file langgraph_sdk_aipy-0.1.61.tar.gz.

File metadata

  • Download URL: langgraph_sdk_aipy-0.1.61.tar.gz
  • Upload date:
  • Size: 44.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for langgraph_sdk_aipy-0.1.61.tar.gz
Algorithm Hash digest
SHA256 84b4af6556eeb8f9eefb66edd0be272915268bbc2a5550a2ab37ffbd71169bbf
MD5 3ef3516857c4d8d10c650498cb086f71
BLAKE2b-256 1efad80f507801b8a2235142fe71f6815292c34394e071b94cf3a6c4aa4cfdbe

See more details on using hashes here.

File details

Details for the file langgraph_sdk_aipy-0.1.61-py3-none-any.whl.

File metadata

File hashes

Hashes for langgraph_sdk_aipy-0.1.61-py3-none-any.whl
Algorithm Hash digest
SHA256 55f8160b1edd91f6e9930706e290d9b2201faa0482de19ee9800a291b1611837
MD5 8f9ac1ed1156e4a0ab860b157c27fd21
BLAKE2b-256 09c74fcc763721f7eb7bf7b664804047a705707dc9833188150c67460cb5b97c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page