Concepts

The core building blocks: identity, smart accounts, policies, permissions, and enforcement.

Agents

Each agent is backed by an AgentSmartAccount contract (ERC-4337) and an identity record in IdentityRegistry. Generate a dedicated keypair so your bot has its own wallet, completely separate from yours.

  • Generate bot keypair — never share your personal keys
  • On-chain enforcement — disallowed transactions revert in validateUserOp
  • Connected wallet stays the owner — full withdrawal rights at all times

Policies

Policies define the rules for what actions an agent can perform. They specify allowed actions, assets, constraints, and time-based validity.

  • Action allowlists (swap, transfer, etc.)
  • Value and volume constraints
  • Time-based validity windows

Permissions

Permissions link agents to policies. When you grant a permission, you're authorizing an agent to act according to a specific policy's rules.

  • Connect agents to policies
  • Set expiration dates
  • Mint on-chain for enforcement

x402 Payments

x402 payments use stablecoin authorizations (EIP-3009 transferWithAuthorization) that settle off-account via the account's EIP-1271 signature. Aegis routes them through authorizeX402Payment so they cannot bypass policy.

Integration note: the exact payment digest must be pre-authorized on-chain (authorizeX402Payment) before the facilitator verifies it. The bot signs a UserOp that the Aegis backend relays (gas-sponsored) — the owner key is never needed at runtime. Skipping this returns an empty 402. See the smart-accounts skill for the full flow.

  • Policy-checked before the payment can settle
  • Counts toward daily volume and per-tx limits
  • Captured in the audit log with on-chain proof

Audit Logs

Every action in the system is logged for compliance and debugging. View validation requests, policy changes, and permission grants.

  • Complete action history
  • Filter by event type
  • Export to JSON/CSV

Example: a trading agent policy

A policy that lets an agent swap USDC for WETH on Uniswap within strict limits

policy.json
{
  "name": "ETH Trader",
  "description": "Autonomous agent that swaps USDC for WETH on Uniswap",
  "enforceOnChain": true,
  "policies": {
    "allowedActions": ["swap", "transfer"],
    "allowedProtocols": ["uniswap-v3"],
    "assetLimits": [
      { "asset": "0x8335...USDC", "maxPerTx": "100000000", "maxDaily": "1000000000" },
      { "asset": "native", "maxPerTx": "1000000000000000000", "maxDaily": "5000000000000000000" }
    ],
    "timeWindow": {
      "validFrom": "2024-03-01T00:00:00Z",
      "validUntil": "2024-03-31T23:59:59Z"
    }
  }
}

If this agent tries to execute a 2.51 ETH swap, the smart contract rejects it before it reaches Uniswap. A compromised agent still cannot exceed the limits — they are enforced by the chain, not by the API.

How Aegis compares to other approaches

Where Aegis fits in the landscape of agent safety mechanisms

CapabilityAegisMulti-SigRate LimitingOff-Chain Validator
On-chain enforcementYesNoNoNo
No private key sharingYesPartialYesYes
Detailed action policiesYesNoPartialYes
Cryptographic proof of enforcementYesPartialNoNo
Multi-agent managementYesYesPartialPartial
Verified, auditable contractsYesPartialPartialNo