Skip to main content
LangGraph Agent Toolkit

LangGraph Agent Toolkit

Tests Documentation PyPI

Serve LangGraph agents through an authenticated HTTP API. Add streaming, persistent conversation history, managed model connections, and optional tools and observability. Use your own client or the included Streamlit interface.

Python 3.11–3.14. The API image uses Python 3.13. Existing deployments should read the 0.10.x migration guide and changelog before upgrading.

Quickstart · Integrations · Onboarding · Memory and authentication · Deployment · Documentation · Development

What the toolkit provides

  • FastAPI routes for invocation, SSE, JSON Lines, history, and feedback.
  • Sync and async AgentClient interfaces, including multimodal messages.
  • SQLite or PostgreSQL checkpoints with conversation ownership and ordered updates across workers.
  • Model factories with connection reuse, timeouts, bounded retries, and an optional aiohttp transport for OpenAI and Azure.
  • Native LangChain agents, custom LangGraph workflows, human approvals, and optional Deep Agents.
  • MCP tools, Langfuse SDK v2/v3/v4 integration, LangSmith, and local or managed prompts.

Install only the integrations that your service needs. LiteLLM, Langfuse, MCP, Deep Agents, and Streamlit are optional.

Quickstart

This local demo uses a deterministic fake model and SQLite. It needs no model key, Docker, or external service. It checks API behavior and persistence. Model quality requires separate evaluation.

Install uv, then use a fresh checkout:

git clone https://github.com/kryvokhyzha/langgraph-agent-toolkit.git
cd langgraph-agent-toolkit
uv sync --frozen --no-install-project --no-dev --extra uvicorn-backend

Create .env in this fresh checkout with these values. Use a shell without other toolkit or tracing overrides.

USE_FAKE_MODEL=true
AUTH_MODE=trusted
AUTH_SECRET=local-demo-token
AGENT_PATHS=["langgraph_agent_toolkit.agents.blueprints.chatbot.agent:chatbot_agent"]
DEFAULT_AGENT=chatbot-agent
MEMORY_BACKEND=sqlite
SQLITE_DB_PATH=quickstart.sqlite
OBSERVABILITY_BACKEND=empty
MCP_SERVERS={}
MODEL_CONFIGS={}
LANGSMITH_TRACING=false
LANGCHAIN_TRACING_V2=false

Start the API on localhost:

uv run --no-sync python -m langgraph_agent_toolkit.run_api --host 127.0.0.1 --port 8080

In another terminal, check readiness and send a request:

export AUTH_SECRET=local-demo-token

curl --fail http://127.0.0.1:8080/health/ready

curl --fail-with-body http://127.0.0.1:8080/chatbot-agent/invoke \
  -H "Authorization: Bearer ${AUTH_SECRET}" \
  -H 'Content-Type: application/json' \
  -d '{"input":{"message":"Hello"},"user_id":"demo-user","thread_id":"demo-thread"}'

The response content is This is a test response from the fake model. Reuse the same user_id and thread_id for the next turn. The SQLite file retains history after the API stops. Use the demo token only for this local example.

Use the quickstart guide for streaming, saved history, the Python client, the UI, and real-model configuration.

Choose an integration

Need Start with Guide
Chat without tools chatbot Agent patterns
A model that selects business tools Native create_agent Usage
Structured extraction create_agent_structured Agent patterns
A fixed workflow or required approval Custom StateGraph or human-in-the-loop middleware Usage
Planning, intermediate files, and delegation Optional Deep Agents Deep Agents
Tools exposed by another service MCP, combined with a supported agent MCP
Traces, prompts, and feedback Langfuse or LangSmith Langfuse compatibility

For an existing Python project, select provider and backend extras:

uv add 'langgraph-agent-toolkit[openai,uvicorn-backend,langfuse-v4]'

Follow the application onboarding guide to register agents, set identity and memory contracts, connect a client, and verify the deployment. It also gives the upgrade sequence for existing applications.

langfuse-v2, langfuse-v3, and langfuse-v4 select a Python SDK version range. Choose one. SDK and server versions are separate. Use the compatibility guide for supported combinations. mcp, deepagents, ui, and openai-aiohttp are separate extras. See installation for all options.

Memory and authentication

thread_id identifies short-term conversation state. A long-term store can use user_id to identify one user across threads. Passing user_id does not create a store. SQLite supplies checkpoints but has no long-term store.

The service separates conversation storage by authenticated user, agent, and public thread ID. Keep these values consistent when reading or updating history.

For one deployment per client, keep one AUTH_SECRET. The default AUTH_MODE=trusted preserves 0.9.2 shared bearer-token authentication. user_id is optional. Your trusted application can supply an end user's ID. If it omits the field, the service uses AUTH_SERVICE_USER_ID (default: service). Keep that identity stable for each conversation.

