Metadata-Version: 2.4
Name: gavrun
Version: 0.2.3
Summary: Python SDK for Gavrun — govern AI agents before risky actions execute
License: MIT
Project-URL: Homepage, https://gavrun.ai
Project-URL: Documentation, https://docs.gavrun.ai
Keywords: ai,agents,governance,policy,langchain,crewai,openai
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 :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx<1.0,>=0.28

# gavrun

Python SDK for [Gavrun](https://gavrun.ai) — govern AI agents before risky actions execute.

Gavrun intercepts agent tool calls, evaluates them against your policies, and requires human approval for high-risk actions before they run.

## Install

```bash
pip install gavrun
```

## Quick start

```python
import gavrun

gavrun.configure(
    api_key="your-sdk-key",       # from agentmanager.gavrun.ai/api-keys
    agent_name="my-agent",
    agent_manager_url="https://api.gavrun.ai",
)
```

Tool calls are governed automatically for LangChain, LangGraph, CrewAI, and OpenAI Agents SDK via auto-patch. For manual guarding:

```python
client = gavrun.get_client()

result = client.guard(
    action="delete_user",
    execute=lambda: delete_user(user_id),
    tools=["delete_user"],
    prompt=f"Delete user {user_id}",
)

if result.denied:
    raise PermissionError("Blocked by policy")
if result.requires_human_review:
    # poll for approval
    ...
```

## Frameworks

Auto-patch wires governance into every tool call:

```python
import gavrun
gavrun.configure(api_key="...", agent_manager_url="https://api.gavrun.ai")
# LangChain, LangGraph, CrewAI, OpenAI Agents SDK tools are now governed
```

## Links

- [Dashboard](https://agentmanager.gavrun.ai)
- [gavrun.ai](https://gavrun.ai)
