Why Detect Agents?
Before committing to full agent registration, you might want to:- Measure agent traffic - Understand how many agents are already accessing your API
- Identify frameworks - See which agent frameworks (LangChain, CrewAI, etc.) are using your service
- Plan capacity - Estimate infrastructure needs for agent workloads
- Gradual rollout - Start with detection, then enable registration once ready
Detection Architecture
AgentDoor uses a weighted signal system. Each detection signal has a confidence weight. The final classification is based on the sum of triggered signals:Detection Signals
AgentDoor analyzes 8 different signals to classify traffic:1. Self-Identification (Weight: 1.0)
The most definitive signal. Agents can self-identify via theX-Agent-Framework header:
2. User-Agent String (Weight: 0.7)
High-confidence signal. AgentDoor maintains a database of known agent framework User-Agent patterns:3. Missing Browser Headers (Weight: 0.4)
Medium-confidence signal. Browsers send dozens of headers; agents typically send only a few. Typical browser headers:4. IP Range (Weight: 0.3)
Medium-confidence signal. Agents often run from cloud providers:5. Request Timing Patterns (Weight: 0.3)
Medium-confidence signal. Agents often make requests at machine-speed intervals:6. No Cookies (Weight: 0.2)
Low-confidence signal. Browsers typically send cookies; agents often don’t:7. No Referer Header (Weight: 0.15)
Low-confidence signal. Browsers sendReferer when navigating; agents typically don’t:
8. Accept Header Pattern (Weight: 0.2)
Low-confidence signal. Browsers send complexAccept headers; agents usually request JSON directly:
Classification Threshold
Requests are classified as agent traffic when the confidence score ≥ 0.5 (50%):| Signal | Triggered | Weight | Contribution |
|---|---|---|---|
| Self-ID | ❌ | 1.0 | 0.0 |
| User-Agent | ✅ | 0.7 | 0.7 |
| Missing headers | ✅ | 0.4 | 0.4 |
| IP range | ❌ | 0.3 | 0.0 |
| Timing | ✅ | 0.3 | 0.3 |
| No cookies | ✅ | 0.2 | 0.2 |
| No referer | ✅ | 0.15 | 0.15 |
| Accept header | ✅ | 0.2 | 0.2 |
| Total | 1.95 |
1.95 / 3.25 = 0.60 → 60% confidence → Classified as agent
Using Detection in Your API
Detect-Only Mode
Start with detection before enabling full registration:Fast Detection
For high-performance use cases, useisLikelyAgent() instead of full detection:
detectAgent(): ~0.5ms (full analysis, 8 signals)isLikelyAgent(): ~0.1ms (fast path, 3 signals)
Webhook Integration
Extracting Framework Info
Get framework details from a request:Upgrade Path: Detect → Register
Start with detection, then enable full registration when ready: Phase 1: Detect-only (no auth)Type Reference
Next Steps
Payments
Integrate x402 protocol for per-request payments
How It Works
Understand the complete AgentDoor architecture