Metadata-Version: 2.5
Name: decionis-crewai
Version: 0.1.0
Summary: Gate CrewAI tool calls on a signed Decionis Decision Dossier before execution.
Project-URL: Homepage, https://decionis.com
Project-URL: Documentation, https://decionis.com/integrations/crewai
Project-URL: Repository, https://github.com/decionis/Decionis
Project-URL: Issues, https://github.com/decionis/Decionis/issues
Author-email: Decionis <sdk@decionis.ai>
License: MIT
Keywords: agent,audit,crewai,decionis,execution-gate,governance,policy,tool
Classifier: Development Status :: 3 - Alpha
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: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: <3.14,>=3.10
Requires-Dist: crewai<2,>=1.0
Requires-Dist: decionis>=0.2
Requires-Dist: pydantic>=2.7
Provides-Extra: lint
Requires-Dist: mypy>=1.10; extra == 'lint'
Requires-Dist: ruff>=0.5; extra == 'lint'
Provides-Extra: test
Requires-Dist: pytest>=8; extra == 'test'
Description-Content-Type: text/markdown

# `decionis-crewai`

Gate any CrewAI tool call before its side effect runs. The wrapper preserves the inner
tool's name, description, and Pydantic argument schema, so the agent sees the same tool while
Decionis evaluates the proposed payload against an organization policy.

```bash
pip install decionis-crewai
```

```python
from decionis import DecionisClient
from decionis_crewai import DecionisGuardedTool

client = DecionisClient(api_key="...", base_url="https://api.decionis.com")
guarded_refund = DecionisGuardedTool.wrap(
    inner_tool=send_refund,
    client=client,
    tenant_id="your-org-uuid",
    workflow_key="refund_execution",
    site_base_url="https://decionis.com",
)

refund_agent = Agent(..., tools=[guarded_refund])
```

`ALLOW` runs the inner tool. `BLOCK`, `REVIEW_REQUIRED`, and `ESCALATE` raise a
`DecionisGuardRefusal` before the inner tool runs and carry the Decision Dossier id and verify URL.

Start observe-only without changing agent behavior:

```python
guarded_refund = DecionisGuardedTool.wrap(
    inner_tool=send_refund,
    client=client,
    tenant_id="your-org-uuid",
    workflow_key="refund_execution",
    shadow_mode=True,
)
```

In Shadow Mode every verdict is recorded, including would-block outcomes, but the inner tool still
runs. Remove `shadow_mode=True` only after reviewing the weekly exposure report and policy fit.

Compatibility: Python 3.10–3.13, CrewAI 1.x, and `decionis` 0.2 or later.
