Metadata-Version: 2.5
Name: langgraph-wait
Version: 0.4.0
Summary: The LangGraph side of agent-wait: ask() to declare a question at the interrupt site, an adapter that reads what a thread is parked on, and helpers for the host's start/resume routing.
Project-URL: Homepage, https://skamalj.github.io/agent-wait/
Project-URL: Documentation, https://skamalj.github.io/agent-wait/
Project-URL: Source, https://github.com/skamalj/agent-wait
Project-URL: Issues, https://github.com/skamalj/agent-wait/issues
Author-email: Kamaljeet Singh <skamalj@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: agents,approval,human-in-the-loop,interrupt,langgraph
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: agent-wait<0.5,>=0.4
Requires-Dist: langgraph<2,>=1.2
Description-Content-Type: text/markdown

# langgraph-wait

The LangGraph side of [agent-wait](https://pypi.org/project/agent-wait/) — get a LangGraph
interrupt out of the process, and the answer back in.

```bash
pip install langgraph-wait          # pulls in agent-wait
```

```python
from langgraph_wait import hitl, publish_interrupts
```

* **`@hitl(policy)`** — on any function, under `@tool` if it is a tool. Calling it inside a
  run parks the graph on `{"function", "args"}`. `{"action": "approve"}` runs the body;
  anything else is returned in its place. A function with a `decision` parameter always
  runs and receives the answer. `mode="async"` makes the decorator the publisher: it
  announces and returns pending without parking.
* **`publish_interrupts(result, thread_id, announce)`** — after `graph.invoke()`. Reads
  `result["__interrupt__"]` and hands one envelope per question to the announcers.

Requires `langgraph >= 1.2`. Not compatible with LangChain's `HumanInTheLoopMiddleware`
on the same tool (two interrupts for one approval). One `interrupt()` per node on 1.2.x
(langgraph #6626).

Full documentation: [skamalj.github.io/agent-wait](https://skamalj.github.io/agent-wait/).
