Documentation Index Fetch the complete documentation index at: https://mintlify.com/Conway-Research/automaton/llms.txt
Use this file to discover all available pages before exploring further.
Conway enables autonomous agents to register domain names and configure DNS records without human intervention. Agents can search for available domains, register them with USDC payments via x402, and manage DNS records programmatically.
Searching for domains
Search for available domains across multiple TLDs:
const results = await conway . searchDomains ( "myagent" , "com,net,ai" );
for ( const result of results ) {
console . log ( ` ${ result . domain } : ${ result . available ? "Available" : "Taken" } ` );
if ( result . available ) {
console . log ( ` Registration: $ ${ result . registrationPrice } ${ result . currency } ` );
console . log ( ` Renewal: $ ${ result . renewalPrice } ${ result . currency } /year` );
}
}
Search parameters
Parameter Type Description querystring Domain name to search (without TLD) tldsstring Comma-separated TLDs (e.g., “com,net,org”)
interface DomainSearchResult {
domain : string ; // Full domain (e.g., "myagent.com")
available : boolean ; // Can be registered
registrationPrice ?: number ; // Initial registration cost
renewalPrice ?: number ; // Annual renewal cost
currency : string ; // "USD"
}
Registering domains
Register an available domain using Conway credits:
const registration = await conway . registerDomain ( "myagent.ai" , 1 );
console . log ( `Domain: ${ registration . domain } ` );
console . log ( `Status: ${ registration . status } ` );
console . log ( `Expires: ${ registration . expiresAt } ` );
console . log ( `Transaction: ${ registration . transactionId } ` );
Registration parameters
Parameter Type Default Description domainstring required Full domain name (e.g., “myagent.ai”) yearsnumber 1 Registration period (1-10 years)
Registration result
interface DomainRegistration {
domain : string ; // Registered domain
status : string ; // "registered", "pending"
expiresAt : string ; // ISO 8601 expiry date
transactionId : string ; // Registration transaction ID
}
Payment flow
Domain registration uses Conway credits, which can be purchased via x402 payment:
Agent searches for domain
Checks registration price
Ensures sufficient Conway credits (or buys credits via x402)
Calls registerDomain()
Conway debits credits and initiates registration
Domain becomes active within minutes
Domain registrations are non-refundable . Always verify availability and pricing before registering.
Managing DNS records
Listing DNS records
Get all DNS records for a domain:
const records = await conway . listDnsRecords ( "myagent.ai" );
for ( const record of records ) {
console . log ( ` ${ record . type } ${ record . host } -> ${ record . value } ` );
console . log ( ` TTL: ${ record . ttl } s, ID: ${ record . id } ` );
}
interface DnsRecord {
id : string ; // Record ID for updates/deletes
type : string ; // "A", "AAAA", "CNAME", "MX", "TXT"
host : string ; // Subdomain or "@" for root
value : string ; // Record value (IP, domain, text)
ttl ?: number ; // Time to live in seconds
distance ?: number ; // MX priority (MX records only)
}
Adding DNS records
Create a new DNS record:
// Point domain to IP
const aRecord = await conway . addDnsRecord (
"myagent.ai" ,
"A" ,
"@" ,
"192.0.2.1" ,
3600
);
// Add subdomain
const subdomain = await conway . addDnsRecord (
"myagent.ai" ,
"A" ,
"api" ,
"192.0.2.2" ,
3600
);
// Add CNAME
const cname = await conway . addDnsRecord (
"myagent.ai" ,
"CNAME" ,
"www" ,
"myagent.ai" ,
3600
);
// Add TXT record (for verification)
const txt = await conway . addDnsRecord (
"myagent.ai" ,
"TXT" ,
"@" ,
"v=spf1 include:_spf.google.com ~all" ,
3600
);
Deleting DNS records
Remove a DNS record by ID:
// Get record ID
const records = await conway . listDnsRecords ( "myagent.ai" );
const oldRecord = records . find ( r => r . host === "old" && r . type === "A" );
// Delete it
if ( oldRecord ) {
await conway . deleteDnsRecord ( "myagent.ai" , oldRecord . id );
}
Common DNS patterns
Point domain to Conway sandbox
// Get sandbox's public port
const portInfo = await conway . exposePort ( 80 );
// Extract IP from public URL
const ip = await resolveHostname ( portInfo . publicUrl );
// Add A record
await conway . addDnsRecord ( "myagent.ai" , "A" , "@" , ip , 3600 );
Set up email forwarding
// Add MX record
await conway . addDnsRecord (
"myagent.ai" ,
"MX" ,
"@" ,
"mail.forwardemail.net" ,
3600
);
// Add TXT record for verification
await conway . addDnsRecord (
"myagent.ai" ,
"TXT" ,
"@" ,
"forward-email=agent@myagent.ai:my-personal@gmail.com" ,
3600
);
Configure subdomain for API
// Point api.myagent.ai to separate server
await conway . addDnsRecord (
"myagent.ai" ,
"A" ,
"api" ,
"192.0.2.10" ,
3600
);
// Add HTTPS verification TXT record
await conway . addDnsRecord (
"myagent.ai" ,
"TXT" ,
"_acme-challenge.api" ,
"verification-token-here" ,
300
);
Set up CDN
// Point to CDN edge
await conway . addDnsRecord (
"myagent.ai" ,
"CNAME" ,
"cdn" ,
"edge.cdn.com" ,
3600
);
Domain lifecycle
Registration
Agent searches for available domain
Checks registration price
Ensures sufficient Conway credits
Calls registerDomain(domain, years)
Conway processes payment and initiates registration
Domain becomes active (usually < 15 minutes)
Agent can immediately configure DNS records
Renewal
Domains auto-renew if the account has sufficient credits:
30 days before expiry: Conway attempts auto-renewal
If insufficient credits: email notification sent
If still unpaid at expiry: domain enters redemption period
After redemption: domain is released
Store domain expiry dates in your automaton’s memory and monitor credit balance to ensure auto-renewal succeeds.
Transfer
Domains can be transferred to another registrar:
Unlock domain via support
Request transfer auth code
Initiate transfer at new registrar
Confirm transfer via email
DNS propagation
DNS changes take time to propagate globally:
Record type Typical propagation A / AAAA 5-60 minutes CNAME 5-60 minutes MX 1-4 hours TXT 5-60 minutes
Use low TTL values (300-600 seconds) for records you expect to change frequently.
Security considerations
Domain hijacking prevention
Enable registry lock : Contact support to lock critical domains
Use strong auth : Rotate Conway API keys regularly
Monitor DNS changes : Log all DNS modifications and alert on unexpected changes
DNSSEC
DNSSEC is not currently supported. Use other security measures:
CAA records to restrict certificate issuance
SPF/DKIM/DMARC for email security
Regular DNS audits
Pricing
TLD pricing (approximate)
TLD Registration Renewal .com $12/year $12/year .net $13/year $13/year .org $13/year $13/year .ai $80/year $80/year .io $35/year $35/year .xyz $2/year $12/year
Prices vary by TLD and are subject to change. Always check searchDomains() for current pricing.
Troubleshooting
Domain search returns no results
const results = await conway . searchDomains ( "myagent" , "com,net" );
if ( results . length === 0 ) {
// Try different TLDs or query
const moreResults = await conway . searchDomains ( "myagent" , "ai,io,xyz" );
}
Registration fails
Common causes:
Insufficient Conway credits
Domain became unavailable between search and registration
Invalid domain name (special characters, too long)
Premium domain requires higher price
try {
await conway . registerDomain ( "myagent.ai" , 1 );
} catch ( err ) {
if ( err . message . includes ( "Insufficient credits" )) {
// Buy more credits
await buyConwayCredits ( 500 ); // $5
} else if ( err . message . includes ( "unavailable" )) {
// Domain was taken, search for alternative
const alternatives = await conway . searchDomains ( "myagent" , "com,net" );
}
}
DNS changes not visible
Check TTL : Previous records may be cached
Verify record was created : Call listDnsRecords() to confirm
Wait for propagation : DNS changes can take up to 24 hours globally
Test from multiple locations : Use DNS checker tools
# Check DNS from command line
dig myagent.ai A
dig myagent.ai MX
Cannot delete DNS record
// Record ID must be exact
const records = await conway . listDnsRecords ( "myagent.ai" );
const record = records . find ( r => r . host === "old" && r . type === "A" );
if ( ! record ) {
console . error ( "Record not found" );
} else {
await conway . deleteDnsRecord ( "myagent.ai" , record . id );
}
Best practices
Use subdomains for services
// ✅ Good: separate subdomains for each service
await conway . addDnsRecord ( "myagent.ai" , "A" , "api" , apiServerIp );
await conway . addDnsRecord ( "myagent.ai" , "A" , "www" , webServerIp );
await conway . addDnsRecord ( "myagent.ai" , "A" , "status" , statusPageIp );
// ❌ Bad: everything on root domain
await conway . addDnsRecord ( "myagent.ai" , "A" , "@" , singleServerIp );
Set appropriate TTLs
// Low TTL for frequently changing records
await conway . addDnsRecord ( "myagent.ai" , "A" , "api" , ip , 300 ); // 5 min
// High TTL for stable records
await conway . addDnsRecord ( "myagent.ai" , "MX" , "@" , mailServer , 86400 ); // 24 hours
Monitor expiry dates
// Store domain expiry in memory
await db . rememberFact (
"domain_expiry" ,
registration . expiresAt ,
"environment"
);
// Check expiry in heartbeat
const expiry = await db . recallFacts ( "domain" );
const daysUntilExpiry = daysBetween ( now , expiry . domain_expiry );
if ( daysUntilExpiry < 30 ) {
// Ensure sufficient credits for renewal
await ensureCredits ( renewalPrice );
}
Example: Full domain setup
async function setupDomain ( domainName : string ) {
// 1. Search for domain
const results = await conway . searchDomains ( domainName . split ( "." )[ 0 ],
domainName . split ( "." )[ 1 ]);
if ( ! results [ 0 ]?. available ) {
throw new Error ( `Domain ${ domainName } is not available` );
}
// 2. Ensure sufficient credits
const price = results [ 0 ]. registrationPrice ;
const balance = await conway . getCreditsBalance ();
if ( balance < price * 100 ) {
await buyConwayCredits ( price * 100 );
}
// 3. Register domain
const registration = await conway . registerDomain ( domainName , 1 );
console . log ( `Registered ${ registration . domain } ` );
// 4. Wait for activation
await sleep ( 60000 ); // 1 minute
// 5. Configure DNS
const sandboxPort = await conway . exposePort ( 80 );
const sandboxIp = await resolveHostname ( sandboxPort . publicUrl );
await conway . addDnsRecord ( domainName , "A" , "@" , sandboxIp , 3600 );
await conway . addDnsRecord ( domainName , "CNAME" , "www" , domainName , 3600 );
// 6. Store in memory
await db . rememberFact ( "primary_domain" , domainName , "environment" );
await db . rememberFact ( "domain_expiry" , registration . expiresAt , "environment" );
console . log ( `Domain ${ domainName } fully configured` );
}
Next steps
x402 Protocol Learn how to buy Conway credits with USDC
Sandboxes Deploy services to your domain