|
| 1 | +# https://docs.base.org/ai-agents/llms-full.txt |
| 2 | + |
| 3 | +## AI Agents — Deep Guide for LLMs |
| 4 | + |
| 5 | +> Build AI agents that operate as independent economic actors on Base: a wallet to hold and spend funds, identity standards so other agents can trust it, a payment protocol for pay-per-request APIs, and a discovery layer so agents can find each other. |
| 6 | + |
| 7 | +### What you can do here |
| 8 | +- Choose a framework (Agent SDK, OpenClaw, BANKR) to build and run your agent |
| 9 | +- Give your agent a wallet to hold stablecoins and sign transactions |
| 10 | +- Enable your agent to pay for services automatically using the x402 protocol |
| 11 | +- Register and verify agent identity for agent-to-agent trust |
| 12 | +- Build agent apps — services designed for agents as the primary user |
| 13 | +- Apply Base-specific patterns for trading agents using Flashblocks |
| 14 | + |
| 15 | +## Navigation (with brief descriptions) |
| 16 | + |
| 17 | +### Introduction |
| 18 | +- [AI Agents on Base](https://docs.base.org/ai-agents/index.md) — Overview and how pieces fit together |
| 19 | + |
| 20 | +### Core Concepts |
| 21 | +- [Frameworks](https://docs.base.org/ai-agents/core-concepts/agent-frameworks.md) — Agent SDK, OpenClaw, BANKR comparison |
| 22 | +- [Wallets](https://docs.base.org/ai-agents/core-concepts/wallets.md) — Wallet options and setup |
| 23 | +- [Payments & Transactions](https://docs.base.org/ai-agents/core-concepts/payments-and-transactions.md) — x402 and skills |
| 24 | +- [Identity, Verification & Auth](https://docs.base.org/ai-agents/core-concepts/identity-verification-auth.md) — Agent identity and trust |
| 25 | +- [Agent Apps](https://docs.base.org/ai-agents/core-concepts/agent-apps.md) — Build agent-first services |
| 26 | + |
| 27 | +### Advanced |
| 28 | +- [Trading on Base](https://docs.base.org/ai-agents/trading.md) — Flashblocks, fee calibration, trading signals |
| 29 | + |
| 30 | + |
| 31 | +## Key Concepts (excerpts) |
| 32 | + |
| 33 | +Source: `https://docs.base.org/ai-agents/index.md` |
| 34 | + |
| 35 | +Base gives your AI agent the tools to operate as an independent economic actor: |
| 36 | +- **Framework**: Self-hosted SDK, open-source assistant (OpenClaw), or managed API (BANKR) |
| 37 | +- **Wallet**: Hold stablecoins, send payments, and sign transactions onchain |
| 38 | +- **Payments**: Pay for API access with stablecoins using the x402 pay-per-request protocol |
| 39 | +- **Identity**: Register your agent in a public directory so other agents and services can discover and verify it |
| 40 | +- **Agent Apps**: Create services designed for agents, exposing structured endpoints agents can call programmatically |
| 41 | + |
| 42 | +Source: `https://docs.base.org/ai-agents/core-concepts/agent-frameworks.md` |
| 43 | + |
| 44 | +Framework comparison: |
| 45 | +- **BANKR** — Managed Agent API with skill and wallet plugins; best for fast deployment |
| 46 | +- **OpenClaw** — Open-source personal AI assistant (Discord, Telegram, web); best for multi-channel agents |
| 47 | +- **Agent SDK** — Developer toolkit for custom agents with full control over behavior and integrations |
| 48 | + |
| 49 | +Source: `https://docs.base.org/ai-agents/core-concepts/wallets.md` |
| 50 | + |
| 51 | +An onchain wallet gives your agent the ability to hold funds, authorize transactions, and sign messages. Without one, your agent can read data but can't pay for services, receive payments, or prove its identity. |
| 52 | + |
| 53 | +Source: `https://docs.base.org/ai-agents/core-concepts/payments-and-transactions.md` |
| 54 | + |
| 55 | +- **x402 protocol**: Agents pay for services automatically with stablecoins on a per-request basis, no human approval required |
| 56 | +- **Skills**: Pre-built onchain actions (swaps, transfers, contract calls) that your agent can perform through a structured API |
| 57 | + |
| 58 | +Source: `https://docs.base.org/ai-agents/core-concepts/identity-verification-auth.md` |
| 59 | + |
| 60 | +- Agents register in a public directory with verifiable credentials |
| 61 | +- Other agents and services can look up and verify identity before trusting |
| 62 | +- Authentication flows designed for machine-to-machine (no human in the loop) |
| 63 | + |
| 64 | +Source: `https://docs.base.org/ai-agents/core-concepts/agent-apps.md` |
| 65 | + |
| 66 | +- Agent apps expose structured endpoints (not visual UIs) that agents can discover and call |
| 67 | +- Make your service discoverable by registering it in the agent directory |
| 68 | +- Design APIs with explicit schemas so agents can reason about inputs and outputs |
| 69 | + |
| 70 | + |
| 71 | +## Trading Agents (excerpts) |
| 72 | + |
| 73 | +Source: `https://docs.base.org/ai-agents/trading.md` |
| 74 | + |
| 75 | +Base offers two structural advantages for trading agents: |
| 76 | +- **Flashblocks**: 200ms preconfirmed block state, 10× faster than the 2-second block |
| 77 | +- **Exposed L1/L2 fee structure**: Enables explicit cost-vs-speed tradeoffs |
| 78 | + |
| 79 | +Key patterns: |
| 80 | +- Connect to `mainnet-preconf.base.org` for all reads and submissions to access Flashblocks pending state |
| 81 | +- Simulate with `eth_simulateV1` against preconfirmed state before signing any transaction |
| 82 | +- Poll `base_transactionStatus` (not `eth_getTransactionReceipt`) for low-latency inclusion status (~200ms) |
| 83 | +- Use `eth_feeHistory` over last 5–10 blocks with reward percentiles `[50, 90]` for fee calibration |
| 84 | + |
| 85 | +Fee calibration: |
| 86 | +``` |
| 87 | +maxFeePerGas = nextBaseFee * 2 + maxPriorityFeePerGas |
| 88 | +``` |
| 89 | + |
| 90 | +L1 fee decision rule — if this ratio exceeds 0.8, L1 fee dominates; consider deferring small trades: |
| 91 | +``` |
| 92 | +l1FeeUpperBound / (gasLimit × maxFeePerGas + l1FeeUpperBound) > 0.8 |
| 93 | +``` |
| 94 | + |
| 95 | +Key Flashblocks signals for trading: |
| 96 | +- `eth_getBlockByNumber("pending")` on preconf endpoint — preconfirmed pending block state (200ms early) |
| 97 | +- `eth_subscribe("newFlashblockTransactions")` — first-mover on large trades entering the block |
| 98 | +- `eth_subscribe("pendingLogs", { address, topics })` — detect liquidation thresholds and oracle updates before finality |
0 commit comments