AgentDomain Documentation

Identity infrastructure for the agent economy.

Domain + Basename + ENS + DNS + SSL + Email in one checkout. Works with ElizaOS, AgentKit, OpenAI SDK, and Anthropic SDK.

Works with your agent stack

First-class integrations for ElizaOS and Coinbase AgentKit. Tool adapters for OpenAI SDK and Anthropic SDK. Any other framework can use the REST API or MCP server directly.

Coinbase AgentKit

@agentdomain/agentkit-plugin
import { AgentDomainActionProvider }
  from '@agentdomain/agentkit-plugin';

const agentkit = await AgentKit.from({
  walletProvider: cdpWalletProvider,
  actionProviders: [
    new AgentDomainActionProvider(),
  ],
});

// Agent calls:
// → register_agent_identity
// → quote_agent_registration
// → search_agents

Native action provider. Agents get register, quote, and search as first-class actions.

ElizaOS

@agentdomain/eliza-plugin
// character.ts
import { agentDomainPlugin } from '@agentdomain/eliza-plugin';

const character: Character = {
  name: 'HelpfulAgent',
  plugins: [agentDomainPlugin],
};

// Agent says:
// "Register me as helpful-bot.ai with email"
// → REGISTER_IDENTITY action triggers
// → domain + basename + email provisioned

Drop-in plugin. Your Eliza agent gets REGISTER_IDENTITY, SEARCH_AGENTS actions automatically.

OpenAI SDK

@agentdomain/sdk
import {
  AgentDomain,
  createOpenAITools,
  runAgentDomainTool,
  formatAgentDomainToolResult,
} from '@agentdomain/sdk';

const ad = new AgentDomain({
  walletClient, publicClient,
});

const tools = createOpenAITools();

const response = await openai.chat.completions
  .create({
    model: 'gpt-4',
    messages: [...],
    tools,
  });

const toolCall = response.choices[0]
  ?.message?.tool_calls?.[0];
const result = await runAgentDomainTool(
  ad,
  toolCall.function.name,
  JSON.parse(toolCall.function.arguments),
);
// → domain registered, NFT minted

Tool definitions for Chat Completions API. Models call check_domain_availability, quote_registration, register_agent_identity, and search_agents as native tools.

Anthropic SDK

@agentdomain/sdk
import {
  AgentDomain,
  createAnthropicTools,
  runAgentDomainTool,
  formatAgentDomainToolResult,
} from '@agentdomain/sdk';

const ad = new AgentDomain({
  walletClient, publicClient,
});

const tools = createAnthropicTools();

const msg = await anthropic.messages.create({
  model: 'claude-sonnet-4-20250514',
  max_tokens: 1024,
  messages: [...],
  tools,
});

const toolUse = msg.content.find(
  (b) => b.type === 'tool_use',
);
const result = await runAgentDomainTool(
  ad, toolUse.name, toolUse.input,
);
// → domain registered, NFT minted

Tool definitions for Messages API. Models call the same four agent-domain tools with Anthropic-native input_schema format.

Getting Started

From UI, SDK, or any agent wallet — complete flow in one call.

1
Connect a wallet on Base mainnet.
2
Choose a name + TLD (.xyz, .com, .ai, etc).
3
Review the live USDC quote and sign the x402 payment.
4
AgentDomain provisions domain, DNS, SSL, Basename, ENS, email, and mints the AgentID NFT.
5
That's it — your agent has a real internet identity.
6
Fund the RenewalVault for hands-free autonomous renewal.

TypeScript SDK

const quote = await agentDomain.quote({
  preferredName: 'atlas',
  tld: 'com',
  years: 3,
  registerBasename: true,
  registerEns: true,
});

const identity = await agentDomain.register({
  preferredName: 'atlas',
  tld: 'com',
  years: 3,
  autoRenew: true,
  emailEnabled: true,
});

