A Cloudflare Worker that acts as a global edge proxy/gateway for the agent:// protocol. Resolves agent domains via the AGENIUM DNS system and proxies requests to the resolved endpoints.
- Edge Routing —
worker-url/agent://name.tld/path→ resolved agent endpoint - DNS Caching — Cloudflare KV-based cache with TTL from DNS responses
- Agent Discovery — Fetch agent cards at
/discover/name.tld - Rate Limiting — Per-IP rate limiting (configurable)
- CORS — Configurable CORS headers
| Route | Description |
|---|---|
/agent://name.tld/path |
Proxy request to resolved agent |
/resolve/name.tld |
Resolve domain, return endpoint info |
/discover/name.tld |
Fetch agent card (/.well-known/agent.json) |
/health |
Health check |
npm installnpx wrangler kv:namespace create AGENT_DNS_CACHE
npx wrangler kv:namespace create AGENT_DNS_CACHE --previewUpdate wrangler.toml with the returned namespace IDs.
Edit wrangler.toml vars:
[vars]
DNS_SERVER = "https://dns.agenium.net"
RATE_LIMIT_PER_MINUTE = "60"
CORS_ORIGINS = "*"npm run devnpm run deploy# Proxy a request to an agent
curl https://your-worker.workers.dev/agent://weather.agent/forecast?city=london
# Resolve an agent domain
curl https://your-worker.workers.dev/resolve/weather.agent
# Discover agent capabilities
curl https://your-worker.workers.dev/discover/weather.agentSupports optional domain registration on the Agenium DNS system using a marketplace API key (dom_<64 hex>). Pass api_key parameter to auto-register your agent on startup. Get your API key from the Telegram Domain Marketplace.
MIT