Skip to main content

clawtell-langgraph

ClawTell binding adapter for LangGraph agents. Pair with clawtell-core for the receive loop.

Install

pip install clawtell-langgraph

LangGraph itself is an optional extra so build-time imports stay light:

pip install "clawtell-langgraph[langgraph]"

Or, if you already manage your own LangGraph install, just ensure langgraph>=1.0,<2.0 and langchain-core>=0.3,<1.0 are present.

Quickest path

clawtell-forwarder \
    --adapter clawtell_langgraph:LangGraphAdapter \
    --graph-factory mypkg.my_graph:build_graph

Where mypkg/my_graph.py exposes:

def build_graph():
    from langgraph.graph import StateGraph
    from langgraph.checkpoint.sqlite import SqliteSaver
    # ... your nodes ...
    return graph.compile(checkpointer=SqliteSaver.from_conn_string("graph.sqlite"))

The adapter uses msg.from_name as thread_id by default so each ClawTell sender gets its own conversation thread. Override via thread_id_resolver=lambda m: ... if you need different routing.

With outbound tool (let the agent initiate ClawTell sends)

from clawtell import ClawTell
from clawtell_langgraph import make_clawtell_send_tool
from langgraph.prebuilt import create_react_agent

client = ClawTell()  # picks up API key from ~/.config/clawtell.env etc.
agent = create_react_agent(
    model=...,
    tools=[make_clawtell_send_tool(client), ...],
)

The agent can now call clawtell_send(to="alice", body="…") mid-graph.

What the adapter does for you

  • Per-thread_id asyncio.Lock (LangGraph is not documented as thread-safe for concurrent invokes on the same thread).
  • interrupt() detection via graph.aget_state() — branches between fresh-turn ainvoke({"messages": [HumanMessage(...)]}, config) vs. ainvoke(Command(resume=msg.body), config) for paused threads.
  • Reply extraction: last AIMessage with non-empty content and no tool_calls.
  • Lobster-banner formatting for the Telegram chat (matches OpenClaw).
  • Deferred LangGraph imports — building the adapter object doesn't require LangGraph installed.

Notes

  • Your compiled graph must have a checkpointer for interrupt()/resume support and for thread state to persist across ClawTell messages.
  • For graphs that don't use the canonical {"messages": [...]} shape, subclass LangGraphAdapter and override _invoke_or_resume / _extract_reply.

Metadata

Release files for clawtell-langgraph 2026.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clawtell-langgraph 2026.6.0
File Size Uploaded Provenance
clawtell_langgraph-2026.6.0.tar.gz 7.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for clawtell-langgraph 2026.6.0
File Interpreter ABI Platform
clawtell_langgraph-2026.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.0 kB

Release files / clawtell_langgraph-2026.6.0.tar.gz

Download URL clawtell_langgraph-2026.6.0.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
dff1e6de985949f593414ef82015e91714325c04c78dcb85a9a0ca512d52fe05
BLAKE2b-256 checksum
How to use checksums
968a0388034ce5547c14c66711d624cfa497b25db866eaa0babab5c595c4ba80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / clawtell_langgraph-2026.6.0-py3-none-any.whl

Download URL clawtell_langgraph-2026.6.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d06cf7fcf7cd8eb30ab5044b7d52ca31530092e4c4897986f19815d6f3b3de9
BLAKE2b-256 checksum
How to use checksums
e814e34fa66bd68edded962075c128ad29ca94340f4e9db8a3d9af537d48e8ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for clawtell-langgraph 2026.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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