Metadata-Version: 2.4
Name: verifiedworkflows-langchain
Version: 0.1.0
Summary: Human-in-the-loop review as agent tools for LangChain, CrewAI, LlamaIndex, and AutoGen.
Author-email: Verified Workflows <hello@verifiedworkflows.com>
License: MIT
Project-URL: Homepage, https://verifiedworkflows.com
Project-URL: Documentation, https://verifiedworkflows.com/api_reference.html
Project-URL: Repository, https://github.com/verifiedworkflows/langchain
Project-URL: Bug Tracker, https://github.com/verifiedworkflows/langchain/issues
Keywords: langchain,human-in-the-loop,ai-review,agent-tools,hitl
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.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.25
Requires-Dist: langchain-core>=0.1
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"
Requires-Dist: ruff; extra == "dev"

# verifiedworkflows-langchain

Human-in-the-loop review as agent tools for LangChain, CrewAI, LlamaIndex, and AutoGen.

## Install

```bash
pip install verifiedworkflows-langchain
```

## Quick start

```python
import os
os.environ["VW_API_KEY"] = "vw_live_xxx"

from verifiedworkflows_langchain import get_tools
from langchain.agents import create_agent
from langchain_openai import ChatOpenAI

model = ChatOpenAI(model="gpt-4o")
tools = get_tools()

agent = create_agent(model, tools=tools)

# The agent can now submit AI output for human review
# before sending it to users
response = agent.invoke({
    "messages": [{"role": "user", "content": "Write a patient summary, then review it"}]
})
```

## Tools

| Tool | Description |
|------|-------------|
| `submit_for_review` | Submit AI output for certified human review |
| `get_review_status` | Check task status (pending, in_review, completed) |
| `get_review_result` | Get verified result with corrections and HMAC signature |

## Direct client (without LangChain)

```python
from verifiedworkflows_langchain import VerifiedWorkflows

vw = VerifiedWorkflows(api_key="vw_live_xxx")
task = vw.submit(content="AI output here", review_type="medical")
result = vw.result(task["id"])  # blocks until completed
```

## Works with

- **LangChain** / **LangGraph** — `@tool` decorator
- **CrewAI** — pass tools to agent
- **LlamaIndex** — `FunctionTool.from_defaults`
- **AutoGen** — pass as function tools

## License

MIT
