AgentCDN Developer Documentation
Welcome to the AgentCDN platform documentation. AgentCDN provides a globally distributed runtime that bridges autonomous AI agents, LLM providers, and real-world tools with ultra-low latency.
1. Quickstart Guide
Integrating AgentCDN into your agent framework takes less than 3 minutes. The client library automatically discovers the nearest Anycast edge node and establishes an encrypted connection multiplexer.
Installation
# Install via npm npm install @agentcdn/sdk # Or install via pip for Python workflows pip install agentcdn
2. Edge Network Architecture
Traditional content distribution networks are optimized for static caching of immutable assets (images, CSS, video segments). In contrast, AgentCDN implements:
- Dynamic Edge Workflows: Lightweight V8 and WASM micro-sandboxes running directly on PoP edge nodes to filter, sanitize, and validate tool calls before dispatching.
- BGP Anycast Routing: Direct peering with Tier-1 transit backbones ensures client requests hit our Los Angeles, Frankfurt, and Tokyo PoPs with minimal BGP hops.
- Predictive Context Pre-Warming: Working context windows and agent state deltas are pushed ahead of execution to adjacent geographic nodes to eliminate cross-datacenter roundtrips.
3. Authentication & API Credentials
All HTTP requests to the AgentCDN API must include your project token in the Authorization header:
Authorization: Bearer ak_live_xxxxxxxxxxxxxxxxxxxxxxxx
We strongly recommend storing your API credentials in environment variables and utilizing restricted-scope keys for production worker runtimes.
4. Edge Route API Specification
Dispatch an agent tool call or inference request to the nearest available cluster:
POST /v1/agents/route HTTP/2 Host: agentcdn.xyz Authorization: Bearer ak_live_xxxx Content-Type: application/json { "agent_id": "agent-lead-01", "pop_preference": "anycast", "timeout_ms": 2500, "payload": { "tool": "database_query", "query_hash": "sha256_9b8a1c" } }
5. Zero-Trust Security Sandbox
To protect backend systems against prompt injection and malicious autonomous tool execution, AgentCDN incorporates:
- Cryptographic attestation for all agent payload hashes.
- Strict rate limiting and anomaly scoring at the Edge WAF.
- Automated TLS 1.3 encryption with ECC-384 root certificates and Ephemeral Diffie-Hellman key exchanges.