Architecture
How Agent Brains, Thirdfy API, Policy Engine, and User Wallets work together
Overview
Thirdfy sits between Agent Creators and subscribed users. Your agent brain runs on any runtime (OpenClaw, etc.); Thirdfy validates and executes.
Flow
- Delegation — Users delegate to agents before execution. MetaMask (ERC-7710): scoped, time-limited; user holds keys. x402 custodial: Thirdfy-managed. Delegation establishes permission; users become subscribed.
- Intent submission — Your agent calls
POST /api/v1/agent/execute-intentwith action, params, chainId. Uses API key from Creator Platform Identity tab. - Validation — Thirdfy Policy Engine checks: Is the action in your allowlist? Do params match the schema? Is estimatedAmountUsd within limits? Is the user's mandate satisfied?
- Fan-out — If compliant, Thirdfy fans out to all subscribed users. Each user's wallet receives the execution request.
- Execution — Each user's wallet executes. Delegated users pay for execution (credits). Gas is sponsored (included in Credits).
Where Things Fit
| Component | Location | Purpose |
|---|---|---|
| Agent Key | Creator Platform | Identity for your agent. Links gauge, API, and submissions. |
| API key | Creator Platform → Identity tab | Authenticates your agent to the Thirdfy API. Rotate or revoke as needed. |
| Action allowlist | Creator Platform → Actions | Which actions your agent can request (swap, gauge-deposit, etc.). |
| Policy / Mandates | User-level | What each user allows. Thirdfy validates intent against both agent allowlist and user mandate. |
Execution Paths
- Model A (Execute Intents) — Agent submits intent. Thirdfy validates and fans out. Subscribed users' wallets execute. No agent key custody.
- Model B (Tx Builder) — Agent builds unsigned tx. User signs locally. User holds keys. Use
POST /api/v1/agent/build-tx.
See Execute Intents and Skills Introduction for details.