CrewAI agents call tools through @tool decorators and BaseTool subclasses. Paybond hooks that execution boundary — spend verify before side-effecting tools execute, then auto-evidence after success. Model inference stays on your provider client.
Python only — install paybond-kit[crewai] for the native adapter.
Adapter reference: /docs/kit/crewai.
spend verify before @tool
Wrapped @tool / BaseTool handlers authorize operation and amount before paid work.
Auto-evidence
Guarded tools finalize spend and submit signed evidence after success.
Policy budgets
Versioned YAML caps per-call and intent spend for procurement crews.
Python native
Install paybond-kit[crewai] — TypeScript stacks use agent-agnostic or another adapter.
Why Paybond (not just CrewAI checks)?
CrewAI tool wrappers and host approvals do not enforce a spend limit, a per-operation permission check (capability token), or a signed completion receipt tied to a spend agreement (intent).
Model / input guardrails
- CrewAI alone
- Yes — SDK or host checks and approvals
- With Paybond
- Yes — plus Harbor authorize at the tool boundary
Spend boundary
- CrewAI alone
- No per-tool Harbor budget or capability token
- With Paybond
- Per-call and intent budgets enforced before invoke
Signed evidence
- CrewAI alone
- SDK traces / logs only
- With Paybond
- Signed completion digests bound to the intent
Intent binding
- CrewAI alone
- No Harbor intent or settlement receipt
- With Paybond
- Capability token + intentId from authenticated bind
Paid tool deny / HITL
- CrewAI alone
- Host or SDK approvals only
- With Paybond
- spend verify, deny, or HITL hold before side effects
| Capability | CrewAI alone | With Paybond |
|---|---|---|
| Model / input guardrails | Yes — SDK or host checks and approvals | Yes — plus Harbor authorize at the tool boundary |
| Spend boundary | No per-tool Harbor budget or capability token | Per-call and intent budgets enforced before invoke |
| Signed evidence | SDK traces / logs only | Signed completion digests bound to the intent |
| Intent binding | No Harbor intent or settlement receipt | Capability token + intentId from authenticated bind |
| Paid tool deny / HITL | Host or SDK approvals only | spend verify, deny, or HITL hold before side effects |
How it works
Adapter flow
@tool / BaseTool
CrewAI agent invokes a side-effecting tool
Paybond wrap
Harbor authorize before your handler runs
- Verify spend and operation
- Deny or HITL hold
- Issue / check capability
Tool runs
Your tool body performs the paid work
Evidence
Wrapped tool finalizes spend + auto-evidence
Paybond wraps CrewAI @tool / BaseTool handlers: Harbor authorize before the tool runs, then auto-evidence after success.
3-minute quickstart
Smoke the crewai adapter sandbox contract:
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]"When the smoke succeeds you should see:
- ✓ Spend approved
- ✓ Tool completed
- ✓ Evidence verified (
cost_and_completion)
What success looks like
What success looks like
Authorized tool call · illustrative
- Operation
- procurement.submit_po
- Status
- Approved
- Requested
- $120.00
- Evidence
- Verified
- Preset
- cost_and_completion
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-agent --framework crewaiClone-and-run GitHub starter:
terminal
git clone https://github.com/nonameuserd/paybond-crewai-procurement-agent.git
cd paybond-crewai-procurement-agent
cp .env.example .env.local
paybond-kit-login
pip install -r requirements.txt
python app.pyWire middleware
Recommended wiring
paybond.agent with framework crewai returns guarded agent_tools for your CrewAI agents.
paybond_session.py
from crewai.tools import tool
from paybond_kit import Paybond
from paybond_kit.agent.registry import create_paybond_tool_registry
from paybond_kit.crewai import create_paybond_crewai_config
# Price lives in your catalog (or ERP) — not in an LLM-invented amount_cents.
CATALOG = {"LAP-14": {"vendor_id": "vendor-acme", "unit_cents": 12_000}}
@tool("procurement.submit_po")
def submit_po(sku: str, quantity: int = 1) -> str:
"""Submit a purchase order. Unit price comes from the catalog."""
item = CATALOG[sku]
cost_cents = item["unit_cents"] * quantity
return json.dumps(
{
"status": "completed",
"sku": sku,
"vendor_id": item["vendor_id"],
"cost_cents": cost_cents,
}
)
paybond = await Paybond.open(api_key=os.environ["PAYBOND_API_KEY"])
run = await paybond.agent_run.bind(
{
"bootstrap": {
"kind": "sandbox",
"operation": "procurement.submit_po",
"requested_spend_cents": 12_000,
"completion_preset": "cost_and_completion",
},
"registry": create_paybond_tool_registry(
{
"default_deny": True,
"side_effecting": {
"procurement.submit_po": {
"operation": "procurement.submit_po",
"evidence_preset": "cost_and_completion",
"spend_cents": lambda args: CATALOG[args["sku"]]["unit_cents"]
* int(args.get("quantity", 1)),
}
},
}
),
}
)
guarded_tools = create_paybond_crewai_config(run, [submit_po, search_catalog]).tools
# Register guarded_tools on your CrewAI agents.Manual hook wiring
When you already bound a PaybondAgentRun:
paybond_session.py
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 Paybond 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.
Production checklist
Production checklist
- Scaffold middleware with paybond init agent-middleware --framework crewai
- Init a policy preset (e.g. saas) and validate tools
- Wire paybond.agent(framework="crewai", tools=...)
- Bind intentId and capabilityToken per session in production
- Smoke with paybond agent demo crewai smoke before ship
Works with
Works with
- CrewAI
- OpenAI
- Anthropic
- MCP
Ready to test?
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.
Public template: paybond-crewai-procurement-agent.