Metadata-Version: 2.4
Name: helm-langchain
Version: 0.4.0
Summary: HELM governance adapter for langchain — fail-closed tool calling for AI agents
Author-email: Mindburn Labs <oss@mindburn.org>
License: Apache-2.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: helm-sdk>=0.4.0
Requires-Dist: httpx>=0.25.0

# helm-langchain

HELM governance adapter for [LangChain](https://python.langchain.com).

## What it does

Wraps LangChain tools with HELM governance:

1. Every tool call is evaluated against HELM policy before execution
2. Denied calls raise `HelmToolDenyError` (fail-closed by default)
3. Receipts with SHA-256 hashes are collected for every approved execution

## Quick start

```python
from helm_langchain import HelmToolWrapper

wrapper = HelmToolWrapper(helm_url="http://localhost:8080")
governed_tools = wrapper.wrap_tools(my_tools)

# Use in a LangChain agent
agent = create_react_agent(llm, governed_tools)
```

## Configuration

| Parameter          | Default                 | Description          |
| ------------------ | ----------------------- | -------------------- |
| `helm_url`         | `http://localhost:8080` | HELM kernel URL      |
| `api_key`          | `None`                  | HELM API key         |
| `fail_closed`      | `True`                  | Deny on HELM errors  |
| `collect_receipts` | `True`                  | Keep receipt chain   |
| `timeout`          | `30.0`                  | HTTP timeout seconds |

## License

Apache-2.0
