{
  "markdown": "# AESP - Agent Economic Sovereignty Protocol\n\n**Defining how AI agents operate economically under human sovereignty.**\n\n[Website](https://yault.xyz) | [npm](https://www.npmjs.com/package/@yault/aesp)\n\n## What Is AESP\n\nAESP is a TypeScript SDK and MCP integration layer for agent payments under explicit human control. It is designed so that agents can execute economic actions while humans retain full economic sovereignty.\n\nCore principles:\n\n- **Policy-gated execution** -- every spend action is bounded by configurable policy rules (per-tx limits, daily/weekly/monthly budgets, address allowlists, time windows).\n- **Human override path** -- risky actions are escalated to a review queue instead of being auto-approved.\n- **Verifiable commitments** -- execution context can be tied to EIP-712 signed intent, enabling on-chain settlement guarantees.\n- **Practical integration** -- MCP tools expose vault operations to AI agent frameworks; subpath exports let you import only what you need.\n\n## Install\n\n```bash\nnpm install @yault/aesp\n```\n\nRequires Node.js >= 18.\n\n## Quick Start\n\n### Add to Claude Desktop\n\nAdd the following to your Claude Desktop config (`claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"yault\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@yault/aesp\"],\n      \"env\": {\n        \"YAULT_API_KEY\": \"sk-yault-...\"\n      }\n    }\n  }\n}\n```\n\n### Add to Claude Code\n\n```bash\nclaude mcp add yault -- npx -y @yault/aesp\n```\n\nThen set the environment variable `YAULT_API_KEY` in your shell or `.claude/settings.json`.\n\n### Run standalone\n\n```bash\nexport YAULT_API_KEY=\"sk-yault-...\"\nyault-mcp                  # if installed globally\nnpx @yault/aesp            # via npx\n```\n\n### Get your API key\n\nGo to [yault.xyz](https://yault.xyz) to create an account and obtain your API key (`sk-yault-*`). The key is tied to your vault — each user manages their own key. Agent developers do not need a key unless they are also vault users; it is the end-user who configures their own key in the MCP client.\n\n### Use SDK modules\n\n```typescript\nimport { PolicyEngine } from '@yault/aesp/policy';\nimport { getAllMCPTools } from '@yault/aesp/mcp';\nimport { NegotiationStateMachine } from '@yault/aesp/negotiation';\n\nconst engine = new PolicyEngine(storageAdapter);\nawait engine.load();\n\nconst tools = getAllMCPTools(); // 6 MCP tool definitions\n```\n\n## Modules\n\nAESP is organized into subpath exports so you can import only what you need:\n\n| Subpath | Description |\n|---------|-------------|\n| `@yault/aesp` | Unified re-export of all modules |\n| `@yault/aesp/types` | Shared type definitions (`AgentExecutionRequest`, `TransferPayload`, `ChainId`, etc.) |\n| `@yault/aesp/policy` | Policy engine with 8-check evaluation, budget tracking, and policy change classification |\n| `@yault/aesp/identity` | Agent identity derivation, certificate creation, and hierarchy management |\n| `@yault/aesp/negotiation` | Offer/counter-offer state machine with session management |\n| `@yault/aesp/commitment` | EIP-712 structured commitment builder for dual-signed agreements |\n| `@yault/aesp/review` | Human-in-the-loop review queue with freeze/unfreeze controls |\n| `@yault/aesp/mcp` | MCP tool definitions, argument validation, and server router |\n| `@yault/aesp/a2a` | Agent-card builder for cross-agent discovery (A2A protocol) |\n| `@yault/aesp/crypto` | Cryptographic helpers: signing, encryption, hashing, ZK proof bridge |\n| `@yault/aesp/privacy` | Context tagging, ephemeral address pools, and consolidation scheduling |\n\n## MCP Tools\n\nThe stdio server exposes 6 backend-connected tools:\n\n| Tool | Method + Endpoint | Purpose |\n|------|-------------------|---------|\n| `yault_check_balance` | `GET /api/vault/balance/:address` | Read a wallet vault balance |\n| `yault_deposit` | `POST /api/vault/deposit` | Deposit underlying into vault |\n| `yault_redeem` | `POST /api/vault/redeem` | Redeem vault shares |\n| `yault_transfer` | `POST /api/vault/transfer` | Transfer vault allocation (parent to sub-account) |\n| `yault_check_authorization` | `GET /api/vault/agent-authorization` | Read operator/allowance status |\n| `yault_get_balances` | `GET /api/vault/balances/:address` | Read multi-balance breakdown |\n\n### Backend Requirements\n\nThe MCP server is a thin API client. It expects a Yault backend providing:\n\n- `GET /api/vault/balance/:address`\n- `GET /api/vault/balances/:address`\n- `GET /api/vault/agent-authorization`\n- `POST /api/vault/deposit` -- `{ address, amount }`\n- `POST /api/vault/redeem` -- `{ address, shares }`\n- `POST /api/vault/transfer` -- `{ from_address, to_address, amount, currency? }`\n\nAuthentication: `Authorization: Bearer sk-yault-*` via `YAULT_API_KEY` env variable.\n\n## Security Model\n\nAESP is built around \"bounded autonomy\":\n\n- Agent API keys should be policy-bound before spend execution.\n- Spending controls should include per-tx and rolling limits (daily/weekly/monthly).\n- Destination constraints should be allowlist-driven where applicable.\n- Sensitive operations should stay outside broad agent key scopes.\n- Human escalation remains the fallback for policy violations.\n\nFor vulnerability reporting, see [SECURITY.md](./SECURITY.md).\n\n## Related Packages\n\n| Package | Description |\n|---------|-------------|\n| [`@yault/elizaos-plugin-aesp`](https://github.com/ya-xyz/elizaos-plugin-aesp) | ElizaOS plugin wrapping AESP for agent frameworks |\n\n## Development\n\nRun tests:\n\n```bash\nnpm test\n```\n\nBuild TypeScript:\n\n```bash\nnpm run build:ts\n```\n\nBuild with WASM (requires [acegf-wallet](https://github.com/ya-xyz/acegf-wallet) as a sibling repo, or set `ACEGF_ROOT`):\n\n```bash\nnpm run build:wasm\nnpm run build:ts\n```\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md) for the full development guide.\n\n## License\n\nThis project is licensed under the **Apache License 2.0**. See [LICENSE](./LICENSE) for the full text.\n",
  "bytes": 5846,
  "sha": "88780997584bb1388dc45584b4bc161af1b13e0da9834ee00d4289f92ab12467",
  "repo_slug": "ya-xyz/aesp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_xyz_yault_aesp_a7ce1faf/readme"
}