No new auth header or per-user token is required. If an existing deployment sets AUTH_MODE=token, remove that override or set it to trusted to use the compatible behavior. Token mode remains available as an explicit option. AUTH_USERS tokens always identify one user, in either mode. The service rejects a different supplied user ID for those tokens.

Authentication compatibility does not remove the history pagination, checkpoint migration, or validation changes. See the authentication and migration guide for curl examples and existing checkpoint migration.

Deployment

The API can run alone under Uvicorn or Gunicorn. Docker Compose adds the optional frontend, model proxy, and observability services. Configure the full stack through the environment guide.

  • The API Docker image installs and selects aiohttp for managed async OpenAI and Azure calls. Python installations default to HTTPX. Set LLM_HTTP_ASYNC_TRANSPORT=httpx to override the image default.
  • Each worker accepts eight active requests by default. Excess work receives 503 before an agent run starts. The optional admission queue is bounded.
  • Use PostgreSQL for replicas across hosts. SQLite workers must share a file on a local filesystem. Configure persistence; the default backend is unset.
  • Supervisors replace failed workers. Requests running in a failed worker can fail. The toolkit does not provide durable jobs or exactly-once tool writes.

Read deployment for health probes and worker recovery, and reliability for database pools, connection limits, timeouts, cancellation, and retry boundaries.

Documentation

Read the documentation site or the source guides below. The running service exposes its HTTP schema at /docs and /openapi.json.

Task Guide
Make the first request Quickstart
Add the toolkit to an application Onboarding
Select extras and configure services Installation, environment
Call the API or register an agent Usage
Choose agents and tools Integrations, MCP, Deep Agents
Upgrade an existing deployment Migration, dependency review, changelog
Deploy and operate the service Deployment, reliability
Configure Langfuse SDK and server compatibility
Verify behavior and capacity Testing, live model checks, load tests, recorded results

Development

Install the locked dependencies and run the local tests. The pre-commit hook environments require Python 3.13.

uv sync --frozen --no-install-project --extra all
uv run --no-sync pytest
uv run --no-sync pre-commit run --all-files

Use --extra all because --all-extras selects incompatible Langfuse SDK versions. Ordinary tests use fake models and local services. Process, Docker, PostgreSQL, live Langfuse, and real-model checks have separate setup requirements. Test coverage and local load results do not establish production capacity or model quality.

See CONTRIBUTING.md for the development workflow. Examples are in scripts/python, including the Deep Agents example.

License

MIT.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langgraph_agent_toolkit-0.10.1.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

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

langgraph_agent_toolkit-0.10.1-py3-none-any.whl (163.5 kB view details)

Uploaded Python 3

File details

Details for the file langgraph_agent_toolkit-0.10.1.tar.gz.

File metadata

  • Download URL: langgraph_agent_toolkit-0.10.1.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for langgraph_agent_toolkit-0.10.1.tar.gz
Algorithm Hash digest
SHA256 b4b5909d74e523ee3fdfe45c248af78df24834cdaf5fdf8e05e202abc77f5f2c
MD5 426dbf845ce5f916418b8dc5dc5c9255
BLAKE2b-256 20810ce06482bb999d1d2b797be29933559a2d16f2f227f120d794e6d7da80c3

See more details on using hashes here.

File details

Details for the file langgraph_agent_toolkit-0.10.1-py3-none-any.whl.

File metadata

  • Download URL: langgraph_agent_toolkit-0.10.1-py3-none-any.whl
  • Upload date:
  • Size: 163.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for langgraph_agent_toolkit-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8386df3dfe8ef934eefbc3994178b0abb751ca0f40d58464fedac4b712d00c0d
MD5 ca794bf8955afff34f54fe3771511ae9
BLAKE2b-256 3892a4b67d5de8f6298b17ebaf852d43e59dd69d0bc12032f82f4e6bec334bc6

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.10.1 This release

2 files

0.10.0

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.15

2 files

0.8.14

2 files

0.8.13

2 files

0.8.12

2 files

0.8.11

2 files

0.8.10

2 files

0.8.9

2 files

0.8.8

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.23

2 files

0.7.22

2 files

0.7.21

2 files

0.7.20

2 files

0.7.19

2 files

0.7.18

2 files

0.7.17

2 files

0.7.16

2 files

0.7.15

2 files

0.7.14

2 files

0.7.13

2 files

0.7.12

2 files

0.7.11

2 files

0.7.10

2 files

0.7.9

2 files

0.7.8

2 files

0.7.7

2 files

0.7.6

2 files

0.7.5

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page