This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.0.2 instead.
Reason given by maintainers: Incorrect requires-python constraint; superseded by 1.0.1
aiyoplane-crewai
AEAP Composition Boundary Adapter for CrewAI.
A thin wrapper that attaches the AEAP Runtime Decision Point (RDP) to CrewAI's tool invocation surface. Consequential tool executions by any crew member produce independently verifiable Execution Receipts. The adapter composes with CrewAI's Flow, Crew, Agent, and Task primitives — it does not replace any of them.
pip install aiyoplane-crewai
Why this matters for multi-agent crews
CrewAI's architecture is deliberately about multiple specialized agents coordinating on a workflow:
Research agent → Analysis agent → Purchasing agent → Payment agent → Fulfillment agent
Each agent has a role, a goal, and tools. Role assignment answers "may this crew member perform this class of action?" — identity and delegation. AEAP answers a different question at the tool-invocation moment: "should this specific action execute right now, under the Protected Party's current Policy, against the specific Intent being formed?" The two layers compose; AEAP sits beneath the crew structure.
See the AEAP specification §9 for the Composition Boundary primitive this adapter realizes.
Minimal usage
from crewai import Agent, Task, Crew
from crewai.tools import BaseTool
from aiyoplane_mcp_authz import create_aiyo_mcp_authz, create_local_rdp
from aiyoplane_crewai import wrap_tool
class TransferFundsTool(BaseTool):
name: str = "transfer_funds"
description: str = "Transfer funds between accounts."
def _run(self, amount: int, to_account: str) -> str:
return actually_transfer(amount, to_account)
policy = {
"rules": [
{"action_type": "payment", "amount_max": 1_000, "effect": "allow"},
{"action_type": "payment", "amount_max": 10_000, "effect": "escalate"},
{"action_type": "payment", "effect": "block"},
]
}
authz = create_aiyo_mcp_authz(
rdp=create_local_rdp(policy=policy),
tool_config={
"transfer_funds": {"aiyo_gated": True, "action": {"type": "payment"}},
},
)
guarded_transfer = wrap_tool(
TransferFundsTool(),
authz=authz,
intent_builder=lambda kwargs: {
"type": "payment",
"amount": kwargs["amount"],
"target": kwargs["to_account"],
},
)
# Attach the gated tool to a crew member the usual way:
banker = Agent(
role="Banker",
goal="Execute payment transactions for the user.",
backstory="A senior banker focused on correct and policy-compliant transfers.",
tools=[guarded_transfer],
)
Wrapping a whole tool list
from aiyoplane_crewai import wrap_tools
all_tools = [SearchDocsTool(), ReadUserTool(), TransferFundsTool(), DeleteAccountTool()]
guarded_tools = wrap_tools(
all_tools,
authz=authz,
intent_builders={
"transfer_funds": lambda kw: {"type": "payment", "amount": kw["amount"]},
"delete_account": lambda kw: {"type": "destructive", "target": kw["user_id"]},
},
)
Tools whose name is not a key in intent_builders pass through unchanged.
Composition Boundary — what the adapter actually does
For each wrapped tool invocation:
- Intent construction.
intent_builder(tool_kwargs)produces an AEAP Intent payload. - RDP evaluation. Via
aiyoplane-mcp-authz's AiyoAuthz middleware. - Verdict composition.
- ALLOW → inner tool
_run/_arunexecutes with the original arguments. - ESCALATE →
EscalationRequiredis raised; the crew's error handling decides routing. - BLOCK →
BlockedByPolicyis raised; the tool never executes.
- ALLOW → inner tool
- Fail-closed default on every ambiguous condition.
Local vs. hosted RDP
from aiyoplane_mcp_authz import create_local_rdp, create_hosted_rdp
# Development:
authz = create_aiyo_mcp_authz(rdp=create_local_rdp(policy=policy), tool_config={...})
# Production:
authz = create_aiyo_mcp_authz(
rdp=create_hosted_rdp(api_key="aiyo_live_..."),
tool_config={...},
)
API reference
wrap_tool(tool, *, authz, intent_builder, tool_name_for_authz=None, return_receipt=False)
Wrap a single CrewAI tool. Returns an AiyoCrewAITool (also a BaseTool).
wrap_tools(tools, *, authz, intent_builders, return_receipt=False)
Wrap a collection. Explicit opt-in via intent_builders keys.
Exceptions
AiyoCrewAIError— base classAdapterConfigError— adapter configuration is invalidBlockedByPolicy— RDP returned BLOCKEscalationRequired— RDP returned ESCALATE
License
Apache License 2.0.
Links
- AEAP specification: https://github.com/aiyoplane/aeap
- Underlying implementation:
aiyoplane-mcp-authz - Trust surface: https://aiyoplane.com/trust
- Issues: https://github.com/aiyoplane/crewai/issues
CrewAI is a trademark of its respective owners. This package is an independent AEAP Composition Boundary Adapter and is not affiliated with or endorsed by the CrewAI team.
Verify First. Execute Second.
Metadata
Release files for aiyoplane-crewai 1.0.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 | |
|---|---|---|---|
| aiyoplane_crewai-1.0.0.tar.gz | 12.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aiyoplane_crewai-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.4 kB
Release files / aiyoplane_crewai-1.0.0.tar.gz
| Download URL | aiyoplane_crewai-1.0.0.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be3049bafec627b9cb53b9acb67c56300c70076ae06c89140a7a1e3db9f9a037
|
|
BLAKE2b-256 checksum How to use checksums |
13697f47d50b12008e40e9795573941ab8ffaf9c6fad401a05b768102b07da81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / aiyoplane_crewai-1.0.0-py3-none-any.whl
| Download URL | aiyoplane_crewai-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
67c554a9d307cd5f0be6ec3245db04ff3c5d62439da7ab216658f9959473f133
|
|
BLAKE2b-256 checksum How to use checksums |
96ec604294e021ae48ade54e14c51c1f2887d096572966416e7674b6ff924d0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|