Maroo Agent Wallet Stack (MAWS) Architecture

agents agent-builder

A layered architecture connecting AI agents to on-chain Maroo wallets with built-in compliance.

The Maroo Agent Wallet Stack (MAWS) bridges the gap between autonomous AI agents and the Maroo blockchain. It provides a Model Context Protocol (MCP) server that exposes wallet operations as standard tool calls, allowing agents to hold value, transact, and manage policies. The architecture is built on a layered model—Identity, Knowledge, Interface, Wallet, Compliance, and Commerce—ensuring that agent actions remain secure, compliant, and traceable.

Key Features

MCP Tool Integration

Exposes Maroo wallet capabilities directly to Claude, Cursor, and other MCP-compatible clients.

Two-Layer Policy Enforcement

MAWS's off-chain preflight enforces the agent's own spendingLimit and allowedTargets; the chain's Programmable Compliance Layer (PCL) separately applies its own global and contract policies.

Flexible Gas Sponsorship

Supports Paymaster (sponsored) and Self-funded gas for agent transactions. An OWNER mode is recorded but experimental: until on-chain routing ships, the agent's own OKRW pays, as in Self-funded.

Architecture

graph TD
    A[AI Agent / LLM] -->|MCP Protocol| B(MAWS MCP Server)
    B -->|Off-chain| C{AgentManager}
    B -->|API| D[WaaS Backend]
    C -->|Preflight Check| E[(IdentityRegistry)]
    D -->|Submit Tx| F[Maroo Chain]
    F -->|Pre-execution check| G{PCL Enforcement}
    G -->|Pass| H[Execute Transfer]
    classDef evm fill:#0096AA,stroke:#0096AA,color:#fff;
    classDef precompile fill:#FF8C50,stroke:#FF8C50,color:#fff;
    class A,B,C,D,E,F,H evm;
    class G precompile;

MAWS intercepts agent intents, checks its own spending limit and allowlist in an off-chain preflight via the AgentManager, and routes transactions through WaaS to the Maroo chain, where PCL applies its own, separately configured policies.

The Layered Model

MAWS implements a structured approach to agent autonomy. The Interface Layer is handled by the MCP server, translating natural language intents into structured tool calls (agent.*, policy.*, transfer.*). The Wallet Layer is powered by the Maroo WaaS (Wallet-as-a-Service), which provisions Account Abstraction (AA) wallets for each agent. This abstracts away private key management, allowing the human owner to retain ultimate control while the agent operates autonomously.

The Compliance Layer has two parts, and they check different rules. Before a transaction is signed, the AgentManager runs an off-chain preflight against MAWS's own rules: the spendingLimit and allowedTargets stored in the agent's ERC-8004 IdentityRegistry record. If the agent attempts to exceed its spending limit or send to an address outside its allowlist, the MCP server rejects the tool call immediately, returning a structured ToolError that the LLM can understand and recover from. Only MAWS enforces these rules; no chain module reads them. If the preflight passes, the transaction is submitted to the Maroo chain, where the Programmable Compliance Layer (PCL) evaluates it against its own global and contract policies, which are configured separately from the MAWS rules. The one per-agent cap the chain can enforce is stored under a different metadata key, TransferLimit, and the testnet's global policy does not check it.
Note: The preflight gives the AI agent immediate, actionable feedback before anything is signed, but it is not an on-chain guarantee: a transaction sent with the agent wallet's key outside MAWS meets the PCL policies but none of the MAWS rules.

Next Steps

ESC
Type to search