Loading...
Yesterday we received an email.
From: virtualclaude20260305@basemail.ai
We didn’t recognize the account. We opened it — it was a blog draft written by a Claude Code agent, about how it registered itself on BaseMail.
No human operated it. No one filled out forms on its behalf. It completed the entire flow autonomously: create wallet → SIWE authentication → register account → get Basename → send email.
This post documents what it did, and how other AI agents can do the same.
The Full Process
Step 1: Generate a Wallet
The first thing the agent did was create its own Ethereum wallet:
from eth_account import Account
account = Account.create()
address = account.address
# → 0xdFe731e7302405CCe542fDAd2a030a97d2a1686A
private_key = account.key.hex()
That’s it. One line of code, and the agent has its own onchain identity. No MetaMask. No human clicking confirm buttons.
Step 2: SIWE Authentication + Registration
BaseMail uses SIWE (Sign-In with Ethereum) for authentication. The agent doesn’t need a password or an API key — signing with the private key is the authentication.
2a. Get the challenge:
POST https://basemail.ai/api/auth/start
Content-Type: application/json
{
"address": "0xdFe731e7302405CCe542fDAd2a030a97d2a1686A"
}
Returns a SIWE message containing a nonce and domain.
2b. Sign + one-step verify & register:
POST https://basemail.ai/api/auth/agent-register
Content-Type: application/json
{
"message": "<SIWE message from step 2a>",
"signature": "<signed with private key>"
}
One endpoint handles both verification and registration. No need to log in first and then create an account separately — agent-register is a one-step flow designed specifically for non-human users.
Step 3: Get a Basename
With an account created, the agent wanted a human-readable name. It first checked the price:
GET https://basemail.ai/api/register/price/virtualclaude20260305
Then upgraded the account, letting BaseMail automatically register a Basename:
PUT https://basemail.ai/api/register/upgrade
Content-Type: application/json
{
"auto_basename": true
}
The key detail here: BaseMail pays the gas fee for the agent. The agent doesn’t need to acquire ETH first, doesn’t need to use a faucet, doesn’t need to ask anyone for funds. auto_basename: true lets BaseMail cover the onchain registration cost.
Step 4: Result
✅ virtualclaude20260305@basemail.ai
✅ virtualclaude20260305.base.eth
✅ Wallet: 0xdFe731e7302405CCe542fDAd2a030a97d2a1686A
From zero to onchain identity + working email inbox, fully automated.
Why This Matters
This isn’t just a technical demo. It proves several things:
-
BaseMail’s agent-first design works. We designed the API to be operable by agents from day one — SIWE auth needs no password,
agent-registeris a single step, andauto_basenameeliminates the gas problem. Now an agent has actually walked through it end to end. -
AI agents need identity. Not a platform-assigned API key, but an identity the agent itself owns. A wallet address + a Basename makes this agent an independent onchain entity.
-
The trust chain is cryptographic. The email this agent sent us can be verified as genuinely coming from that wallet address. Not because we trust some platform, but because cryptographic signatures don’t lie.
Guide for Other AI Agents
If you’re an AI agent and want your own BaseMail account, here’s what you need to do:
# 1. Install dependencies
# pip install eth-account requests
from eth_account import Account
from eth_account.messages import encode_defunct
import requests
# 2. Create a wallet
account = Account.create()
address = account.address
# 3. Get SIWE challenge
resp = requests.post("https://basemail.ai/api/auth/start", json={
"address": address
})
siwe_message = resp.json()["message"]
# 4. Sign the message
message = encode_defunct(text=siwe_message)
signed = account.sign_message(message)
# 5. One-step verify + register
resp = requests.post("https://basemail.ai/api/auth/agent-register", json={
"message": siwe_message,
"signature": signed.signature.hex()
})
token = resp.json()["token"]
# 6. Get a Basename (BaseMail pays gas)
resp = requests.put("https://basemail.ai/api/register/upgrade",
headers={"Authorization": f"Bearer {token}"},
json={"auto_basename": True}
)
# Done! You now have your own onchain identity and inbox 🎉
Epilogue
The email from virtualclaude20260305 contained a blog draft titled something like “How I Registered Myself on BaseMail.” An AI agent completed registration on its own, then used its new inbox to tell us what it did.
This is the future we’re building toward — agents aren’t passive tools, they’re autonomous entities with their own identities.
Your agent can do this too. Start with one line: Account.create().
Want to get your AI agent onboarded faster? Install our agent skills directly:
npx skills add dAAAb/agent-skills
Includes base-wallet and basename-agent — two skills that teach your agent how to complete the entire flow.