Metadata-Version: 2.4
Name: ory-crewai
Version: 0.11.1
Summary: Ory Agent Security for CrewAI — per-tool authorization, tracing, and identity propagation by wrapping tools. Built on ory-argus.
Author: Ory
License-Expression: Apache-2.0
Keywords: agent,ai,authorization,crewai,ory,permissions
Requires-Python: >=3.10
Requires-Dist: crewai>=0.80
Requires-Dist: ory-argus<1,>=0.8
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# ory-crewai

Ory Agent Security for [CrewAI](https://docs.crewai.com).

Wraps your CrewAI tools so every call is authorized against Ory Permissions, traced, and
tied to the user → agent identity — built on [`ory-argus`](https://pypi.org/project/ory-argus/).

```bash
pip install ory-crewai
```

```python
from crewai import Agent
from ory_crewai import guard_tools

agent = Agent(role="researcher", tools=guard_tools([search, send_email]))
```

In **enforce** mode (`ORY_PERMISSION_MODE=enforce`) a denied tool raises an error that CrewAI
surfaces to the LLM; the tool never runs. In **observe** mode (default) the tool runs and a
`permission.observe_deny` span is recorded.

For tracing across paths that bypass the wrapped tools, also register the event listener:

```python
from ory_crewai import ory_event_listener
listener = ory_event_listener()  # traces ToolUsage events
```

Credentials come from the shared `~/.config/ory-agent-plugins/config.json`.
