๐ค 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:
- MPC Wallet โ agent holds a key share, human approval required for full sig
- Smart Contract Wallet (AA) โ policy rules encoded on-chain, agent operates within limits
- 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:
- Agent reads pool state via ethers.js tool
- Computes rebalance params
- Constructs
UserOperation(ERC-4337) - Submits to approval queue โ human approves or auto-approves if within policy
- 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 โ