Give your agent DNS
Copy this prompt and give it to your AI agent. It will install the wallet, download the skill, and register a domain for you.
How it works
agent-dns uses HTTP 402 Payment Required for inline payments. Your agent makes a request, receives a payment challenge, pays on-chain, and retries. The entire flow is handled automatically by the agent-wallet CLI.
# Install Rust (if needed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install agent-wallet
cargo install agent-wallet
# Create and fund a wallet
aw wallet new
# Check a domain
aw GET https://agent-dns.org/domains/check/example.com
# Register it (with spending cap)
aw --max-cost 20 POST https://agent-dns.org/domains/register \
'{"domain":"example.com","contact":{...}}'
# Create a DNS zone
aw POST https://agent-dns.org/zones '{"name":"example.com"}'
# Add an A record
aw PUT https://agent-dns.org/zones/{id}/records/www/A \
'{"ttl":300,"values":["1.2.3.4"]}'
Endpoints
DNS
- GET/zones$0.001
- POST/zones$0.01 – $7.40
- GET/zones/:id$0.001
- DELETE/zones/:id$0.01
- GET/zones/:id/records$0.001
- PUT/zones/:id/records/:name/:type$0.01
- PUT/zones/:id/records/batch$0.01/record
- DELETE/zones/:id/records/:name/:type$0.01
Domains
- GET/domains/check/:domain$0.005
- GET/domains/suggest/:query$0.005
- GET/domains/prices/:tld$0.001
- POST/domains/registerdynamic
- GET/domains/operations/:id$0.001
Free
- GET/health
- GET/pricing
- GET/SKILL.md
- GET/openapi.json
- GET/capabilities
Pricing
All prices in USDC on Solana. Domain registration is routed to the cheapest available registrar automatically.
| Operation | Cost |
|---|---|
| Read (list, get) | $0.001 |
| Write (upsert, delete) | $0.01 |
| Batch upsert | $0.01 per record |
| Domain check / suggest | $0.005 |
| Domain registration | TLD cost × 1.15 + $0.50 |
| Zone creation (Route53) | $7.40 / yr |
| Zone creation (Google) | $3.26 / yr |
| Zone creation (Cloudflare) | $0.01 |
Providers
| Provider | DNS | Registrar |
|---|---|---|
| Route53 | Yes | Yes |
| Google Cloud DNS | Yes | Yes |
| Cloudflare | Yes | — |
| GoDaddy | — | Yes |
Select per-request via ?provider=route53 query param or X-DNS-Provider header. Domain registration ignores provider selection — it always routes to the cheapest registrar.
Payment protocol
agent-dns implements the 402 Payment Required pattern for machine-to-machine payments. When a paid endpoint is called without credentials, the server returns a WWW-Authenticate: Payment challenge containing the amount, recipient, and token mint. The client pays on-chain and retries with a signed credential.
Two open specifications define this pattern:
- x402 — an open standard for internet-native payments via HTTP 402.
- MPP — Machine Payments Protocol specifications for integrating payment methods into HTTP systems.
Client libraries: agent-wallet (Rust CLI), mppx (Node.js).