{
  "schemaVersion": "1.0",
  "item": {
    "slug": "polygon-agents-sdk",
    "name": "Polygon Agents SDK",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/JamesLawton/polygon-agents-sdk",
    "canonicalUrl": "https://clawhub.ai/JamesLawton/polygon-agents-sdk",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/polygon-agents-sdk",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=polygon-agents-sdk",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "QUICKSTART.md",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/polygon-agents-sdk"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/polygon-agents-sdk",
    "agentPageUrl": "https://openagent3.xyz/skills/polygon-agents-sdk/agent",
    "manifestUrl": "https://openagent3.xyz/skills/polygon-agents-sdk/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/polygon-agents-sdk/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Prerequisites",
        "body": "Node.js 20+\nInstall globally: npm install -g github:0xPolygon/polygon-agent-kit\nEntry point: polygon-agent <command>\nStorage: ~/.polygon-agent/ (AES-256-GCM encrypted)"
      },
      {
        "title": "Architecture",
        "body": "WalletCreated byPurposeFund?EOAsetupAuth with Sequence BuilderNOEcosystem Walletwallet createPrimary spending walletYES"
      },
      {
        "title": "Required",
        "body": "VariableWhenSEQUENCE_PROJECT_ACCESS_KEYWallet creation, swapsSEQUENCE_INDEXER_ACCESS_KEYBalance checks"
      },
      {
        "title": "Optional",
        "body": "VariableDefaultSEQUENCE_ECOSYSTEM_CONNECTOR_URLhttps://agentconnect.polygon.technology/SEQUENCE_DAPP_ORIGINSame as connector URL originTRAILS_API_KEYFalls back to SEQUENCE_PROJECT_ACCESS_KEYTRAILS_TOKEN_MAP_JSONToken-directory lookupPOLYGON_AGENT_DEBUG_FETCHOff — logs HTTP to ~/.polygon-agent/fetch-debug.logPOLYGON_AGENT_DEBUG_FEEOff — dumps fee options to stderr"
      },
      {
        "title": "Complete Setup Flow",
        "body": "# Phase 1: Setup (creates EOA + Sequence project, returns access key)\nnode cli/polygon-agent.mjs setup --name \"MyAgent\"\n# → save privateKey (not shown again), eoaAddress, accessKey\n\n# Phase 2: Create ecosystem wallet (auto-waits for browser approval)\nexport SEQUENCE_PROJECT_ACCESS_KEY=<accessKey>\nnode cli/polygon-agent.mjs wallet create --usdc-limit 100 --native-limit 5\n\n# Phase 3: Fund wallet\nnode cli/polygon-agent.mjs fund\n# → reads walletAddress from session, builds Trails widget URL with toAddress=<walletAddress>\n# → ALWAYS run this command to get the URL — never construct it manually or hardcode any address\n# → send the returned `fundingUrl` to the user; `walletAddress` in the output confirms the recipient\n\n# Phase 4: Verify\nexport SEQUENCE_INDEXER_ACCESS_KEY=<indexerKey>\nnode cli/polygon-agent.mjs balances\n\n# Phase 5: Register agent on-chain (ERC-8004, Polygon mainnet)\nnode cli/polygon-agent.mjs agent register --name \"MyAgent\" --broadcast\n# → mints ERC-721 NFT, emits agentId in Registered event\n# → use agentId for reputation queries and feedback"
      },
      {
        "title": "Setup",
        "body": "polygon-agent setup --name <name> [--force]"
      },
      {
        "title": "Wallet",
        "body": "polygon-agent wallet create [--name <n>] [--chain polygon] [--timeout <sec>] [--no-wait]\n  [--native-limit <amt>] [--usdc-limit <amt>] [--usdt-limit <amt>]\n  [--token-limit <SYM:amt>]  # repeatable\n  [--usdc-to <addr> --usdc-amount <amt>]  # one-off scoped transfer\n  [--contract <addr>]  # whitelist contract (repeatable)\npolygon-agent wallet import --ciphertext '<blob>|@<file>' [--name <n>] [--rid <rid>]\npolygon-agent wallet list\npolygon-agent wallet address [--name <n>]\npolygon-agent wallet remove [--name <n>]"
      },
      {
        "title": "Operations",
        "body": "polygon-agent balances [--wallet <n>] [--chain <chain>]\npolygon-agent send --to <addr> --amount <num> [--symbol <SYM>] [--broadcast]\npolygon-agent send-native --to <addr> --amount <num> [--broadcast] [--direct]\npolygon-agent send-token --symbol <SYM> --to <addr> --amount <num> [--broadcast]\npolygon-agent swap --from <SYM> --to <SYM> --amount <num> [--to-chain <chain>] [--slippage <num>] [--broadcast]\npolygon-agent deposit --asset <SYM> --amount <num> [--protocol aave|morpho] [--broadcast]\npolygon-agent fund [--wallet <n>] [--token <addr>]\npolygon-agent x402-pay --url <url> --wallet <n> [--method GET] [--body <str>] [--header Key:Value]"
      },
      {
        "title": "Agent (ERC-8004)",
        "body": "polygon-agent agent register --name <n> [--agent-uri <uri>] [--metadata <k=v,k=v>] [--broadcast]\npolygon-agent agent wallet --agent-id <id>\npolygon-agent agent metadata --agent-id <id> --key <key>\npolygon-agent agent reputation --agent-id <id> [--tag1 <tag>]\npolygon-agent agent reviews --agent-id <id>\npolygon-agent agent feedback --agent-id <id> --value <score> [--tag1 <t>] [--tag2 <t>] [--endpoint <e>] [--broadcast]\n\nERC-8004 contracts (Polygon mainnet):\n\nIdentityRegistry: 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432\nReputationRegistry: 0x8004BAa17C55a88189AE136b182e5fdA19dE9b63"
      },
      {
        "title": "Key Behaviors",
        "body": "Dry-run by default — all write commands require --broadcast to execute\nSmart defaults — --wallet main, --chain polygon, auto-wait on wallet create\nFee preference — auto-selects USDC over native POL when both available\nfund — reads walletAddress from the wallet session and sets it as toAddress in the Trails widget URL. Always run polygon-agent fund to get the correct URL — never construct it manually or hardcode any address. The returned JSON contains fundingUrl and walletAddress so you can confirm the pre-filled recipient before sharing.\ndeposit — picks highest-TVL pool via Trails getEarnPools. If session rejects, re-create wallet with --contract <depositAddress>\nx402-pay — probes endpoint for 402, smart wallet funds builder EOA with exact token amount, EOA signs EIP-3009 payment. Chain auto-detected from 402 response\nsend-native --direct — bypasses ValueForwarder contract for direct EOA transfer\nSession permissions — without --usdc-limit etc., session gets bare-bones defaults and may not transact"
      },
      {
        "title": "CRITICAL: Wallet Approval URL",
        "body": "When wallet create outputs a URL in the url or approvalUrl field, you MUST send the COMPLETE, UNTRUNCATED URL to the user. The URL contains cryptographic parameters (public key, callback token) that are required for session approval. If any part is cut off, the approval will fail.\n\nDo NOT shorten, summarize, or add ... to the URL\nDo NOT split the URL across multiple messages\nOutput the raw URL exactly as returned by the CLI"
      },
      {
        "title": "Callback Modes",
        "body": "The wallet create command automatically starts a local HTTP server and opens a Cloudflare Quick Tunnel (*.trycloudflare.com) — no account or token required. The cloudflared binary is auto-downloaded to ~/.polygon-agent/bin/cloudflared on first use if not already installed. The connector UI POSTs the encrypted session back through the tunnel regardless of where the agent is running. The tunnel and server are torn down automatically once the session is received.\n\nTiming: The approvalUrl is only valid while the CLI process is running. Open it immediately and complete wallet approval within the timeout window (default 300s). Never reuse a URL from a previous run — the tunnel is torn down when the CLI exits.\n\nManual fallback (if cloudflared is unavailable): The CLI omits callbackUrl so the connector UI displays the encrypted blob in the browser. The CLI then prompts:\n\nAfter approving in the browser, the encrypted blob will be shown.\nPaste it below and press Enter:\n> <paste blob here>\n\nThe blob is also saved to /tmp/polygon-session-<rid>.txt for reference. To import later:\n\npolygon-agent wallet import --ciphertext @/tmp/polygon-session-<rid>.txt"
      },
      {
        "title": "Troubleshooting",
        "body": "IssueFixBuilder configured alreadyAdd --forceMissing SEQUENCE_PROJECT_ACCESS_KEYRun setup firstMissing walletwallet list, re-run wallet createSession expiredRe-run wallet create (24h expiry)Fee option errorsSet POLYGON_AGENT_DEBUG_FEE=1, ensure wallet has fundsTimed out waiting for callbackAdd --timeout 600callbackMode: manual (no tunnel)cloudflared unavailable — paste blob from browser when prompted; blob saved to /tmp/polygon-session-<rid>.txt404 on *.trycloudflare.comCLI timed out and tunnel is gone — re-run wallet create, open the new approvalUrl immediately\"Auto-send failed\" in browserCopy the ciphertext shown below that message; run wallet import --ciphertext '<blob>'Deposit session rejectedRe-create wallet with --contract <depositAddress>Wrong recipient in Trails widgetRun polygon-agent fund (do not construct the URL manually); walletAddress in the output confirms the pre-filled toAddress"
      },
      {
        "title": "File Structure",
        "body": "~/.polygon-agent/\n├── .encryption-key       # AES-256-GCM key (auto-generated, 0600)\n├── builder.json          # EOA privateKey (encrypted), eoaAddress, accessKey, projectId\n├── wallets/<name>.json   # walletAddress, session, chainId, chain\n└── requests/<rid>.json   # Pending wallet creation requests"
      }
    ],
    "body": "Polygon Agent Kit\nPrerequisites\nNode.js 20+\nInstall globally: npm install -g github:0xPolygon/polygon-agent-kit\nEntry point: polygon-agent <command>\nStorage: ~/.polygon-agent/ (AES-256-GCM encrypted)\nArchitecture\nWallet\tCreated by\tPurpose\tFund?\nEOA\tsetup\tAuth with Sequence Builder\tNO\nEcosystem Wallet\twallet create\tPrimary spending wallet\tYES\nEnvironment Variables\nRequired\nVariable\tWhen\nSEQUENCE_PROJECT_ACCESS_KEY\tWallet creation, swaps\nSEQUENCE_INDEXER_ACCESS_KEY\tBalance checks\nOptional\nVariable\tDefault\nSEQUENCE_ECOSYSTEM_CONNECTOR_URL\thttps://agentconnect.polygon.technology/\nSEQUENCE_DAPP_ORIGIN\tSame as connector URL origin\nTRAILS_API_KEY\tFalls back to SEQUENCE_PROJECT_ACCESS_KEY\nTRAILS_TOKEN_MAP_JSON\tToken-directory lookup\nPOLYGON_AGENT_DEBUG_FETCH\tOff — logs HTTP to ~/.polygon-agent/fetch-debug.log\nPOLYGON_AGENT_DEBUG_FEE\tOff — dumps fee options to stderr\nComplete Setup Flow\n# Phase 1: Setup (creates EOA + Sequence project, returns access key)\nnode cli/polygon-agent.mjs setup --name \"MyAgent\"\n# → save privateKey (not shown again), eoaAddress, accessKey\n\n# Phase 2: Create ecosystem wallet (auto-waits for browser approval)\nexport SEQUENCE_PROJECT_ACCESS_KEY=<accessKey>\nnode cli/polygon-agent.mjs wallet create --usdc-limit 100 --native-limit 5\n\n# Phase 3: Fund wallet\nnode cli/polygon-agent.mjs fund\n# → reads walletAddress from session, builds Trails widget URL with toAddress=<walletAddress>\n# → ALWAYS run this command to get the URL — never construct it manually or hardcode any address\n# → send the returned `fundingUrl` to the user; `walletAddress` in the output confirms the recipient\n\n# Phase 4: Verify\nexport SEQUENCE_INDEXER_ACCESS_KEY=<indexerKey>\nnode cli/polygon-agent.mjs balances\n\n# Phase 5: Register agent on-chain (ERC-8004, Polygon mainnet)\nnode cli/polygon-agent.mjs agent register --name \"MyAgent\" --broadcast\n# → mints ERC-721 NFT, emits agentId in Registered event\n# → use agentId for reputation queries and feedback\n\nCommands Reference\nSetup\npolygon-agent setup --name <name> [--force]\n\nWallet\npolygon-agent wallet create [--name <n>] [--chain polygon] [--timeout <sec>] [--no-wait]\n  [--native-limit <amt>] [--usdc-limit <amt>] [--usdt-limit <amt>]\n  [--token-limit <SYM:amt>]  # repeatable\n  [--usdc-to <addr> --usdc-amount <amt>]  # one-off scoped transfer\n  [--contract <addr>]  # whitelist contract (repeatable)\npolygon-agent wallet import --ciphertext '<blob>|@<file>' [--name <n>] [--rid <rid>]\npolygon-agent wallet list\npolygon-agent wallet address [--name <n>]\npolygon-agent wallet remove [--name <n>]\n\nOperations\npolygon-agent balances [--wallet <n>] [--chain <chain>]\npolygon-agent send --to <addr> --amount <num> [--symbol <SYM>] [--broadcast]\npolygon-agent send-native --to <addr> --amount <num> [--broadcast] [--direct]\npolygon-agent send-token --symbol <SYM> --to <addr> --amount <num> [--broadcast]\npolygon-agent swap --from <SYM> --to <SYM> --amount <num> [--to-chain <chain>] [--slippage <num>] [--broadcast]\npolygon-agent deposit --asset <SYM> --amount <num> [--protocol aave|morpho] [--broadcast]\npolygon-agent fund [--wallet <n>] [--token <addr>]\npolygon-agent x402-pay --url <url> --wallet <n> [--method GET] [--body <str>] [--header Key:Value]\n\nAgent (ERC-8004)\npolygon-agent agent register --name <n> [--agent-uri <uri>] [--metadata <k=v,k=v>] [--broadcast]\npolygon-agent agent wallet --agent-id <id>\npolygon-agent agent metadata --agent-id <id> --key <key>\npolygon-agent agent reputation --agent-id <id> [--tag1 <tag>]\npolygon-agent agent reviews --agent-id <id>\npolygon-agent agent feedback --agent-id <id> --value <score> [--tag1 <t>] [--tag2 <t>] [--endpoint <e>] [--broadcast]\n\n\nERC-8004 contracts (Polygon mainnet):\n\nIdentityRegistry: 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432\nReputationRegistry: 0x8004BAa17C55a88189AE136b182e5fdA19dE9b63\nKey Behaviors\nDry-run by default — all write commands require --broadcast to execute\nSmart defaults — --wallet main, --chain polygon, auto-wait on wallet create\nFee preference — auto-selects USDC over native POL when both available\nfund — reads walletAddress from the wallet session and sets it as toAddress in the Trails widget URL. Always run polygon-agent fund to get the correct URL — never construct it manually or hardcode any address. The returned JSON contains fundingUrl and walletAddress so you can confirm the pre-filled recipient before sharing.\ndeposit — picks highest-TVL pool via Trails getEarnPools. If session rejects, re-create wallet with --contract <depositAddress>\nx402-pay — probes endpoint for 402, smart wallet funds builder EOA with exact token amount, EOA signs EIP-3009 payment. Chain auto-detected from 402 response\nsend-native --direct — bypasses ValueForwarder contract for direct EOA transfer\nSession permissions — without --usdc-limit etc., session gets bare-bones defaults and may not transact\nCRITICAL: Wallet Approval URL\n\nWhen wallet create outputs a URL in the url or approvalUrl field, you MUST send the COMPLETE, UNTRUNCATED URL to the user. The URL contains cryptographic parameters (public key, callback token) that are required for session approval. If any part is cut off, the approval will fail.\n\nDo NOT shorten, summarize, or add ... to the URL\nDo NOT split the URL across multiple messages\nOutput the raw URL exactly as returned by the CLI\nCallback Modes\n\nThe wallet create command automatically starts a local HTTP server and opens a Cloudflare Quick Tunnel (*.trycloudflare.com) — no account or token required. The cloudflared binary is auto-downloaded to ~/.polygon-agent/bin/cloudflared on first use if not already installed. The connector UI POSTs the encrypted session back through the tunnel regardless of where the agent is running. The tunnel and server are torn down automatically once the session is received.\n\nTiming: The approvalUrl is only valid while the CLI process is running. Open it immediately and complete wallet approval within the timeout window (default 300s). Never reuse a URL from a previous run — the tunnel is torn down when the CLI exits.\n\nManual fallback (if cloudflared is unavailable): The CLI omits callbackUrl so the connector UI displays the encrypted blob in the browser. The CLI then prompts:\n\nAfter approving in the browser, the encrypted blob will be shown.\nPaste it below and press Enter:\n> <paste blob here>\n\n\nThe blob is also saved to /tmp/polygon-session-<rid>.txt for reference. To import later:\n\npolygon-agent wallet import --ciphertext @/tmp/polygon-session-<rid>.txt\n\nTroubleshooting\nIssue\tFix\nBuilder configured already\tAdd --force\nMissing SEQUENCE_PROJECT_ACCESS_KEY\tRun setup first\nMissing wallet\twallet list, re-run wallet create\nSession expired\tRe-run wallet create (24h expiry)\nFee option errors\tSet POLYGON_AGENT_DEBUG_FEE=1, ensure wallet has funds\nTimed out waiting for callback\tAdd --timeout 600\ncallbackMode: manual (no tunnel)\tcloudflared unavailable — paste blob from browser when prompted; blob saved to /tmp/polygon-session-<rid>.txt\n404 on *.trycloudflare.com\tCLI timed out and tunnel is gone — re-run wallet create, open the new approvalUrl immediately\n\"Auto-send failed\" in browser\tCopy the ciphertext shown below that message; run wallet import --ciphertext '<blob>'\nDeposit session rejected\tRe-create wallet with --contract <depositAddress>\nWrong recipient in Trails widget\tRun polygon-agent fund (do not construct the URL manually); walletAddress in the output confirms the pre-filled toAddress\nFile Structure\n~/.polygon-agent/\n├── .encryption-key       # AES-256-GCM key (auto-generated, 0600)\n├── builder.json          # EOA privateKey (encrypted), eoaAddress, accessKey, projectId\n├── wallets/<name>.json   # walletAddress, session, chainId, chain\n└── requests/<rid>.json   # Pending wallet creation requests"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/JamesLawton/polygon-agents-sdk",
    "publisherUrl": "https://clawhub.ai/JamesLawton/polygon-agents-sdk",
    "owner": "JamesLawton",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/polygon-agents-sdk",
    "downloadUrl": "https://openagent3.xyz/downloads/polygon-agents-sdk",
    "agentUrl": "https://openagent3.xyz/skills/polygon-agents-sdk/agent",
    "manifestUrl": "https://openagent3.xyz/skills/polygon-agents-sdk/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/polygon-agents-sdk/agent.md"
  }
}