๐Ÿค– AI ร— Web3Mar 13, 2026ยท1 min read

AI Agents That Execute On-Chain: A Practical Guide

Why This Is Different Now

Previous AI + blockchain integrations were read-only: summarise a wallet, explain a transaction. Now, with tool-calling and MCP-connected agents, an AI can actually execute.

The Core Architecture

The signing layer is the critical piece. You have three options:

  1. MPC Wallet โ€” agent holds a key share, human approval required for full sig
  2. Smart Contract Wallet (AA) โ€” policy rules encoded on-chain, agent operates within limits
  3. Custodian API โ€” Fireblocks/BitGo with policy engine, agent submits, human approves

Safety Constraints You Must Implement

  • Whitelist of allowed contracts (no arbitrary calls)
  • Max transaction value per call
  • Rate limiting (N transactions per hour)
  • Human-in-the-loop for anything above threshold

A Real Pattern: DeFi Position Manager

An agent that monitors a Uniswap LP position and rebalances when out of range:

  1. Agent reads pool state via ethers.js tool
  2. Computes rebalance params
  3. Constructs UserOperation (ERC-4337)
  4. Submits to approval queue โ€” human approves or auto-approves if within policy
  5. Bundler submits to EntryPoint

The key insight: the agent never holds the private key. The policy engine does the authorisation.

Enjoyed this?

Get The Architect's Brief โ€” weekly insights on blockchain, AI, and engineering.

Subscribe free โ†’