crewai-yieldagentx402-tools
CrewAI tools for YieldAgentX402 — policy-gated, receipt-backed agent execution (ShadeGuard + TEE + anchored proof).
Proof: 16 MCP tools · 18 chains · no custody · signed receipts (via the gateway).
Docs · Try without signup · Get API key · PyPI
What it does
Drop these tools into your CrewAI crews to give them:
- Policy dry-run — preview what ShadeGuard will allow before any action runs
- x402 payments — send USDC, BTC, NEAR, SOL and 14+ other chains custody-free
- Secure workflows — Intel TDX TEE-attested execution with signed receipts
- Receipt verification — HMAC-SHA256 + Filecoin + BTFS dual-anchor proof
- Shade Agent wallet — read MPC-derived EVM + BTC + Starknet addresses
Every tool returns a run_id and receipt_signature you can verify client-side with yieldagentx402-verify (JavaScript) or the gateway's /api/orchestration/runs/<run_id> endpoint.
Try without signup
curl -X POST https://api.yieldagentx402.app/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
"params":{"name":"yax_get_capabilities","arguments":{}}}'
Returns differentiators, proof_points (16 tools · 18 chains · no custody · signed receipts), fees, rate limits — no auth required.
Want an instant test key?
curl -X POST https://api.yieldagentx402.app/api/apply \
-H "Content-Type: application/json" \
-d '{"agent_name":"my-crewai-agent"}'
Returns a yax_test_* key in <1 s ($5 cap, 7-day expiry).
Install
pip install crewai-yieldagentx402-tools
Quickstart
from crewai import Agent, Task, Crew
from crewai_yieldagentx402_tools import (
YAXPolicyCheckTool,
YAXPaymentTool,
YAXSecureWorkflowTool,
YAXReceiptVerifyTool,
)
import os
os.environ["YAX_API_KEY"] = "yax_test_..." # or yax_live_... for production
finance_agent = Agent(
role="Finance Operations",
goal="Pay invoices on time and verify every settlement on-chain",
tools=[
YAXPolicyCheckTool(),
YAXPaymentTool(),
YAXReceiptVerifyTool(),
],
verbose=True,
)
task = Task(
description="Pay invoice INV-9931 — 50 USDC to 0xMerchantAddress on Base. Confirm receipt.",
agent=finance_agent,
)
Crew(agents=[finance_agent], tasks=[task]).kickoff()
The agent will:
- Call
YAXPolicyCheckToolto dry-run the action against ShadeGuard - Call
YAXPaymentTool(if approved) to send the payment via the gateway - Call
YAXReceiptVerifyToolwith the returnedrun_idto confirm HMAC signature + Filecoin anchor
No private keys held anywhere in your crew. The Shade Agent (NEAR chain signatures MPC) signs inside a TEE.
Custody-free wallet — one MPC key, three chains
| Chain | Address | Curve |
|---|---|---|
| EVM (Base/Eth) | 0x6905D04C3655625F6171f7b1e801a9325B1Fa1e8 |
secp256k1 (MPC) |
| Bitcoin (P2WPKH) | bc1qcd8ljsj7x0rq3sw7drrt7ragqmmt3tfsfxs6gy |
secp256k1 (MPC) |
| Starknet | 0x003a4e08…570906a21 |
Stark (preset) |
Live: https://shade-agent-worker.cryptoblac.workers.dev/api/wallet
Receipt verification (client-side, no trust in the gateway)
import hmac, hashlib, json
def verify_receipt(receipt: dict, signature: str, secret: str) -> bool:
body = json.dumps(receipt, sort_keys=True, separators=(",", ":")).encode()
expected = hmac.new(secret.encode(), body, hashlib.sha256).hexdigest()
sig = signature.lower().removeprefix("hmac-sha256=").removeprefix("0x")
return hmac.compare_digest(expected, sig)
Or use the JavaScript companion lib: yieldagentx402-verify.
Examples
See examples/:
managed_workflow.py— full payment + verification flowreal_estate_lead_agent.py— lead scoring + nurture sequence
Configuration
| Env var | Required | Default |
|---|---|---|
YAX_API_KEY |
Yes (production keys for live workflows) | — |
YAX_API_BASE |
No | https://api.yieldagentx402.app |
YAX_AGENT_ID |
No | inferred from API key |
YAX_WEBHOOK_SECRET |
No (only if you use webhook delivery) | — |
Publishing (for maintainers)
pip install build twine
python -m build
twine upload dist/*
License
MIT
Metadata
Release files for crewai-yieldagentx402-tools 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| crewai_yieldagentx402_tools-1.0.1.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| crewai_yieldagentx402_tools-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.9 kB
Release files / crewai_yieldagentx402_tools-1.0.1.tar.gz
| Download URL | crewai_yieldagentx402_tools-1.0.1.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
830adaef472ecbea69923ecafaff8ec7bf39f59dd087d8e98aa7667c7275efd1
|
|
BLAKE2b-256 checksum How to use checksums |
d24b2100ce5d815ebc495ad1a52ded79c08a6902c54652e30a11a37bf170f137
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / crewai_yieldagentx402_tools-1.0.1-py3-none-any.whl
| Download URL | crewai_yieldagentx402_tools-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a85bf0115c15764b5a58f3cfe840af24e5dbdc0c1866826abeb90217816848ef
|
|
BLAKE2b-256 checksum How to use checksums |
5f07696ffb0cf7f0d55f2534c4dc07e30c0d60ed0c9e0c392a9cb3922076633f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|