# 🔀 A3M Router

One prompt in. The right model out.

## ❌ Without A3M

#!/bin/bash
# Your LLM app today
const response = await openai.chat.completions.create({
model: "gpt-4o", // Always expensive
messages: [{ role: "user", content: "Explain quantum entanglement" }]
});
❌ Problem: $0.015 per request
❌ No fallback if OpenAI goes down
❌ Manual model selection forever

## ✅ With A3M - One Line Change

# With A3M: one line change
const response = await fetch("http://localhost:8787/v1/chat/completions", {
method: "POST",
body: JSON.stringify({
model: "auto", // ← A3M picks the best
messages: [{ role: "user", content: "Explain quantum entanglement" }]
})
});
📊 Task: explanation → Complexity: simple → Budget: minimize
✅ Routed to: Groq (FREE, 847ms)
Cost: $0.00 | Quality: 94%

## 🔄 Graceful Failover

# A3M gracefully handles provider failures...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ [Groq] — Attempting connection... [Groq] — ✗ FAILED — 503 Service Unavailable [Circuit Breaker] — Tripped after 3 failures [DeepSeek] — HEALTHY — Switching... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Response delivered via DeepSeek fallback
Your app: never knew there was a problem

## 💰 Cost Comparison

# Same query. Dramatically different costs.
WITHOUT A3M
$0.0015
GPT-4o @ $3.00/1K
WITH A3M
$0.00
Groq @ $0.00/1K
💰 SAVINGS: 100% per query
At 1000 queries/day → $1.50 saved daily
At 1000 queries/day → $547 saved yearly
Get started in 10 seconds:
npm install -g adaptive-memory-multi-model-router
# Auto-detects your API keys, zero config
npx a3m-router serve
# Change: model: 'gpt-4o' → model: 'auto'
🔗 github.com/Das-rebel/a3m-router
📦 npmjs.com/package/adaptive-memory-multi-model-router
✨ One prompt in. The right model out. ✨