CrewAI tools for policy-gated YieldAgentX402 execution — ShadeGuard, receipts, TEE attestation. Proof: 16 MCP tools, 18 chains, no custody, signed receipts (via gateway).
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crewai_yieldagentx402_tools-1.0.1.tar.gz.
File metadata
- Download URL: crewai_yieldagentx402_tools-1.0.1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
830adaef472ecbea69923ecafaff8ec7bf39f59dd087d8e98aa7667c7275efd1
|
|
| MD5 |
a428c5a353a2ab0fcb23dc0721d5e9e6
|
|
| BLAKE2b-256 |
d24b2100ce5d815ebc495ad1a52ded79c08a6902c54652e30a11a37bf170f137
|
File details
Details for the file crewai_yieldagentx402_tools-1.0.1-py3-none-any.whl.
File metadata
- Download URL: crewai_yieldagentx402_tools-1.0.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a85bf0115c15764b5a58f3cfe840af24e5dbdc0c1866826abeb90217816848ef
|
|
| MD5 |
c947e9e88f7e85d61098196427d38585
|
|
| BLAKE2b-256 |
5f07696ffb0cf7f0d55f2534c4dc07e30c0d60ed0c9e0c392a9cb3922076633f
|