← Back to Blog

How to Check Optimism Wallet Balance with an AI Agent

Optimism is the home of Retroactive Public Goods Funding (RetroPGF), the Superchain ecosystem, and some of the most sophisticated DAO governance in all of web3. Whether you're a DAO contributor tracking treasury multi-sig balances, a grant recipient monitoring an allocation wallet, or a Superchain developer watching cross-chain ETH flows, an AI agent on Optimism gives you the intelligence you need — without a data team.

🚀
Step 1
Create the Project Folder
Two files inside optimism-agent/ — agent.yaml and oe-config.json.
Step 2
Point to Optimism RPC
Free publicnode.com Optimism endpoint — no account, no rate limit surprises.
Step 3
Run the Agent
ETH balance on Optimism reported in seconds. Sub-cent gas costs.

What You Need


Create the Project Folder

Create a folder called optimism-agent/ and add these two files:

optimism-agent/
├── SKILL.md         # the portable skill (agentskills.io)
├── agent.yaml       # wires SKILL.md to your connector
└── oe-config.json  # LLM key + Optimism L2 RPC + wallet address

The Skill Files

SKILL.md
---
name: optimism-agent
description: Check ETH balance on Optimism
license: Apache-2.0
metadata:
  author: Open Enthrium
  version: "1.0"
---

You are a blockchain data agent. Use the tools to fetch data and respond concisely.

## Step 1: Check Balance
Get the ETH balance for the configured wallet address on the Optimism network.
Report the address and ETH balance. Nothing else.
agent.yaml
name: Optimism Agent
description: Check ETH balance on Optimism
connectors:
  - connection_name: Optimism
    connection_type: web3
skills:
  - path: ./
    trigger_type: auto

The Config File

Optimism uses ETH as its native gas token. The optimism.publicnode.com endpoint is a free, production-grade RPC with no signup required:

{
  "llm": {
    "provider": "openai",
    "model": "gpt-4o",
    "apiKey": "sk-..."
  },
  "server": {
    "enabled": false,
    "port": 3333,
    "apiKey": "your-secret-api-key"
  },
  "connectors": [
    {
      "connection_name": "Optimism",
      "connection_type": "web3",
      "baseUrl": "https://optimism.publicnode.com",
      "walletAddress": "0xYOUR_WALLET_ADDRESS"
    }
  ]
}

🚀 The Optimism Collective's RetroPGF programme has distributed tens of millions of dollars in ETH to public goods builders. Many of these allocations land in multisig wallets that need monitoring. An AI agent on Optimism is the simplest way to track these flows without building a custom dashboard.

Download OE Runtime

OE Runtime — Direct Downloads

Run the Agent

From the parent folder containing your skill directory:

MethodBest forDownload
1 npx recommended No install needed — always runs the latest version —
2 Windows .exe Download once, run offline on Windows ⊞ Windows (.exe)
3 macOS binary Download once, run offline on Mac  macOS
4 Linux binary Server deployments, cron jobs, Docker 🐧 Linux
5 API Server integration Call from any app, webhook, or automation pipeline 📮 Postman Collection

1 npx recommended

npx -y @openenthrium/oe-runtime@latest ./optimism-agent

2 Windows

oe-runtime-win.exe ./optimism-agent

3 macOS

chmod +x oe-runtime-macos
./oe-runtime-macos ./optimism-agent

First run blocked? System Settings → Privacy & Security → Allow Anyway.

4 Linux

chmod +x oe-runtime-linux
./oe-runtime-linux ./optimism-agent

5 API Server integration

Add a "server" block to oe-config.json, then start with --serve:

{
  "llm": { ... },
  "server": { "enabled": true, "port": 3333, "apiKey": "your-secret-key" },
  "connectors": [ ... ]
}
npx -y @openenthrium/oe-runtime@latest --serve --config oe-config.json

Run with inline YAML:

curl -X POST http://localhost:3333/run \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-secret-key" \
  -d '{"yaml": "...", "params": {}}'

Or run from a file on the server:

curl -X POST http://localhost:3333/run-file \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-secret-key" \
  -d '{"file": "/path/to/agent.yaml", "params": {}}'

DAO & Superchain Use Cases on Optimism