Metadata-Version: 2.5
Name: langgraph-wait
Version: 0.2.1
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.3,>=0.2
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 ask, LangGraphAdapter, is_answer, resume_command
```

* **`ask(question, policy)`** — a thin wrapper over `interrupt()`. The node pauses exactly
  as LangGraph pauses; the policy rides along inside the interrupt value and comes back
  out in the published envelope. A plain `interrupt(value)` also works, with the default
  policy.
* **`LangGraphAdapter(graph)`** — three methods. `pending()` reads what a thread is parked
  on and filters LangGraph's `tasks[*].interrupts` over-report on `task.result`.
* **`is_answer(message)`** / **`resume_command(message)`** — pure functions for the host's
  router. `interrupt_id` present means resume; the `Command` is keyed by interrupt id so
  parallel interrupts resume independently.

Requires `langgraph >= 1.2`. One `interrupt()` per node — two interrupting tools in one
`ToolNode` share an id on 1.2.x (langgraph #6626), and this package documents rather
than hides that.

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