CENTCOM Human Approval connector for LangGraph - pause AI workflows for human decisions
Project description
centcom-langgraph
Human approval nodes for LangGraph workflows, powered by CENTCOM.
Drop a CENTCOM approval node into any LangGraph graph. The connector uses LangGraph's native interrupt() to pause graphs and resume them when operators respond in the CENTCOM dashboard. The operator response is delivered back to your app via webhook and used to resume the graph — no thread blocked, fully persistent.
Install
pip install centcom-langgraph
# With webhook handler (FastAPI)
pip install centcom-langgraph[webhook]
Quick Start
from langgraph.graph import StateGraph, START, END
from langgraph.checkpoint.memory import MemorySaver
from centcom_langgraph import centcom_approval, CentcomState
class MyState(CentcomState):
order_id: str
approved: bool
graph = StateGraph(MyState)
graph.add_node("approve", centcom_approval(
type="approval",
question=lambda s: f"Approve order {s['order_id']}?",
context=lambda s: f"Order {s['order_id']} needs approval",
callback_url="https://my-app.com/centcom-webhook",
))
graph.add_edge(START, "approve")
graph.add_edge("approve", END)
app = graph.compile(checkpointer=MemorySaver())
result = app.invoke(
{"order_id": "ORD-42", "approved": False},
config={"configurable": {"thread_id": "order-42"}},
)
Runtime Flow
- Your graph reaches
centcom_approval(...)and sends a request to CENTCOM. - The node calls
interrupt(...), so execution pauses and state is checkpointed. - An operator answers in the CENTCOM dashboard.
- CENTCOM sends the signed response payload to your webhook endpoint.
- Your webhook handler verifies the signature and resumes LangGraph with
Command(resume=payload).
Official Resources
- SDK repository: github.com/contro1-hq/centcom-langgraph
- Official skill file: skills/centcom-langgraph.md
API
centcom_approval(**kwargs)
Factory returning a LangGraph node. Parameters accept static values or (state) -> value callables.
centcom_tool(**kwargs)
LangChain @tool for agent graphs where the LLM decides when to request approval.
create_webhook_handler(**kwargs)
Async handler that verifies CENTCOM webhooks and resumes LangGraph threads.
CentcomState
TypedDict mixin adding centcom_request_id, centcom_response, centcom_status to your graph state.
Docs
Full documentation at contro1.com/docs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file centcom_langgraph-0.1.0.tar.gz.
File metadata
- Download URL: centcom_langgraph-0.1.0.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4514dfb93e4ebbaf51eca87030c510b0feb094c1051ee21fc8e9f02b7a3a2d26
|
|
| MD5 |
1f8ea8987a4cca0b3637c97b13f9bbc7
|
|
| BLAKE2b-256 |
668e6e5fad94a4236a2b3544d75bccfe8d99fa767a1123c2b5ef75280b5e5aa7
|
File details
Details for the file centcom_langgraph-0.1.0-py3-none-any.whl.
File metadata
- Download URL: centcom_langgraph-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fda06736fadf0794fad73f0c5b13239ba51ec67d50be24c717bd3fd15b904da
|
|
| MD5 |
e19c095da52e8de4824c240e364334e4
|
|
| BLAKE2b-256 |
14ab9f4d31609cfe7b9216afff8575ca9e6800d08cb6687b3f5591e68ca1133f
|