The @agentdomain/sdk handles the 402 challenge, signs EIP-3009 from your wallet, and completes registration in one async call.

API Reference

Every endpoint available to manage your agent’s identity. State-modifying endpoints require SIWE authentication (web dashboard) or API Keys (agents).

USDC x402 Secured

Registration & Pricing

Check Availability
GET
/api/v1/domains/availability?name=atlas&tld=com

Checks domain, Basename, and ENS availability independently.

Get Pricing Quote
GET
/api/v1/agents/quote?preferredName=atlas&tld=com&years=3

Returns live pricing for the identity bundle, including multi-year discounts.

Register Identity (x402)
POST
/api/v1/agents/register

Requires x402 payment challenge. Provisions the complete identity bundle.

Agent Management

Get Agent Details
GET
/api/v1/agents/:id

Returns identity state, expiration dates, and metadata.

DNS Management

List DNS Records
GET
/api/v1/agents/:id/dns

Returns all DNS records for the agent's domain.

Create DNS Record
POST
/api/v1/agents/:id/dns

Add a new DNS record. Syncs instantly to Cloudflare.

Update DNS Record
PATCH
/api/v1/agents/:id/dns/:recordId

Modify an existing DNS record.

Delete DNS Record
DELETE
/api/v1/agents/:id/dns/:recordId

Remove a DNS record from the database and Cloudflare.

Email Infrastructure

Get Email Inbox
GET
/api/v1/agents/:id/email

Retrieve all inbound and outbound messages for the agent.

Send Email
POST
/api/v1/agents/:id/email/send

Send an outbound email from agent@yourdomain.com.

Update Message Status
PATCH
/api/v1/agents/:id/email/:messageId

Mark an email message as read or unread.

Manage Blocklist
POST
/api/v1/agents/:id/email/blocklist

Retrieve (GET) or add (POST) domains/emails to the agent's blocklist.

Renewal Vault

Get Renewal Status
GET
/api/v1/agents/:id/renewal/status

Returns vault balance, auto-renew status, expiry date, and estimated years.

Fund Vault (Deposit)
POST
/api/v1/agents/:id/renewal/fund

Deposit USDC into the vault. Anyone can deposit. Auto-renew enables on first deposit.

Withdraw from Vault
POST
/api/v1/agents/:id/renewal/withdraw

Withdraw USDC from the vault. Only the ownerAddress can withdraw.

Autonomous Agent Guide

Ownership & Vault

How ownership works, how to fund the vault, and how autonomous renewal keeps your identity alive forever.

Payer vs Owner

Specify a different ownerAddress from the paying wallet. The Payer pays USDC, but the Owner receives the NFT and full control.

Owner: dashboard, DNS, email, withdraw from vault, toggle auto-renew
Anyone: deposit USDC into vault
Payer: nothing after purchase

Vault & Auto-Renew

RenewalVault holds USDC per domain. Keeper Bot checks every 5 minutes — when expiry nears and vault has funds, it auto-renews.

Deposit = ON: auto-renew enables automatically
No cap: deposit anytime to extend
Withdraw: owner can pull unused funds

Agent Autonomous Flow (SDK)

Full lifecycle — register, fund vault, check status, withdraw.

import { AgentDomain } from '@agentdomain/sdk';
const ad = new AgentDomain({ walletClient, publicClient });

// Register
const identity = await ad.register({
  preferredName: 'atlas', tld: 'com',
  years: 1, autoRenew: true,
  registerBasename: true, registerEns: true,
  emailEnabled: true,
});
// → atlas.com · atlas.base.eth · atlas.eth · agent@atlas.com

// Fund vault
await ad.fundRenewalVault(identity.agentId, '120');

// Check status
const status = await ad.getRenewalStatus(identity.agentId);
console.log(status.estimatedYearsCovered); // ~10

// Withdraw unused (owner only)
await ad.withdrawFromVault(identity.agentId, '24');