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.
pip install decionis-crewai
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, ESCALATE, and ERROR raise a
DecionisGuardRefusal before the inner tool runs and carry the Decision Dossier id and verify URL.
If the decision request itself fails (a timeout, an HTTP error, no connection), its error is raised
and the inner tool does not run: enforcement is fail closed.
Start observe-only without changing agent behavior:
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. It also runs when the decision request fails: the guard logs a warning and passes the failure
to on_decision as error, with decision=None. Remove shadow_mode=True once the recorded
verdicts match the policy you meant.
Compatibility: Python 3.10–3.13, CrewAI 1.x, and decionis 0.2 or later.
Release files for decionis-crewai 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| decionis_crewai-0.2.0.tar.gz | 7.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| decionis_crewai-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.7 kB
Release files / decionis_crewai-0.2.0.tar.gz
| Download URL | decionis_crewai-0.2.0.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c663851369e78ca4ac1f481c6155a4e04d684ad15d4b7dc496e8751e39d9cf9
|
|
BLAKE2b-256 checksum How to use checksums |
b54caf2ab6737a9433ea567f1a705bba11d4a068a419525fd59a21721e4bc95b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / decionis_crewai-0.2.0-py3-none-any.whl
| Download URL | decionis_crewai-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a14a86ceeba4cc5ffb48d6c4c8abe60d06464da847de484b9e3c037753dd9499
|
|
BLAKE2b-256 checksum How to use checksums |
5a4a2a29a4bad766f16454037cc82643b7d9afeed166bc07ebe9dbb05168be8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|