{"slug": "open-source-wallet-sdk-for-ai-agents", "title": "Open-source wallet SDK for AI agents", "summary": "Squid Pay released an open-source TypeScript SDK, @squid/agent-wallet-sdk, that lets AI agents and backends read account context and propose payments or trades but cannot approve holds, sign transactions, or move money, with the owner's wallet remaining the final signer. The SDK supports Platform API keys (sq_master_…) via CLI HTTP and agent keys (sq_live_…) via MCP, and exposes tools such as get_account_summary, propose_action, and list_holds, while deliberately omitting approveHold, signTransaction, and exportPrivateKey to enforce human oversight.", "body_md": "TypeScript SDK for AI agents and backends that connect to **Squid Pay**.\n\nAgents can **read** permitted account context and **propose** payments or trades.\n\nThey **cannot** approve holds, sign transactions, broadcast, or move money. The owner’s connected wallet remains the final signer.\n\n```\nAgent (this SDK) → Squid validates / HOLDs → Human reviews → Owner wallet signs → Squid verifies\ncd /Users/horatiubudai/ceo/Squid/sdk_developer\nnpm install\nnpm run build\n```\n\nFrom another project (local path):\n\n```\nnpm install /Users/horatiubudai/ceo/Squid/sdk_developer\n```\n\nCreate a **Platform API key** in Squid → **Settings → CLI** (`sq_master_…`\n\n),\n\nor use an **agent key** from **Agents** (`sq_live_…`\n\n).\n\n``` js\nimport { SquidAgentWallet } from \"@squid/agent-wallet-sdk\";\n\nconst squid = new SquidAgentWallet({\n  endpoint: process.env.SQUID_ENDPOINT || \"http://localhost:4173\",\n  apiKey: process.env.SQUID_API_KEY\n});\n\nconst status = await squid.getStatus();\nconst wallets = await squid.listWallets();\n\nconst proposal = await squid.proposePayment({\n  asset: \"USDC\",\n  amount: 25,\n  recipient: \"0xRecipient...\",\n  chain: \"Base\",\n  note: \"Vendor invoice #1042\",\n  idempotencyKey: \"invoice-1042\"\n});\n\nconsole.log(proposal.status);     // \"held\" | \"ready_for_wallet\"\nconsole.log(proposal.proposalId); // Needs Review hold id\nconsole.log(proposal.message);    // Human-readable next step\n```\n\n| Key | Default transport | Endpoint |\n|---|---|---|\n`sq_master_…` (Platform API key) |\nCLI HTTP | `POST /api/cli/execute` |\n`sq_live_…` (agent key) |\nMCP | `POST /mcp` |\n\nForce a transport:\n\n```\nnew SquidAgentWallet({ apiKey, transport: \"mcp\" });\nnew SquidAgentWallet({ apiKey, transport: \"cli\" });\nconsole.log(JSON.stringify(squid.toMcpServerConfig(), null, 2));\n{\n  \"mcpServers\": {\n    \"squid\": {\n      \"url\": \"http://localhost:4173/mcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer sq_live_…\"\n      }\n    }\n  }\n}\n```\n\nSquid MCP tools exposed by this SDK:\n\n| Tool | Purpose |\n|---|---|\n`get_account_summary` |\nProfile, wallets, open reviews |\n`get_wallet_balances` |\nBalances / sync status |\n`get_financial_harness` |\nAgent budget + limits |\n`list_holds` |\nPending human reviews |\n`get_agent_rules` |\nPolicies, files, vendors |\n`get_platform_state` |\nFull read-only platform snapshot |\n`propose_action` |\nCreate a review proposal (never signs) |\n\n```\nsquid.getStatus()\nsquid.listWallets() / getBalances()\nsquid.listHolds() / getHold(id)\nsquid.listAgents()\nsquid.listRules()\nsquid.listPaymentLinks() / getPaymentLink(id)\nsquid.getPlatformState()\nsquid.getFinancialHarness()\nsquid.doctor()\n\nsquid.proposeAction({ type, domain?, asset?, amount?, recipient?, chain?, note?, idempotencyKey? })\nsquid.proposePayment({ asset, amount, recipient, chain?, note?, idempotencyKey? })\nsquid.proposeTrade({ asset, amount, … })\n\nsquid.executeCli([\"status\"])\nsquid.callMcpTool(\"list_holds\")\nsquid.listMcpTools()\nsquid.toMcpServerConfig()\n```\n\nDeliberately **not** available (throws `SquidForbiddenError`\n\n):\n\n`approveHold`\n\n`signTransaction`\n\n`exportPrivateKey`\n\nMatches Squid Pay:\n\n- No private keys / seed phrases in Squid or this SDK.\n- Proposals go through Squid Brain / policy; risky ones become\n**Needs Review** holds. - Money moves only after the owner wallet signs and Squid verifies the chain receipt.\n- Structured errors from Squid (\n`code`\n\n,`type`\n\n,`message`\n\n) are preserved as`SquidSdkError`\n\n.\n\n```\nexport SQUID_ENDPOINT=http://localhost:4173\nexport SQUID_API_KEY=sq_master_…\nnode examples/quickstart.mjs\nnode examples/propose-payment.mjs\nnode examples/mcp-config.mjs\n```\n\nThis package lives next to the console at `bank_squid/Squid Pay /`\n\n.\n\nRun Squid with `npm run dev`\n\nthere (default [http://localhost:4173](http://localhost:4173)), then point the SDK at that origin.\n\n| Package | Role |\n|---|---|\nSquid Pay (`server.js` + `public/` ) |\nSource of truth, wallet signing, verification |\n`@squid/pay-cli` |\nTerminal client for Platform API key |\n`@squid/agent-wallet-sdk` |\nProgrammatic agent / backend client |\n\n```\nnpm install\nnpm run build\nnpm test\n```\n\nRequires **Node.js ≥ 18** (native `fetch`\n\n).", "url": "https://wpnews.pro/news/open-source-wallet-sdk-for-ai-agents", "canonical_source": "https://github.com/Squid-Pay/Squid-Agent-Wallet-SDK", "published_at": "2026-08-15 14:19:20+00:00", "updated_at": "2026-08-15 14:41:09.506650+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-products"], "entities": ["Squid Pay", "@squid/agent-wallet-sdk", "SquidAgentWallet", "MCP", "Platform API key", "agent key"], "alternates": {"html": "https://wpnews.pro/news/open-source-wallet-sdk-for-ai-agents", "markdown": "https://wpnews.pro/news/open-source-wallet-sdk-for-ai-agents.md", "text": "https://wpnews.pro/news/open-source-wallet-sdk-for-ai-agents.txt", "jsonld": "https://wpnews.pro/news/open-source-wallet-sdk-for-ai-agents.jsonld"}}