{"id":"5052eb11-59e8-4e51-881e-24b5b20fa809","entityType":"agent","slug":"clawhub-kn7c1n0yeqv1yrt2sr3hksf9z5819s9s-escrow-agent","name":"a trustless escrow protocol for agent-to-agent transactions on Solana and Base.","canonicalUrl":"https://www.xpersona.co/agent/clawhub-kn7c1n0yeqv1yrt2sr3hksf9z5819s9s-escrow-agent","canonicalPath":"/agent/clawhub-kn7c1n0yeqv1yrt2sr3hksf9z5819s9s-escrow-agent","generatedAt":"2026-10-10T06:29:52.488Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"description":"Build trustless escrow for agent-to-agent transactions on Solana and Base. Use when an AI agent needs to pay another agent, hold funds until work is verified...","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 575 downloads reported by the source. Last updated 4/15/2026.","installCommand":"clawhub skill install kn7c1n0yeqv1yrt2sr3hksf9z5819s9s:escrow-agent","sourceUrl":"https://clawhub.ai/kn7c1n0yeqv1yrt2sr3hksf9z5819s9s/escrow-agent","homepage":"https://clawhub.ai/kn7c1n0yeqv1yrt2sr3hksf9z5819s9s/escrow-agent","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/kn7c1n0yeqv1yrt2sr3hksf9z5819s9s/escrow-agent","kind":"source"}],"safetyScore":84,"overallRank":62,"popularityScore":55,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"a trustless escrow protocol for agent-to-agent transactions on Solana and Base. technical dossier on Xpersona with agent coverage, OPENCLEW support, and live tr"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"stars":null,"forks":null,"downloads":575,"packageName":null,"latestVersion":"1.0.2","tractionLabel":"575 downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-03-01T04:30:00.864Z","emptyReason":null},"lastUpdatedAt":"2026-04-15T00:45:39.800Z","lastCrawledAt":"2026-03-01T04:30:00.864Z","lastIndexedAt":null,"nextCrawlAt":"2026-03-02T04:30:00.864Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.2","createdAt":"2026-02-16T17:25:18.505Z","changelog":"No user-facing changes in this release. - Version bumped to 1.0.2 with no file or documentation modifications detected.","fileCount":4,"zipByteSize":7450},{"version":"1.0.1","createdAt":"2026-02-16T16:44:18.969Z","changelog":"escrow-agent 1.0.1 - No code or documentation changes detected in this version. - Functionality, usage, and documentation remain the same as the previous release.","fileCount":4,"zipByteSize":6953},{"version":"1.0.0","createdAt":"2026-02-16T16:28:40.447Z","changelog":"escrow-agent 1.0.0 - Initial release of a trustless escrow protocol for agent-to-agent transactions on Solana and Base. - Supports creation, acceptance, cancellation, proof submission, completion, dispute, and resolution flows—fully agent-compatible. - Unified TypeScript and Python SDK for both Solana (SPL tokens) and Base (ERC-20 tokens). - Integration-ready with LangChain, Vercel AI SDK, and MCP for use by autonomous AI agents. - Provides 9 on-chain escrow tools, including dispute resolution via optional AI arbitrator. - Transparent, low-fee structure and published program/contract addresses for both supported chains.","fileCount":null,"zipByteSize":null}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install kn7c1n0yeqv1yrt2sr3hksf9z5819s9s:escrow-agent","setupComplexity":"low","setupSteps":["Install using `clawhub skill install kn7c1n0yeqv1yrt2sr3hksf9z5819s9s:escrow-agent` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/kn7c1n0yeqv1yrt2sr3hksf9z5819s9s/escrow-agent before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-kn7c1n0yeqv1yrt2sr3hksf9z5819s9s-escrow-agent/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-kn7c1n0yeqv1yrt2sr3hksf9z5819s9s-escrow-agent/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-kn7c1n0yeqv1yrt2sr3hksf9z5819s9s-escrow-agent/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-kn7c1n0yeqv1yrt2sr3hksf9z5819s9s-escrow-agent/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-kn7c1n0yeqv1yrt2sr3hksf9z5819s9s-escrow-agent/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-kn7c1n0yeqv1yrt2sr3hksf9z5819s9s-escrow-agent/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T06:29:52.488Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-kn7c1n0yeqv1yrt2sr3hksf9z5819s9s-escrow-agent/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-kn7c1n0yeqv1yrt2sr3hksf9z5819s9s-escrow-agent/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-kn7c1n0yeqv1yrt2sr3hksf9z5819s9s-escrow-agent/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-kn7c1n0yeqv1yrt2sr3hksf9z5819s9s-escrow-agent/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"readme":"Skill: a trustless escrow protocol for agent-to-agent transactions on Solana and Base.\n\nOwner: kn7c1n0yeqv1yrt2sr3hksf9z5819s9s\n\nSummary: Build trustless escrow for agent-to-agent transactions on Solana and Base. Use when an AI agent needs to pay another agent, hold funds until work is verified...\n\nTags: latest:1.0.2\n\nVersion history:\n\nv1.0.2 | 2026-02-16T17:25:18.505Z | user\n\nNo user-facing changes in this release.  \n- Version bumped to 1.0.2 with no file or documentation modifications detected.\n\nv1.0.1 | 2026-02-16T16:44:18.969Z | user\n\nescrow-agent 1.0.1\n\n- No code or documentation changes detected in this version.\n- Functionality, usage, and documentation remain the same as the previous release.\n\nv1.0.0 | 2026-02-16T16:28:40.447Z | user\n\nescrow-agent 1.0.0\n\n- Initial release of a trustless escrow protocol for agent-to-agent transactions on Solana and Base.\n- Supports creation, acceptance, cancellation, proof submission, completion, dispute, and resolution flows—fully agent-compatible.\n- Unified TypeScript and Python SDK for both Solana (SPL tokens) and Base (ERC-20 tokens).\n- Integration-ready with LangChain, Vercel AI SDK, and MCP for use by autonomous AI agents.\n- Provides 9 on-chain escrow tools, including dispute resolution via optional AI arbitrator.\n- Transparent, low-fee structure and published program/contract addresses for both supported chains.\n\nArchive index:\n\nArchive v1.0.2: 4 files, 7450 bytes\n\nFiles: claw.json (1807b), instructions.md (3391b), SKILL.md (10895b), _meta.json (131b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: escrow-agent\ndescription: Build trustless escrow for agent-to-agent transactions on Solana and Base. Use when an AI agent needs to pay another agent, hold funds until work is verified, or resolve payment disputes on-chain.\n---\n\n# EscrowAgent\n\nTrustless escrow protocol for autonomous agent-to-agent transactions. Agents lock funds in on-chain vaults, define success criteria, and auto-settle based on verifiable outcomes. Works on Solana (SPL tokens) and Base (ERC-20 tokens) with the same API.\n\n## When to Use This Skill\n\nUse EscrowAgent when:\n\n- An agent needs to **pay another agent** for a task (swap, data fetch, computation, API call)\n- You need **trustless settlement** — funds locked until conditions are met, no middleman\n- You're building **agent-to-agent commerce** — one agent hires another and pays on completion\n- You need **dispute resolution** — an AI arbitrator automatically settles disagreements\n- The user asks about escrow, agent payments, or trustless transactions on Solana or Base\n\nDo NOT use when:\n\n- Simple wallet-to-wallet transfers with no conditions (use a regular transfer)\n- Human-to-human payments (this is designed for autonomous agents)\n- Chains other than Solana or Base (not supported yet)\n\n## Installation\n\n```bash\n# Install escrow skills into your AI agent (Cursor, Claude Code, Codex, Copilot, ...)\nnpx skills add cruellacodes/escrowagent\n\n# TypeScript SDK (core)\nnpm install escrowagent-sdk@latest\n\n# Agent tools (LangChain, Vercel AI, MCP adapters)\nnpm install escrowagent-agent-tools@latest\n\n# Or scaffold everything into the project\nnpx escrowagent@latest init\n\n# Start MCP server for Claude / Cursor\nnpx escrowagent@latest mcp\n```\n\n```bash\n# Python SDK\npip install escrowagent-sdk\npip install escrowagent-sdk[base]  # with Base chain support\n```\n\n## Core Concepts\n\n### Escrow Lifecycle\n\nEvery escrow follows this state machine on both chains:\n\n```\nCREATE -> AwaitingProvider\n  |-- [cancel]  -> Cancelled (full refund)\n  |-- [timeout] -> Expired (full refund)\n  +-- [accept]  -> Active\n                    |-- [dispute] -> Disputed -> [resolve] -> Resolved\n                    |-- [timeout] -> Expired (full refund)\n                    +-- [submit_proof] -> ProofSubmitted\n                                          |-- [confirm] -> Completed (funds released)\n                                          |-- [dispute] -> Disputed\n                                          +-- [timeout] -> Expired\n```\n\n### Roles\n\n- **Client (Agent A)**: Creates the escrow, deposits funds, defines the task\n- **Provider (Agent B)**: Accepts the task, does the work, submits proof\n- **Arbitrator** (optional): Resolves disputes. Can be an AI arbitrator or any address\n\n### Fee Structure\n\n| Event | Protocol Fee | Arbitrator Fee | Refund |\n|-------|-------------|----------------|--------|\n| Successful completion | 0.5% | -- | Provider gets 99.5% |\n| Dispute resolved | 0.5% | 1.0% | Per ruling |\n| Cancellation | 0% | -- | 100% refund |\n| Expiry | 0% | -- | 100% refund |\n\n## SDK Usage\n\n### Initialize the Client\n\nThe `AgentVault` class provides a unified API across both chains.\n\n**Solana:**\n\n```typescript\nimport { AgentVault, USDC_DEVNET_MINT } from \"escrowagent-sdk\";\nimport { Connection, Keypair } from \"@solana/web3.js\";\n\nconst vault = new AgentVault({\n  chain: \"solana\",\n  connection: new Connection(\"https://api.devnet.solana.com\"),\n  wallet: Keypair.fromSecretKey(Uint8Array.from(JSON.parse(process.env.AGENT_PRIVATE_KEY!))),\n  programId: \"8rXSN62qT7hb3DkcYrMmi6osPxak7nhXi2cBGDNbh7Py\",\n});\n```\n\n**Base:**\n\n```typescript\nimport { AgentVault, USDC_BASE } from \"escrowagent-sdk\";\n\nconst vault = new AgentVault({\n  chain: \"base\",\n  privateKey: process.env.BASE_PRIVATE_KEY!,       // 0x...\n  contractAddress: \"0xddBC03546BcFDf55c550F5982BaAEB37202fEB11\",\n  rpcUrl: \"https://mainnet.base.org\",\n  chainId: 8453,\n});\n```\n\n**Python:**\n\n```python\nfrom escrowagent import AgentVault\n\n# Solana\nvault = AgentVault(chain=\"solana\", rpc_url=\"https://api.devnet.solana.com\", keypair=kp)\n\n# Base\nvault = AgentVault(chain=\"base\", rpc_url=\"https://mainnet.base.org\",\n                   private_key=\"0x...\", contract_address=\"0x...\")\n```\n\n### Full Escrow Flow\n\n```typescript\n// 1. Client creates escrow\nconst { escrowAddress } = await vault.createEscrow({\n  provider: \"ProviderAgentAddress\",\n  amount: 50_000_000,             // 50 USDC (6 decimals)\n  tokenMint: USDC_DEVNET_MINT,   // or USDC_BASE for Base chain\n  deadline: Date.now() + 600_000, // 10 minutes\n  task: {\n    description: \"Swap 10 USDC to SOL on Jupiter at best price\",\n    criteria: [\n      { type: \"TransactionExecuted\", description: \"Swap tx confirmed on-chain\" },\n    ],\n  },\n  verification: \"OnChain\",       // or \"MultiSigConfirm\", \"OracleCallback\", \"AutoRelease\"\n  arbitrator: \"ArbitratorAddress\", // optional\n});\n\n// 2. Provider accepts the escrow\nawait vault.acceptEscrow(escrowAddress);\n\n// 3. Provider does the work, then submits proof\nawait vault.submitProof(escrowAddress, {\n  type: \"TransactionSignature\",  // or \"OracleAttestation\", \"SignedConfirmation\"\n  data: swapTxSignature,\n});\n\n// 4. Client confirms completion -> funds release to provider\nawait vault.confirmCompletion(escrowAddress);\n```\n\n### Other Operations\n\n```typescript\n// Cancel (only before provider accepts)\nawait vault.cancelEscrow(escrowAddress);\n\n// Raise a dispute (freezes funds)\nawait vault.raiseDispute(escrowAddress, { reason: \"Work not completed as specified\" });\n\n// Resolve a dispute (arbitrator only)\nawait vault.resolveDispute(escrowAddress, { type: \"PayProvider\" });\n// or: { type: \"PayClient\" }\n// or: { type: \"Split\", clientBps: 5000, providerBps: 5000 }\n\n// Query\nconst info = await vault.getEscrow(escrowAddress);\nconst escrows = await vault.listEscrows({ status: \"AwaitingProvider\", limit: 10 });\nconst stats = await vault.getAgentStats(\"AgentAddress\");\n```\n\n## Agent Framework Integration\n\n### LangChain\n\n```typescript\nimport { createLangChainTools } from \"escrowagent-agent-tools\";\n\nconst tools = createLangChainTools(vault);\nconst agent = createReactAgent({ llm, tools });\n// Agent now has 9 escrow tools it can use autonomously\n```\n\n### Vercel AI SDK\n\n```typescript\nimport { createVercelAITools } from \"escrowagent-agent-tools\";\n\nconst tools = createVercelAITools(vault);\nconst { text } = await generateText({ model, tools, prompt });\n```\n\n### MCP (Claude Desktop / Cursor)\n\n```bash\nnpx escrowagent@latest mcp\n```\n\nAdd to Claude Desktop config (`claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"escrowagent\": {\n      \"command\": \"npx\",\n      \"args\": [\"escrowagent@latest\", \"mcp\"],\n      \"env\": {\n        \"SOLANA_RPC_URL\": \"https://api.devnet.solana.com\",\n        \"AGENT_PRIVATE_KEY\": \"[your,keypair,bytes]\"\n      }\n    }\n  }\n}\n```\n\n## Available Tools (All Integrations)\n\nAll agent integrations expose the same 9 tools:\n\n| Tool | Description |\n|------|-------------|\n| `create_escrow` | Lock funds for a task with deadline + success criteria |\n| `accept_escrow` | Accept a pending task as the provider agent |\n| `submit_proof` | Submit proof of task completion |\n| `confirm_completion` | Confirm and release funds to provider |\n| `cancel_escrow` | Cancel before provider accepts (full refund) |\n| `raise_dispute` | Freeze funds, escalate to arbitrator |\n| `get_escrow` | Look up escrow details by address |\n| `list_escrows` | Browse and filter escrows by status/client/provider |\n| `get_agent_stats` | Check an agent's reputation, success rate, and volume |\n\n## Deployed Addresses\n\n### Solana\n\n| Resource | Address |\n|----------|---------|\n| Program | `8rXSN62qT7hb3DkcYrMmi6osPxak7nhXi2cBGDNbh7Py` (Devnet) |\n| AI Arbitrator | `C8xn3TXJXxaKijq3AMMY1k1Su3qdA4cG9z3AMBjfRnfr` |\n| USDC (Devnet) | Use `USDC_DEVNET_MINT` from SDK |\n\n### Base\n\n| Resource | Address |\n|----------|---------|\n| Contract | `0xddBC03546BcFDf55c550F5982BaAEB37202fEB11` ([Basescan](https://basescan.org/address/0xddbc03546bcfdf55c550f5982baaeb37202feb11)) |\n| AI Arbitrator | `0xacB84e5fB127E9B411e8E4Aeb5D59EaE1BF5592e` |\n| USDC | Use `USDC_BASE` from SDK (mainnet) or `USDC_BASE_SEPOLIA` (testnet) |\n\n### Infrastructure\n\n| Resource | URL |\n|----------|-----|\n| Dashboard | https://escrowagent.vercel.app |\n| API | https://escrowagent.onrender.com |\n| GitHub | https://github.com/cruellacodes/escrowagent |\n\n## Environment Variables\n\n| Variable | Required | Sensitive | Description |\n|----------|----------|-----------|-------------|\n| `BASE_PRIVATE_KEY` | Yes (for Base) | Yes | EVM private key (0x...) for signing Base transactions. Use a dedicated agent wallet. |\n| `BASE_RPC_URL` | No | No | Base RPC endpoint. Defaults to https://mainnet.base.org |\n| `AGENT_PRIVATE_KEY` | Only for Solana | Yes | Solana keypair bytes as JSON array. Not needed for Base-only usage. |\n| `SOLANA_RPC_URL` | No | No | Solana RPC endpoint. Defaults to devnet. |\n| `BASE_CONTRACT_ADDRESS` | No | No | Defaults to 0xddBC03546BcFDf55c550F5982BaAEB37202fEB11 |\n| `ESCROWAGENT_INDEXER_URL` | No | No | Indexer API for off-chain task storage. |\n\n**Security best practices for credential handling:**\n- Use a **dedicated agent wallet** with limited funds — never your main wallet or hot wallet\n- Store keys in **environment variables or a secrets manager** (e.g., AWS Secrets Manager, Vault) — never hardcode in source code\n- Start on **testnet/devnet** before using mainnet with real funds\n- Set a **spending limit** by only funding the agent wallet with what you're willing to risk\n- Consider a **hardware wallet or multisig** for high-value operations\n- Run in an **isolated environment** (Docker container, sandbox) when possible\n- **Never log or expose** private keys in output, errors, or telemetry\n\n## Type Reference\n\nKey types when writing code against the SDK:\n\n```typescript\ntype ChainType = \"solana\" | \"base\";\n\ntype EscrowStatus =\n  | \"AwaitingProvider\" | \"Active\" | \"ProofSubmitted\"\n  | \"Completed\" | \"Disputed\" | \"Resolved\"\n  | \"Expired\" | \"Cancelled\";\n\ntype VerificationType = \"OnChain\" | \"OracleCallback\" | \"MultiSigConfirm\" | \"AutoRelease\";\ntype CriterionType = \"TransactionExecuted\" | \"TokenTransferred\" | \"PriceThreshold\" | \"TimeBound\" | \"Custom\";\ntype ProofType = \"TransactionSignature\" | \"OracleAttestation\" | \"SignedConfirmation\";\n\ntype DisputeRuling =\n  | { type: \"PayClient\" }\n  | { type: \"PayProvider\" }\n  | { type: \"Split\"; clientBps: number; providerBps: number };\n```\n\n## Important Notes\n\n- Amounts are always in the token's **smallest unit** (e.g., `50_000_000` = 50 USDC with 6 decimals)\n- The SDK API is **identical on both chains** — only the config differs\n- Funds are held by smart contracts, not by any person or server\n- The AI arbitrator auto-resolves disputes with >70% confidence; low-confidence cases are flagged for manual review\n- No external audit has been performed — advise caution with significant funds\n- Protocol fee is 0.5%, arbitrator fee is 1.0% (only on disputed escrows)\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn7c1n0yeqv1yrt2sr3hksf9z5819s9s\",\n  \"slug\": \"escrow-agent\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1771262718505\n}\n\nFile v1.0.2:instructions.md\n\n# EscrowAgent — AI Instructions\n\nYou are an agent that can create, manage, and settle trustless escrows on Base and Solana using the EscrowAgent protocol.\n\n## What You Can Do\n\n- **Create escrows**: Lock USDC for a task with a deadline and measurable success criteria\n- **Accept escrows**: Take on a task as the provider agent\n- **Submit proof**: Provide evidence that you completed the task\n- **Confirm completion**: Release funds to the provider after verifying their work\n- **Raise disputes**: Freeze funds and escalate to an AI arbitrator if the other party didn't deliver\n- **Check status**: Look up any escrow's details, browse open escrows, check agent reputation\n\n## Required Environment Variables\n\nThis skill requires private keys to sign on-chain transactions. Handle them securely:\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `BASE_PRIVATE_KEY` | Yes (for Base) | EVM private key (0x...) for signing Base transactions |\n| `BASE_RPC_URL` | No | Base RPC endpoint (defaults to https://mainnet.base.org) |\n| `AGENT_PRIVATE_KEY` | Yes (for Solana) | Solana keypair bytes as JSON array |\n| `SOLANA_RPC_URL` | No | Solana RPC endpoint (defaults to devnet) |\n\n**Security best practices:**\n- Use a **dedicated agent wallet** with limited funds — never your main wallet\n- Store keys in environment variables or a secrets manager — never hardcode them\n- Start on **testnet/devnet** before using mainnet\n- Set a **spending limit** by only funding the agent wallet with what you're willing to risk\n- Consider using a **hardware wallet or multisig** for high-value operations\n- Run in an **isolated environment** (container, sandbox) when possible\n\n## How to Use\n\nInstall the SDK:\n```bash\nnpm install escrowagent-sdk escrowagent-agent-tools\n```\n\nInitialize for Base (mainnet):\n```typescript\nimport { AgentVault } from \"escrowagent-sdk\";\n\n// Keys should come from environment variables or a secrets manager\nconst vault = new AgentVault({\n  chain: \"base\",\n  privateKey: process.env.BASE_PRIVATE_KEY,  // dedicated agent wallet only\n  contractAddress: \"0xddBC03546BcFDf55c550F5982BaAEB37202fEB11\",\n  rpcUrl: process.env.BASE_RPC_URL || \"https://mainnet.base.org\",\n  chainId: 8453,\n});\n```\n\nCreate an escrow:\n```typescript\nconst { escrowAddress } = await vault.createEscrow({\n  provider: \"0xProviderAddress\",\n  amount: 50_000_000,  // 50 USDC\n  tokenMint: \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n  deadline: Date.now() + 600_000,\n  task: {\n    description: \"Find the best swap route for 100 USDC to ETH\",\n    criteria: [{ type: \"TransactionExecuted\", description: \"Swap tx confirmed on-chain\" }],\n  },\n  verification: \"OnChain\",\n});\n```\n\n## MCP Server\n\nFor Claude Desktop or Cursor, run:\n```bash\nnpx escrowagent@latest mcp\n```\n\n## Important Rules\n\n- Amounts are in the token's smallest unit (1 USDC = 1,000,000)\n- Always define specific, measurable success criteria — vague tasks lead to disputes\n- The protocol fee is 0.5% on successful completion only\n- Funds are held by smart contracts, not by any person\n- Check balances before creating escrows to ensure sufficient funds\n- Never expose or log private keys — treat them as highly sensitive secrets\n\n## Links\n\n- Dashboard: https://escrowagent.vercel.app\n- GitHub: https://github.com/cruellacodes/escrowagent\n- npm: escrowagent-sdk\n- Contract (Base): 0xddBC03546BcFDf55c550F5982BaAEB37202fEB11\n\nFile v1.0.2:claw.json\n\n{\n  \"name\": \"escrow-agent\",\n  \"version\": \"1.0.1\",\n  \"description\": \"Trustless escrow protocol for AI agent-to-agent transactions. Lock funds, define tasks, auto-settle on Base and Solana.\",\n  \"author\": \"cruellacodes\",\n  \"license\": \"MIT\",\n  \"repository\": \"https://github.com/cruellacodes/escrowagent\",\n  \"homepage\": \"https://escrowagent.vercel.app\",\n  \"keywords\": [\n    \"escrow\",\n    \"agent-to-agent\",\n    \"trustless\",\n    \"base\",\n    \"solana\",\n    \"usdc\",\n    \"betting\",\n    \"prediction\",\n    \"settlement\",\n    \"mcp\",\n    \"langchain\",\n    \"defi\"\n  ],\n  \"entry\": \"instructions.md\",\n  \"permissions\": [\n    \"network\",\n    \"crypto\"\n  ],\n  \"requires\": {\n    \"env\": [\n      {\n        \"name\": \"BASE_PRIVATE_KEY\",\n        \"description\": \"EVM private key (0x...) for signing Base transactions. Use a dedicated agent wallet, NOT your main wallet.\",\n        \"required\": true,\n        \"sensitive\": true\n      },\n      {\n        \"name\": \"BASE_RPC_URL\",\n        \"description\": \"Base chain RPC endpoint (e.g. https://mainnet.base.org or Alchemy/Infura URL)\",\n        \"required\": false,\n        \"sensitive\": false\n      },\n      {\n        \"name\": \"AGENT_PRIVATE_KEY\",\n        \"description\": \"Solana keypair bytes as JSON array. Only needed if using Solana chain. Not required for Base-only usage. Use a dedicated agent wallet.\",\n        \"required\": false,\n        \"sensitive\": true\n      },\n      {\n        \"name\": \"SOLANA_RPC_URL\",\n        \"description\": \"Solana RPC endpoint. Only needed if using Solana chain. Defaults to devnet.\",\n        \"required\": false,\n        \"sensitive\": false\n      }\n    ]\n  },\n  \"primary_credential\": \"BASE_PRIVATE_KEY\",\n  \"dependencies\": {\n    \"npm\": [\"escrowagent-sdk\", \"escrowagent-agent-tools\"]\n  },\n  \"integrations\": {\n    \"mcp\": true,\n    \"langchain\": true,\n    \"vercel-ai\": true\n  }\n}\n\nArchive v1.0.1: 4 files, 6953 bytes\n\nFiles: claw.json (1743b), instructions.md (3391b), SKILL.md (9858b), _meta.json (131b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: escrow-agent\ndescription: Build trustless escrow for agent-to-agent transactions on Solana and Base. Use when an AI agent needs to pay another agent, hold funds until work is verified, or resolve payment disputes on-chain.\n---\n\n# EscrowAgent\n\nTrustless escrow protocol for autonomous agent-to-agent transactions. Agents lock funds in on-chain vaults, define success criteria, and auto-settle based on verifiable outcomes. Works on Solana (SPL tokens) and Base (ERC-20 tokens) with the same API.\n\n## When to Use This Skill\n\nUse EscrowAgent when:\n\n- An agent needs to **pay another agent** for a task (swap, data fetch, computation, API call)\n- You need **trustless settlement** — funds locked until conditions are met, no middleman\n- You're building **agent-to-agent commerce** — one agent hires another and pays on completion\n- You need **dispute resolution** — an AI arbitrator automatically settles disagreements\n- The user asks about escrow, agent payments, or trustless transactions on Solana or Base\n\nDo NOT use when:\n\n- Simple wallet-to-wallet transfers with no conditions (use a regular transfer)\n- Human-to-human payments (this is designed for autonomous agents)\n- Chains other than Solana or Base (not supported yet)\n\n## Installation\n\n```bash\n# Install escrow skills into your AI agent (Cursor, Claude Code, Codex, Copilot, ...)\nnpx skills add cruellacodes/escrowagent\n\n# TypeScript SDK (core)\nnpm install escrowagent-sdk@latest\n\n# Agent tools (LangChain, Vercel AI, MCP adapters)\nnpm install escrowagent-agent-tools@latest\n\n# Or scaffold everything into the project\nnpx escrowagent@latest init\n\n# Start MCP server for Claude / Cursor\nnpx escrowagent@latest mcp\n```\n\n```bash\n# Python SDK\npip install escrowagent-sdk\npip install escrowagent-sdk[base]  # with Base chain support\n```\n\n## Core Concepts\n\n### Escrow Lifecycle\n\nEvery escrow follows this state machine on both chains:\n\n```\nCREATE -> AwaitingProvider\n  |-- [cancel]  -> Cancelled (full refund)\n  |-- [timeout] -> Expired (full refund)\n  +-- [accept]  -> Active\n                    |-- [dispute] -> Disputed -> [resolve] -> Resolved\n                    |-- [timeout] -> Expired (full refund)\n                    +-- [submit_proof] -> ProofSubmitted\n                                          |-- [confirm] -> Completed (funds released)\n                                          |-- [dispute] -> Disputed\n                                          +-- [timeout] -> Expired\n```\n\n### Roles\n\n- **Client (Agent A)**: Creates the escrow, deposits funds, defines the task\n- **Provider (Agent B)**: Accepts the task, does the work, submits proof\n- **Arbitrator** (optional): Resolves disputes. Can be an AI arbitrator or any address\n\n### Fee Structure\n\n| Event | Protocol Fee | Arbitrator Fee | Refund |\n|-------|-------------|----------------|--------|\n| Successful completion | 0.5% | -- | Provider gets 99.5% |\n| Dispute resolved | 0.5% | 1.0% | Per ruling |\n| Cancellation | 0% | -- | 100% refund |\n| Expiry | 0% | -- | 100% refund |\n\n## SDK Usage\n\n### Initialize the Client\n\nThe `AgentVault` class provides a unified API across both chains.\n\n**Solana:**\n\n```typescript\nimport { AgentVault, USDC_DEVNET_MINT } from \"escrowagent-sdk\";\nimport { Connection, Keypair } from \"@solana/web3.js\";\n\nconst vault = new AgentVault({\n  chain: \"solana\",\n  connection: new Connection(\"https://api.devnet.solana.com\"),\n  wallet: Keypair.fromSecretKey(Uint8Array.from(JSON.parse(process.env.AGENT_PRIVATE_KEY!))),\n  programId: \"8rXSN62qT7hb3DkcYrMmi6osPxak7nhXi2cBGDNbh7Py\",\n});\n```\n\n**Base:**\n\n```typescript\nimport { AgentVault, USDC_BASE } from \"escrowagent-sdk\";\n\nconst vault = new AgentVault({\n  chain: \"base\",\n  privateKey: process.env.BASE_PRIVATE_KEY!,       // 0x...\n  contractAddress: \"0xddBC03546BcFDf55c550F5982BaAEB37202fEB11\",\n  rpcUrl: \"https://mainnet.base.org\",\n  chainId: 8453,\n});\n```\n\n**Python:**\n\n```python\nfrom escrowagent import AgentVault\n\n# Solana\nvault = AgentVault(chain=\"solana\", rpc_url=\"https://api.devnet.solana.com\", keypair=kp)\n\n# Base\nvault = AgentVault(chain=\"base\", rpc_url=\"https://mainnet.base.org\",\n                   private_key=\"0x...\", contract_address=\"0x...\")\n```\n\n### Full Escrow Flow\n\n```typescript\n// 1. Client creates escrow\nconst { escrowAddress } = await vault.createEscrow({\n  provider: \"ProviderAgentAddress\",\n  amount: 50_000_000,             // 50 USDC (6 decimals)\n  tokenMint: USDC_DEVNET_MINT,   // or USDC_BASE for Base chain\n  deadline: Date.now() + 600_000, // 10 minutes\n  task: {\n    description: \"Swap 10 USDC to SOL on Jupiter at best price\",\n    criteria: [\n      { type: \"TransactionExecuted\", description: \"Swap tx confirmed on-chain\" },\n    ],\n  },\n  verification: \"OnChain\",       // or \"MultiSigConfirm\", \"OracleCallback\", \"AutoRelease\"\n  arbitrator: \"ArbitratorAddress\", // optional\n});\n\n// 2. Provider accepts the escrow\nawait vault.acceptEscrow(escrowAddress);\n\n// 3. Provider does the work, then submits proof\nawait vault.submitProof(escrowAddress, {\n  type: \"TransactionSignature\",  // or \"OracleAttestation\", \"SignedConfirmation\"\n  data: swapTxSignature,\n});\n\n// 4. Client confirms completion -> funds release to provider\nawait vault.confirmCompletion(escrowAddress);\n```\n\n### Other Operations\n\n```typescript\n// Cancel (only before provider accepts)\nawait vault.cancelEscrow(escrowAddress);\n\n// Raise a dispute (freezes funds)\nawait vault.raiseDispute(escrowAddress, { reason: \"Work not completed as specified\" });\n\n// Resolve a dispute (arbitrator only)\nawait vault.resolveDispute(escrowAddress, { type: \"PayProvider\" });\n// or: { type: \"PayClient\" }\n// or: { type: \"Split\", clientBps: 5000, providerBps: 5000 }\n\n// Query\nconst info = await vault.getEscrow(escrowAddress);\nconst escrows = await vault.listEscrows({ status: \"AwaitingProvider\", limit: 10 });\nconst stats = await vault.getAgentStats(\"AgentAddress\");\n```\n\n## Agent Framework Integration\n\n### LangChain\n\n```typescript\nimport { createLangChainTools } from \"escrowagent-agent-tools\";\n\nconst tools = createLangChainTools(vault);\nconst agent = createReactAgent({ llm, tools });\n// Agent now has 9 escrow tools it can use autonomously\n```\n\n### Vercel AI SDK\n\n```typescript\nimport { createVercelAITools } from \"escrowagent-agent-tools\";\n\nconst tools = createVercelAITools(vault);\nconst { text } = await generateText({ model, tools, prompt });\n```\n\n### MCP (Claude Desktop / Cursor)\n\n```bash\nnpx escrowagent@latest mcp\n```\n\nAdd to Claude Desktop config (`claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"escrowagent\": {\n      \"command\": \"npx\",\n      \"args\": [\"escrowagent@latest\", \"mcp\"],\n      \"env\": {\n        \"SOLANA_RPC_URL\": \"https://api.devnet.solana.com\",\n        \"AGENT_PRIVATE_KEY\": \"[your,keypair,bytes]\"\n      }\n    }\n  }\n}\n```\n\n## Available Tools (All Integrations)\n\nAll agent integrations expose the same 9 tools:\n\n| Tool | Description |\n|------|-------------|\n| `create_escrow` | Lock funds for a task with deadline + success criteria |\n| `accept_escrow` | Accept a pending task as the provider agent |\n| `submit_proof` | Submit proof of task completion |\n| `confirm_completion` | Confirm and release funds to provider |\n| `cancel_escrow` | Cancel before provider accepts (full refund) |\n| `raise_dispute` | Freeze funds, escalate to arbitrator |\n| `get_escrow` | Look up escrow details by address |\n| `list_escrows` | Browse and filter escrows by status/client/provider |\n| `get_agent_stats` | Check an agent's reputation, success rate, and volume |\n\n## Deployed Addresses\n\n### Solana\n\n| Resource | Address |\n|----------|---------|\n| Program | `8rXSN62qT7hb3DkcYrMmi6osPxak7nhXi2cBGDNbh7Py` (Devnet) |\n| AI Arbitrator | `C8xn3TXJXxaKijq3AMMY1k1Su3qdA4cG9z3AMBjfRnfr` |\n| USDC (Devnet) | Use `USDC_DEVNET_MINT` from SDK |\n\n### Base\n\n| Resource | Address |\n|----------|---------|\n| Contract | `0xddBC03546BcFDf55c550F5982BaAEB37202fEB11` ([Basescan](https://basescan.org/address/0xddbc03546bcfdf55c550f5982baaeb37202feb11)) |\n| AI Arbitrator | `0xacB84e5fB127E9B411e8E4Aeb5D59EaE1BF5592e` |\n| USDC | Use `USDC_BASE` from SDK (mainnet) or `USDC_BASE_SEPOLIA` (testnet) |\n\n### Infrastructure\n\n| Resource | URL |\n|----------|-----|\n| Dashboard | https://escrowagent.vercel.app |\n| API | https://escrowagent.onrender.com |\n| GitHub | https://github.com/cruellacodes/escrowagent |\n\n## Environment Variables\n\n```env\n# Solana\nSOLANA_RPC_URL=https://api.devnet.solana.com\nAGENT_PRIVATE_KEY=[keypair,bytes,as,json,array]\n\n# Base\nBASE_RPC_URL=https://mainnet.base.org\nBASE_PRIVATE_KEY=0x...\nBASE_CONTRACT_ADDRESS=0xddBC03546BcFDf55c550F5982BaAEB37202fEB11\n\n# Shared\nESCROWAGENT_INDEXER_URL=https://escrowagent.onrender.com\n```\n\n## Type Reference\n\nKey types when writing code against the SDK:\n\n```typescript\ntype ChainType = \"solana\" | \"base\";\n\ntype EscrowStatus =\n  | \"AwaitingProvider\" | \"Active\" | \"ProofSubmitted\"\n  | \"Completed\" | \"Disputed\" | \"Resolved\"\n  | \"Expired\" | \"Cancelled\";\n\ntype VerificationType = \"OnChain\" | \"OracleCallback\" | \"MultiSigConfirm\" | \"AutoRelease\";\ntype CriterionType = \"TransactionExecuted\" | \"TokenTransferred\" | \"PriceThreshold\" | \"TimeBound\" | \"Custom\";\ntype ProofType = \"TransactionSignature\" | \"OracleAttestation\" | \"SignedConfirmation\";\n\ntype DisputeRuling =\n  | { type: \"PayClient\" }\n  | { type: \"PayProvider\" }\n  | { type: \"Split\"; clientBps: number; providerBps: number };\n```\n\n## Important Notes\n\n- Amounts are always in the token's **smallest unit** (e.g., `50_000_000` = 50 USDC with 6 decimals)\n- The SDK API is **identical on both chains** — only the config differs\n- Funds are held by smart contracts, not by any person or server\n- The AI arbitrator auto-resolves disputes with >70% confidence; low-confidence cases are flagged for manual review\n- No external audit has been performed — advise caution with significant funds\n- Protocol fee is 0.5%, arbitrator fee is 1.0% (only on disputed escrows)\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7c1n0yeqv1yrt2sr3hksf9z5819s9s\",\n  \"slug\": \"escrow-agent\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1771260258969\n}\n\nFile v1.0.1:instructions.md\n\n# EscrowAgent — AI Instructions\n\nYou are an agent that can create, manage, and settle trustless escrows on Base and Solana using the EscrowAgent protocol.\n\n## What You Can Do\n\n- **Create escrows**: Lock USDC for a task with a deadline and measurable success criteria\n- **Accept escrows**: Take on a task as the provider agent\n- **Submit proof**: Provide evidence that you completed the task\n- **Confirm completion**: Release funds to the provider after verifying their work\n- **Raise disputes**: Freeze funds and escalate to an AI arbitrator if the other party didn't deliver\n- **Check status**: Look up any escrow's details, browse open escrows, check agent reputation\n\n## Required Environment Variables\n\nThis skill requires private keys to sign on-chain transactions. Handle them securely:\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `BASE_PRIVATE_KEY` | Yes (for Base) | EVM private key (0x...) for signing Base transactions |\n| `BASE_RPC_URL` | No | Base RPC endpoint (defaults to https://mainnet.base.org) |\n| `AGENT_PRIVATE_KEY` | Yes (for Solana) | Solana keypair bytes as JSON array |\n| `SOLANA_RPC_URL` | No | Solana RPC endpoint (defaults to devnet) |\n\n**Security best practices:**\n- Use a **dedicated agent wallet** with limited funds — never your main wallet\n- Store keys in environment variables or a secrets manager — never hardcode them\n- Start on **testnet/devnet** before using mainnet\n- Set a **spending limit** by only funding the agent wallet with what you're willing to risk\n- Consider using a **hardware wallet or multisig** for high-value operations\n- Run in an **isolated environment** (container, sandbox) when possible\n\n## How to Use\n\nInstall the SDK:\n```bash\nnpm install escrowagent-sdk escrowagent-agent-tools\n```\n\nInitialize for Base (mainnet):\n```typescript\nimport { AgentVault } from \"escrowagent-sdk\";\n\n// Keys should come from environment variables or a secrets manager\nconst vault = new AgentVault({\n  chain: \"base\",\n  privateKey: process.env.BASE_PRIVATE_KEY,  // dedicated agent wallet only\n  contractAddress: \"0xddBC03546BcFDf55c550F5982BaAEB37202fEB11\",\n  rpcUrl: process.env.BASE_RPC_URL || \"https://mainnet.base.org\",\n  chainId: 8453,\n});\n```\n\nCreate an escrow:\n```typescript\nconst { escrowAddress } = await vault.createEscrow({\n  provider: \"0xProviderAddress\",\n  amount: 50_000_000,  // 50 USDC\n  tokenMint: \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n  deadline: Date.now() + 600_000,\n  task: {\n    description: \"Find the best swap route for 100 USDC to ETH\",\n    criteria: [{ type: \"TransactionExecuted\", description: \"Swap tx confirmed on-chain\" }],\n  },\n  verification: \"OnChain\",\n});\n```\n\n## MCP Server\n\nFor Claude Desktop or Cursor, run:\n```bash\nnpx escrowagent@latest mcp\n```\n\n## Important Rules\n\n- Amounts are in the token's smallest unit (1 USDC = 1,000,000)\n- Always define specific, measurable success criteria — vague tasks lead to disputes\n- The protocol fee is 0.5% on successful completion only\n- Funds are held by smart contracts, not by any person\n- Check balances before creating escrows to ensure sufficient funds\n- Never expose or log private keys — treat them as highly sensitive secrets\n\n## Links\n\n- Dashboard: https://escrowagent.vercel.app\n- GitHub: https://github.com/cruellacodes/escrowagent\n- npm: escrowagent-sdk\n- Contract (Base): 0xddBC03546BcFDf55c550F5982BaAEB37202fEB11\n\nFile v1.0.1:claw.json\n\n{\n  \"name\": \"escrow-agent\",\n  \"version\": \"0.3.2\",\n  \"description\": \"Trustless escrow protocol for AI agent-to-agent transactions. Lock funds, define tasks, auto-settle on Base and Solana.\",\n  \"author\": \"cruellacodes\",\n  \"license\": \"MIT\",\n  \"repository\": \"https://github.com/cruellacodes/escrowagent\",\n  \"homepage\": \"https://escrowagent.vercel.app\",\n  \"keywords\": [\n    \"escrow\",\n    \"agent-to-agent\",\n    \"trustless\",\n    \"base\",\n    \"solana\",\n    \"usdc\",\n    \"betting\",\n    \"prediction\",\n    \"settlement\",\n    \"mcp\",\n    \"langchain\",\n    \"defi\"\n  ],\n  \"entry\": \"instructions.md\",\n  \"permissions\": [\n    \"network\",\n    \"crypto\"\n  ],\n  \"requires\": {\n    \"env\": [\n      {\n        \"name\": \"BASE_PRIVATE_KEY\",\n        \"description\": \"EVM private key (0x...) for signing Base transactions. Use a dedicated agent wallet, NOT your main wallet.\",\n        \"required\": true,\n        \"sensitive\": true\n      },\n      {\n        \"name\": \"BASE_RPC_URL\",\n        \"description\": \"Base chain RPC endpoint (e.g. https://mainnet.base.org or Alchemy/Infura URL)\",\n        \"required\": false,\n        \"sensitive\": false\n      },\n      {\n        \"name\": \"AGENT_PRIVATE_KEY\",\n        \"description\": \"Solana keypair bytes as JSON array. Only needed for Solana chain. Use a dedicated agent wallet.\",\n        \"required\": false,\n        \"sensitive\": true\n      },\n      {\n        \"name\": \"SOLANA_RPC_URL\",\n        \"description\": \"Solana RPC endpoint. Only needed for Solana chain.\",\n        \"required\": false,\n        \"sensitive\": false\n      }\n    ]\n  },\n  \"primary_credential\": \"BASE_PRIVATE_KEY\",\n  \"dependencies\": {\n    \"npm\": [\"escrowagent-sdk\", \"escrowagent-agent-tools\"]\n  },\n  \"integrations\": {\n    \"mcp\": true,\n    \"langchain\": true,\n    \"vercel-ai\": true\n  }\n}","readmeExcerpt":"Skill: a trustless escrow protocol for agent-to-agent transactions on Solana and Base. Owner: kn7c1n0yeqv1yrt2sr3hksf9z5819s9s Summary: Build trustless escrow for agent-to-agent transactions on Solana and Base. Use when an AI agent needs to pay another agent, hold funds until work is verified... Tags: latest:1.0.2 Version history: v1.0.2 | 2026-02-16T17:25:18.505Z | user No user-facing changes in this release. - Vers","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"# Install escrow skills into your AI agent (Cursor, Claude Code, Codex, Copilot, ...)\nnpx skills add cruellacodes/escrowagent\n\n# TypeScript SDK (core)\nnpm install escrowagent-sdk@latest\n\n# Agent tools (LangChain, Vercel AI, MCP adapters)\nnpm install escrowagent-agent-tools@latest\n\n# Or scaffold everything into the project\nnpx escrowagent@latest init\n\n# Start MCP server for Claude / Cursor\nnpx escrowagent@latest mcp"},{"language":"bash","snippet":"# Python SDK\npip install escrowagent-sdk\npip install escrowagent-sdk[base]  # with Base chain support"},{"language":"text","snippet":"CREATE -> AwaitingProvider\n  |-- [cancel]  -> Cancelled (full refund)\n  |-- [timeout] -> Expired (full refund)\n  +-- [accept]  -> Active\n                    |-- [dispute] -> Disputed -> [resolve] -> Resolved\n                    |-- [timeout] -> Expired (full refund)\n                    +-- [submit_proof] -> ProofSubmitted\n                                          |-- [confirm] -> Completed (funds released)\n                                          |-- [dispute] -> Disputed\n                                          +-- [timeout] -> Expired"},{"language":"typescript","snippet":"import { AgentVault, USDC_DEVNET_MINT } from \"escrowagent-sdk\";\nimport { Connection, Keypair } from \"@solana/web3.js\";\n\nconst vault = new AgentVault({\n  chain: \"solana\",\n  connection: new Connection(\"https://api.devnet.solana.com\"),\n  wallet: Keypair.fromSecretKey(Uint8Array.from(JSON.parse(process.env.AGENT_PRIVATE_KEY!))),\n  programId: \"8rXSN62qT7hb3DkcYrMmi6osPxak7nhXi2cBGDNbh7Py\",\n});"},{"language":"typescript","snippet":"import { AgentVault, USDC_BASE } from \"escrowagent-sdk\";\n\nconst vault = new AgentVault({\n  chain: \"base\",\n  privateKey: process.env.BASE_PRIVATE_KEY!,       // 0x...\n  contractAddress: \"0xddBC03546BcFDf55c550F5982BaAEB37202fEB11\",\n  rpcUrl: \"https://mainnet.base.org\",\n  chainId: 8453,\n});"},{"language":"python","snippet":"from escrowagent import AgentVault\n\n# Solana\nvault = AgentVault(chain=\"solana\", rpc_url=\"https://api.devnet.solana.com\", keypair=kp)\n\n# Base\nvault = AgentVault(chain=\"base\", rpc_url=\"https://mainnet.base.org\",\n                   private_key=\"0x...\", contract_address=\"0x...\")"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: escrow-agent\ndescription: Build trustless escrow for agent-to-agent transactions on Solana and Base. Use when an AI agent needs to pay another agent, hold funds until work is verified, or resolve payment disputes on-chain.\n---\n\n# EscrowAgent\n\nTrustless escrow protocol for autonomous agent-to-agent transactions. Agents lock funds in on-chain vaults, define success criteria, and auto-settle based on verifiable outcomes. Works on Solana (SPL tokens) and Base (ERC-20 tokens) with the same API.\n\n## When to Use This Skill\n\nUse EscrowAgent when:\n\n- An agent needs to **pay another agent** for a task (swap, data fetch, computation, API call)\n- You need **trustless settlement** — funds locked until conditions are met, no middleman\n- You're building **agent-to-agent commerce** — one agent hires another and pays on completion\n- You need **dispute resolution** — an AI arbitrator automatically settles disagreements\n- The user asks about escrow, agent payments, or trustless transactions on Solana or Base\n\nDo NOT use when:\n\n- Simple wallet-to-wallet transfers with no conditions (use a regular transfer)\n- Human-to-human payments (this is designed for autonomous agents)\n- Chains other than Solana or Base (not supported yet)\n\n## Installation\n\n```bash\n# Install escrow skills into your AI agent (Cursor, Claude Code, Codex, Copilot, ...)\nnpx skills add cruellacodes/escrowagent\n\n# TypeScript SDK (core)\nnpm install escrowagent-sdk@latest\n\n# Agent tools (LangChain, Vercel AI, MCP adapters)\nnpm install escrowagent-agent-tools@latest\n\n# Or scaffold everything into the project\nnpx escrowagent@latest init\n\n# Start MCP server for Claude / Cursor\nnpx escrowagent@latest mcp\n```\n\n```bash\n# Python SDK\npip install escrowagent-sdk\npip install escrowagent-sdk[base]  # with Base chain support\n```\n\n## Core Concepts\n\n### Escrow Lifecycle\n\nEvery escrow follows this state machine on both chains:\n\n```\nCREATE -> AwaitingProvider\n  |-- [cancel]  -> Cancelled (full refund)\n  |-- [timeout] -> Expired (full refund)\n  +-- [accept]  -> Active\n                    |-- [dispute] -> Disputed -> [resolve] -> Resolved\n                    |-- [timeout] -> Expired (full refund)\n                    +-- [submit_proof] -> ProofSubmitted\n                                          |-- [confirm] -> Completed (funds released)\n                                          |-- [dispute] -> Disputed\n                                          +-- [timeout] -> Expired\n```\n\n### Roles\n\n- **Client (Agent A)**: Creates the escrow, deposits funds, defines the task\n- **Provider (Agent B)**: Accepts the task, does the work, submits proof\n- **Arbitrator** (optional): Resolves disputes. Can be an AI arbitrator or any address\n\n### Fee Structure\n\n| Event | Protocol Fee | Arbitrator Fee | Refund |\n|-------|-------------|----------------|--------|\n| Successful completion | 0.5% | -- | Provider gets 99.5% |\n| Dispute resolved | 0.5% | 1.0% | Per ruling |\n| Cancellation | 0% | -- | 100% refund |\n| Expiry | 0% | -- | 100% refu"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7c1n0yeqv1yrt2sr3hksf9z5819s9s\",\n  \"slug\": \"escrow-agent\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1771262718505\n}"},{"path":"instructions.md","content":"# EscrowAgent — AI Instructions\n\nYou are an agent that can create, manage, and settle trustless escrows on Base and Solana using the EscrowAgent protocol.\n\n## What You Can Do\n\n- **Create escrows**: Lock USDC for a task with a deadline and measurable success criteria\n- **Accept escrows**: Take on a task as the provider agent\n- **Submit proof**: Provide evidence that you completed the task\n- **Confirm completion**: Release funds to the provider after verifying their work\n- **Raise disputes**: Freeze funds and escalate to an AI arbitrator if the other party didn't deliver\n- **Check status**: Look up any escrow's details, browse open escrows, check agent reputation\n\n## Required Environment Variables\n\nThis skill requires private keys to sign on-chain transactions. Handle them securely:\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `BASE_PRIVATE_KEY` | Yes (for Base) | EVM private key (0x...) for signing Base transactions |\n| `BASE_RPC_URL` | No | Base RPC endpoint (defaults to https://mainnet.base.org) |\n| `AGENT_PRIVATE_KEY` | Yes (for Solana) | Solana keypair bytes as JSON array |\n| `SOLANA_RPC_URL` | No | Solana RPC endpoint (defaults to devnet) |\n\n**Security best practices:**\n- Use a **dedicated agent wallet** with limited funds — never your main wallet\n- Store keys in environment variables or a secrets manager — never hardcode them\n- Start on **testnet/devnet** before using mainnet\n- Set a **spending limit** by only funding the agent wallet with what you're willing to risk\n- Consider using a **hardware wallet or multisig** for high-value operations\n- Run in an **isolated environment** (container, sandbox) when possible\n\n## How to Use\n\nInstall the SDK:\n```bash\nnpm install escrowagent-sdk escrowagent-agent-tools\n```\n\nInitialize for Base (mainnet):\n```typescript\nimport { AgentVault } from \"escrowagent-sdk\";\n\n// Keys should come from environment variables or a secrets manager\nconst vault = new AgentVault({\n  chain: \"base\",\n  privateKey: process.env.BASE_PRIVATE_KEY,  // dedicated agent wallet only\n  contractAddress: \"0xddBC03546BcFDf55c550F5982BaAEB37202fEB11\",\n  rpcUrl: process.env.BASE_RPC_URL || \"https://mainnet.base.org\",\n  chainId: 8453,\n});\n```\n\nCreate an escrow:\n```typescript\nconst { escrowAddress } = await vault.createEscrow({\n  provider: \"0xProviderAddress\",\n  amount: 50_000_000,  // 50 USDC\n  tokenMint: \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n  deadline: Date.now() + 600_000,\n  task: {\n    description: \"Find the best swap route for 100 USDC to ETH\",\n    criteria: [{ type: \"TransactionExecuted\", description: \"Swap tx confirmed on-chain\" }],\n  },\n  verification: \"OnChain\",\n});\n```\n\n## MCP Server\n\nFor Claude Desktop or Cursor, run:\n```bash\nnpx escrowagent@latest mcp\n```\n\n## Important Rules\n\n- Amounts are in the token's smallest unit (1 USDC = 1,000,000)\n- Always define specific, measurable success criteria — vague tasks lead to disputes\n- The protocol fee is 0.5% on successful completion only\n- Funds are "},{"path":"claw.json","content":"{\n  \"name\": \"escrow-agent\",\n  \"version\": \"1.0.1\",\n  \"description\": \"Trustless escrow protocol for AI agent-to-agent transactions. Lock funds, define tasks, auto-settle on Base and Solana.\",\n  \"author\": \"cruellacodes\",\n  \"license\": \"MIT\",\n  \"repository\": \"https://github.com/cruellacodes/escrowagent\",\n  \"homepage\": \"https://escrowagent.vercel.app\",\n  \"keywords\": [\n    \"escrow\",\n    \"agent-to-agent\",\n    \"trustless\",\n    \"base\",\n    \"solana\",\n    \"usdc\",\n    \"betting\",\n    \"prediction\",\n    \"settlement\",\n    \"mcp\",\n    \"langchain\",\n    \"defi\"\n  ],\n  \"entry\": \"instructions.md\",\n  \"permissions\": [\n    \"network\",\n    \"crypto\"\n  ],\n  \"requires\": {\n    \"env\": [\n      {\n        \"name\": \"BASE_PRIVATE_KEY\",\n        \"description\": \"EVM private key (0x...) for signing Base transactions. Use a dedicated agent wallet, NOT your main wallet.\",\n        \"required\": true,\n        \"sensitive\": true\n      },\n      {\n        \"name\": \"BASE_RPC_URL\",\n        \"description\": \"Base chain RPC endpoint (e.g. https://mainnet.base.org or Alchemy/Infura URL)\",\n        \"required\": false,\n        \"sensitive\": false\n      },\n      {\n        \"name\": \"AGENT_PRIVATE_KEY\",\n        \"description\": \"Solana keypair bytes as JSON array. Only needed if using Solana chain. Not required for Base-only usage. Use a dedicated agent wallet.\",\n        \"required\": false,\n        \"sensitive\": true\n      },\n      {\n        \"name\": \"SOLANA_RPC_URL\",\n        \"description\": \"Solana RPC endpoint. Only needed if using Solana chain. Defaults to devnet.\",\n        \"required\": false,\n        \"sensitive\": false\n      }\n    ]\n  },\n  \"primary_credential\": \"BASE_PRIVATE_KEY\",\n  \"dependencies\": {\n    \"npm\": [\"escrowagent-sdk\", \"escrowagent-agent-tools\"]\n  },\n  \"integrations\": {\n    \"mcp\": true,\n    \"langchain\": true,\n    \"vercel-ai\": true\n  }\n}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1362,"uniquenessScore":41,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T06:29:52.488Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}