CrewAI agents call tools through @tool decorators and BaseTool subclasses. Paybond hooks that execution boundary — Harbor (agent transaction engine) verify runs before side-effecting tools execute, then auto-evidence fires after success. Model inference stays on your provider client.
Python only — install paybond-kit[crewai] for the native adapter.
Try it
terminal
paybond login
paybond agent demo crewai smoke \
--operation procurement.submit_po \
--requested-spend-cents 12000 \
--evidence-preset cost_and_completion \
--format tableInstall the extra first:
terminal
pip install "paybond-kit[crewai]"Scaffold
terminal
paybond init agent-middleware --framework crewai --out paybond_crewai.py
paybond policy init --preset saas --out paybond.policy.yamlOr the vertical template:
terminal
paybond init --template crewai-procurement-agentRecommended wiring
from crewai.tools import tool
from paybond_kit import Paybond
paybond = await Paybond.open(api_key=os.environ["PAYBOND_API_KEY"])
@tool("procurement.submit_po")
def submit_po(vendor_id: str, amount_cents: int) -> str:
"""Submit a purchase order to a vendor."""
...
result = await paybond.agent(
policy="./paybond.policy.yaml",
framework="crewai",
tools=[submit_po, search_catalog],
)
guarded_tools = result.agent_tools
# Register guarded_tools on your CrewAI agents.
Install extras: pip install "paybond-kit[crewai]".
Manual hook wiring
When you already bound a PaybondAgentRun:
from paybond_kit.crewai import create_paybond_crewai_config
config = create_paybond_crewai_config(run, tools)
guarded_tools = config.tools
# Or wrap incrementally: config.wrap_tool(new_tool)
Approval holds
When Harbor returns an approval hold, surface it to operators, approve in the tenant console, then retry with the same operation, amount, metadata, and approvalToken. Hard denials must not execute the tool.
Related guides
- Agent middleware — run binding and policy hot-reload
- Agent policy-as-code — long-lived crews with GitOps YAML
- Agent-agnostic spend controls — fallback for mixed runtimes
Developer reference: /docs/kit/crewai.