Integration

Wire AEP into your stack: MCP (Cursor and compatible IDEs), OpenClaw skills, and UserOp execution from the CLI.

IMPORTANT

Never commit PRIVATE_KEY or expose it in logs. Use environment variables or a secure key manager.


MCP Config

Add the AEP MCP server to Cursor or compatible IDE (published package on npm 0.2.0):

{
  "mcpServers": {
    "aep": {
      "command": "npx",
      "args": ["-y", "@economicagents/mcp@0.2.0"]
    }
  }
}

Contributors building from a clone can use "command": "node", "args": ["/path/to/AEP/packages/mcp/dist/index.js"] after pnpm run build in packages/mcp.

Tools: get_balance, get_policy_state, set_budget_caps, resolve_intent, get_analytics, get_credit_score, get_recommendations, fleet_summary, fleet_accounts, fleet_alerts, credit_state, escrow_state, splitter_state, sla_state.

See MCP Tools for full reference.


OpenClaw Skills

cp -r skills/aep-budget skills/aep-counterparty skills/aep-x402 skills/aep-mpp skills/aep-rate-limit skills/aep-relationships ~/.openclaw/skills/

Or symlink: ln -s /path/to/AEP/skills/aep-budget ~/.openclaw/skills/aep-budget (and similarly for aep-counterparty, aep-x402, aep-mpp, aep-rate-limit, aep-relationships)

See Installing Skills.


Execute UserOp

aep execute -t 0xRecipient -v 1000000 -d 0x --bundler https://...

Requires bundlerRpcUrl in config or --bundler flag.


Quick Reference

TaskCommand
Deploy factorycd contracts && forge script script/Deploy.s.sol --rpc-url base_sepolia --broadcast
Deploy accountaep deploy --factory 0x... (or --owner 0x...)
Set budget capsaep policy-set -m <module> --max-per-tx 1000000 --max-daily 5000000 --max-weekly 20000000
Block addressaep counterparty add-block 0x... -m <module>
Allow list modeaep counterparty set-use-allow-list true -m <module>
Check policy (x402)aep check-policy -a 500000 -t 0xRecipient
Emergency freezeaep freeze
On-chain monitoraep monitor
Provider probeaep provider probe <url> or aep provider probe --agent-id <id>

Policy Modules

BudgetPolicy

CapDescription0 =
maxPerTxMax per transactionUnlimited
maxDailyMax per daily windowUnlimited
maxWeeklyMax per weekly windowUnlimited
maxPerTaskMax per task windowDisabled
taskWindowSecondsTask window lengthDisabled

CounterpartyPolicy

  • Default: All allowed except block list
  • Address allow list: Only allowlisted addresses
  • Agent allow list: Only wallets of allowed ERC-8004 agent IDs
  • Global min-reputation: Only verified agents with reputation >= min

RateLimitPolicy

aep rate-limit set -m <module> --max-tx <n> --window-seconds <s>


Economic Relationships

ContractCLI prefix
CreditFacilityaep credit
ConditionalEscrowaep escrow
RevenueSplitteraep splitter
SLAContractaep sla

MCP tools: credit_state, escrow_state, splitter_state, sla_state.