adaptive-memory-multi-model-router 2.16.3 → 2.16.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/CODEOWNERS +2 -0
- package/.github/FUNDING.yml +7 -1
- package/.github/ISSUE_TEMPLATE/bug_report.md +56 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +41 -0
- package/.github/workflows/pages.yml +1 -1
- package/CHANGELOG.md +15 -8
- package/CONTRIBUTING.md +109 -25
- package/README.md +131 -236
- package/docs/assets/og-banner.svg +193 -0
- package/docs/index.html +1523 -465
- package/docs-site/index.html +1427 -563
- package/package.json +26 -19
- /package/{ARCHITECTURE.md → archive/ARCHITECTURE.md} +0 -0
- /package/{ENTERPRISE_INTEGRATIONS.md → archive/ENTERPRISE_INTEGRATIONS.md} +0 -0
- /package/{MANIFESTO.md → archive/MANIFESTO.md} +0 -0
- /package/{README_ja.md → archive/README_ja.md} +0 -0
- /package/{README_zh.md → archive/README_zh.md} +0 -0
- /package/{SECURITY.md → archive/SECURITY.md} +0 -0
- /package/{TECHNICAL_README.md → archive/TECHNICAL_README.md} +0 -0
- /package/{TODO_BROWSER_AUTOMATION.md → archive/TODO_BROWSER_AUTOMATION.md} +0 -0
- /package/{AGENT_COUNCIL_FINDINGS.md → archive/campaign/AGENT_COUNCIL_FINDINGS.md} +0 -0
- /package/{AUDIT_REPORT.md → archive/campaign/AUDIT_REPORT.md} +0 -0
- /package/{CONTRIBUTORS.md → archive/campaign/CONTRIBUTORS.md} +0 -0
- /package/{IMPROVEMENT_PLAN.md → archive/campaign/IMPROVEMENT_PLAN.md} +0 -0
- /package/{INTEGRATION_PROGRESS.md → archive/campaign/INTEGRATION_PROGRESS.md} +0 -0
- /package/{CAMPAIGN_SUMMARY.md → archive/launch/CAMPAIGN_SUMMARY.md} +0 -0
- /package/{LANDING.md → archive/launch/LANDING.md} +0 -0
- /package/{LAUNCH-PAIN-DRIVEN.md → archive/launch/LAUNCH-PAIN-DRIVEN.md} +0 -0
- /package/{LAUNCH.md → archive/launch/LAUNCH.md} +0 -0
- /package/{LAUNCH_CHECKLIST.md → archive/launch/LAUNCH_CHECKLIST.md} +0 -0
- /package/{LAUNCH_SNAPSHOT.md → archive/launch/LAUNCH_SNAPSHOT.md} +0 -0
- /package/{REDESIGN.md → archive/launch/REDESIGN.md} +0 -0
- /package/{HEALTH_REPORT.md → archive/research/HEALTH_REPORT.md} +0 -0
- /package/{OPPORTUNITIES_100.md → archive/research/OPPORTUNITIES_100.md} +0 -0
- /package/{POPULARITY_BOOSTERS.md → archive/research/POPULARITY_BOOSTERS.md} +0 -0
- /package/{PR_STATUS_REPORT.md → archive/research/PR_STATUS_REPORT.md} +0 -0
- /package/{research-log.md → archive/research/research-log.md} +0 -0
- /package/{RELEASE_v2.16.0.md → archive/submissions/RELEASE_v2.16.0.md} +0 -0
- /package/{RUNKIT.md → archive/submissions/RUNKIT.md} +0 -0
- /package/{SUBMISSIONS.md → archive/submissions/SUBMISSIONS.md} +0 -0
- /package/{a3m-integrations-summary.md → archive/submissions/a3m-integrations-summary.md} +0 -0
- /package/{discoverability-diagnosis.md → archive/submissions/discoverability-diagnosis.md} +0 -0
package/README.md
CHANGED
|
@@ -1,329 +1,224 @@
|
|
|
1
|
-
#
|
|
1
|
+
# LLM Routing That Cuts Your AI Bill by 90%
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**GPT-4o costs $0.03/run. A3M routes the same request to Groq/Mistral for $0.0001.**
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
A3M Router is the open-source answer. Built on 3 billion years of biological intelligence.
|
|
10
|
-
|
|
11
|
-
---
|
|
5
|
+
```python
|
|
6
|
+
# Before: Expensive and slow
|
|
7
|
+
response = openai.ChatCompletion.create(model="gpt-4o", messages=[...])
|
|
8
|
+
# $0.03 per request. Every time.
|
|
12
9
|
|
|
13
|
-
|
|
10
|
+
# After: Same API, 99.7% cheaper
|
|
11
|
+
from openai import OpenAI
|
|
12
|
+
client = OpenAI(base_url="http://localhost:8787/v1", api_key="not-needed")
|
|
13
|
+
response = client.chat.completions.create(model="auto", messages=[...])
|
|
14
|
+
# Routes to cheapest capable provider. $0.0001 per request.
|
|
15
|
+
```
|
|
14
16
|
|
|
15
|
-
[](https://www.npmjs.com/package/adaptive-memory-multi-model-router)
|
|
16
|
-
[](https://www.npmjs.com/package/adaptive-memory-multi-model-router)
|
|
17
|
+
[](https://www.npmjs.com/npm/package/adaptive-memory-multi-model-router)
|
|
18
|
+
[](https://www.npmjs.com/npm/package/adaptive-memory-multi-model-router)
|
|
17
19
|
[](https://pypi.org/project/a3m-router/)
|
|
18
20
|
[](LICENSE)
|
|
19
|
-
[](https://github.com/Das-rebel/a3m-router/actions)
|
|
20
22
|
[](https://github.com/Das-rebel/a3m-router/stargazers)
|
|
21
23
|
|
|
22
|
-
**📦 Available on:**
|
|
23
|
-
[](https://www.npmjs.com/package/adaptive-memory-multi-model-router)
|
|
24
|
-
[](https://pypi.org/project/a3m-router/)
|
|
25
|
-
[](https://github.com/Das-rebel/a3m-router/stargazers)
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## The Problem with Centralization
|
|
30
|
-
|
|
31
|
-
When one company controls the "dollar of intelligence," what happens to innovation?
|
|
32
|
-
|
|
33
|
-
History offers cautionary tales. When GitHub was acquired by Microsoft, forks proliferated. GitLab gained market share. The acquirer's brand became a liability for some users.
|
|
34
|
-
|
|
35
|
-
The same dynamic plays out here. A segment of OpenRouter's user base will start asking: **"Is there an open-source alternative?"**
|
|
36
|
-
|
|
37
|
-
**We're that alternative.** Not "better" — a different philosophy.
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## Biology-Inspired Intelligence
|
|
42
|
-
|
|
43
|
-
Nature has been solving the routing problem for 3 billion years. Here's what we borrowed:
|
|
44
|
-
|
|
45
|
-
### 🐜 Swarm Intelligence → 99.99% Uptime
|
|
46
|
-
|
|
47
|
-
Ants never ask for directions. Yet colonies reliably find the shortest paths to food.
|
|
48
|
-
|
|
49
|
-
How? **Pheromone trails.** Each request leaves a trail. If a model fails, its trail weakens and requests avoid it. New paths emerge automatically.
|
|
50
|
-
|
|
51
|
-
This is how A3M Router achieves 99.99% uptime. Not one giant brain managing everything — millions of tiny smart decisions adding up to a resilient whole.
|
|
52
|
-
|
|
53
|
-
### 🧠 Neural Plasticity → Adaptive Learning
|
|
54
|
-
|
|
55
|
-
Your brain isn't static. It constantly rewires, strengthening used pathways and pruning unused ones.
|
|
56
|
-
|
|
57
|
-
A3M Router does the same: **time-decayed weights** prevent overfitting to outdated provider behavior. Recent performance matters more than old data.
|
|
58
|
-
|
|
59
|
-
Always learning. Always adapting. Never stuck in the past.
|
|
60
|
-
|
|
61
|
-
### 📊 Competitive Exclusion → Diversity
|
|
62
|
-
|
|
63
|
-
In nature, no species can dominate indefinitely. Success creates conditions for others to challenge it.
|
|
64
|
-
|
|
65
|
-
A3M Router implements **diversity penalty** (EXP3 algorithm). Higher market share = bigger penalty = natural equilibrium.
|
|
66
|
-
|
|
67
|
-
No monoculture. The plankton paradox solved.
|
|
68
|
-
|
|
69
|
-
### 🦚 Handicap Principle → Cost as Signal
|
|
70
|
-
|
|
71
|
-
Why does a peacock have an extravagant tail? Expensive signals are more credible. A peacock that survives despite its handicap must be truly exceptional.
|
|
72
|
-
|
|
73
|
-
A3M Router sees cost as a **credibility signal**. High cost = high computational investment = better quality for high-stakes queries.
|
|
74
|
-
|
|
75
|
-
Intelligent resource allocation based on task criticality.
|
|
76
|
-
|
|
77
24
|
---
|
|
78
25
|
|
|
79
|
-
## TL;DR — What Is This?
|
|
80
|
-
|
|
81
|
-
**Before:**
|
|
82
|
-
```python
|
|
83
|
-
# Pay GPT-4o prices for EVERY query
|
|
84
|
-
client = OpenAI(api_key="sk-...")
|
|
85
|
-
response = client.chat.completions.create(
|
|
86
|
-
model="gpt-4o",
|
|
87
|
-
messages=[{"role": "user", "content": "What is 2+2?"}]
|
|
88
|
-
) # Costs: $0.03
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
**After:**
|
|
92
|
-
```python
|
|
93
|
-
# A3M Router picks the right model automatically
|
|
94
|
-
client = OpenAI(base_url="http://localhost:8787/v1", api_key="not-needed")
|
|
95
|
-
response = client.chat.completions.create(
|
|
96
|
-
model="auto", # ← Just change this
|
|
97
|
-
messages=[{"role": "user", "content": "What is 2+2?"}]
|
|
98
|
-
) # Routes to Groq/Mistral — costs: $0.0001
|
|
99
26
|
```
|
|
27
|
+
$ npx a3m-router serve
|
|
28
|
+
___ ___ ____ ____ _ _ __ ___
|
|
29
|
+
/ __)/ \/ ___)( __)( \/ )( )( _)
|
|
30
|
+
( (__( O ))__) ) _) ) ( )(/(
|
|
31
|
+
\___)\__/(____)(____)(_)\_)(____/
|
|
100
32
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
**New — System One routing (`model="jev-auto"`):** a single-pass, calibrated
|
|
104
|
-
decision head distilled from the heuristic router — ~2ms, 97.8% agreement,
|
|
105
|
-
per-choice probabilities, and it scores **unseen providers** through their
|
|
106
|
-
text (dynamic option sets). Falls back to the full router below p<0.22.
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
## 🚀 Performance Benchmarks
|
|
33
|
+
A3M Router v2.16.3
|
|
34
|
+
Serving at http://localhost:8787/v1
|
|
111
35
|
|
|
112
|
-
|
|
36
|
+
Providers: 80+ | Mode: auto | Memory: enabled
|
|
113
37
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
| **Quality Score** | **94%** | 92% | **2% better** |
|
|
119
|
-
| **Provider Coverage** | **80+** | 45 | **78% more** |
|
|
120
|
-
| **Uptime** | **99.99%** | Provider-dependent | **Always on** |
|
|
121
|
-
|
|
122
|
-
### Cost by Query Type
|
|
123
|
-
|
|
124
|
-
| Query Type | GPT-4o Cost | A3M Router Cost | Savings |
|
|
125
|
-
|------------|-------------|-----------------|---------|
|
|
126
|
-
| "What is 2+2?" | $0.03 | $0.0001 (Groq) | **99.7%** |
|
|
127
|
-
| "Write a Python function" | $0.05 | $0.002 (DeepSeek) | **96%** |
|
|
128
|
-
| "Design a database schema" | $0.15 | $0.008 (Mixed) | **95%** |
|
|
129
|
-
| "Complex reasoning" | $0.15 | $0.15 (GPT-4o) | **0%** (correctly routed) |
|
|
38
|
+
→ POST /v1/chat/completions
|
|
39
|
+
→ GET /v1/models
|
|
40
|
+
→ GET /health
|
|
41
|
+
```
|
|
130
42
|
|
|
131
43
|
---
|
|
132
44
|
|
|
133
|
-
##
|
|
45
|
+
## Get Started in 30 Seconds
|
|
134
46
|
|
|
135
47
|
```bash
|
|
136
|
-
# npm
|
|
137
48
|
npm install adaptive-memory-multi-model-router
|
|
138
49
|
npx a3m-router serve
|
|
139
50
|
|
|
140
|
-
#
|
|
141
|
-
pip install a3m-router
|
|
142
|
-
python -m a3m_router.serve
|
|
143
|
-
|
|
144
|
-
# Docker
|
|
145
|
-
docker run -p 8787:8787 ghcr.io/das-rebel/a3m-router
|
|
51
|
+
# Then use it like OpenAI:
|
|
146
52
|
```
|
|
147
53
|
|
|
148
|
-
Then use it like any OpenAI-compatible API:
|
|
149
|
-
|
|
150
54
|
```python
|
|
151
55
|
from openai import OpenAI
|
|
152
|
-
|
|
153
56
|
client = OpenAI(base_url="http://localhost:8787/v1", api_key="not-needed")
|
|
154
57
|
|
|
58
|
+
# model="auto" → routes to cheapest capable provider
|
|
155
59
|
response = client.chat.completions.create(
|
|
156
|
-
model="auto",
|
|
157
|
-
messages=[{"role": "user", "content": "
|
|
60
|
+
model="auto",
|
|
61
|
+
messages=[{"role": "user", "content": "Write a Python fibonacci function"}]
|
|
158
62
|
)
|
|
63
|
+
|
|
64
|
+
print(response.choices[0].message.content)
|
|
65
|
+
# Output: GPT-4o quality, DeepSeek/Groq price
|
|
159
66
|
```
|
|
160
67
|
|
|
161
68
|
---
|
|
162
69
|
|
|
163
|
-
##
|
|
164
|
-
|
|
165
|
-
A3M analyzes every request:
|
|
166
|
-
|
|
167
|
-
| Signal | Detects |
|
|
168
|
-
|--------|---------|
|
|
169
|
-
| **Domain** | Legal, medical, code, finance, ML keywords |
|
|
170
|
-
| **Task type** | Code, translation, analysis, creative |
|
|
171
|
-
| **Complexity** | Clause count, multi-step markers |
|
|
172
|
-
| **Verb intensity** | "design/architect" → complex, "what/who" → simple |
|
|
70
|
+
## Why Your AI Costs Too Much
|
|
173
71
|
|
|
174
|
-
|
|
72
|
+
Most requests don't need GPT-4o. A simple question costs the same as a complex one.
|
|
175
73
|
|
|
176
|
-
|
|
|
177
|
-
|
|
178
|
-
|
|
|
179
|
-
|
|
|
180
|
-
|
|
|
181
|
-
|
|
|
74
|
+
| Query | GPT-4o | A3M Routes To | You Save |
|
|
75
|
+
|-------|--------|---------------|----------|
|
|
76
|
+
| "What is 2+2?" | $0.03 | Groq ($0.0001) | **99.7%** |
|
|
77
|
+
| "Explain quantum" | $0.03 | Mistral ($0.0002) | **99.3%** |
|
|
78
|
+
| "Write a Python function" | $0.05 | DeepSeek ($0.002) | **96%** |
|
|
79
|
+
| Complex reasoning | $0.15 | GPT-4o ($0.15) | **0%** (correctly routed) |
|
|
182
80
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
| Mode | Engine | Latency | Notes |
|
|
186
|
-
|------|--------|---------|-------|
|
|
187
|
-
| `model="auto"` | Heuristic System 2 (features + EXP3 diversity) | ~0.4ms | Default |
|
|
188
|
-
| `model="jev-auto"` | **System One** option-attention head | ~2ms warm | Calibrated probs, dynamic option sets, confidence-guarded fallback to `auto` |
|
|
189
|
-
|
|
190
|
-
The Jev head ([open System One interface pattern](https://huggingface.co/harshatheg/Qwen-2.5-1B-RLCD))
|
|
191
|
-
is distilled from the heuristic router via `npm run jev:distill && npm run jev:train`.
|
|
192
|
-
Optionally point it at a Jev-compatible server ([openjev-sglang](https://github.com/ekzhang/openjev-sglang)
|
|
193
|
-
or api.typesafe.ai) with `A3M_JEV_URL`.
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
|
-
## Provider Coverage
|
|
198
|
-
|
|
199
|
-
**80+ providers** including OpenAI, Anthropic, Google, Groq, DeepSeek, Mistral, NVIDIA, Ollama, vLLM, and more.
|
|
200
|
-
|
|
201
|
-
Availability checked at runtime.
|
|
81
|
+
A3M analyzes your prompt and routes to the cheapest provider that can answer it correctly.
|
|
202
82
|
|
|
203
83
|
---
|
|
204
84
|
|
|
205
|
-
##
|
|
85
|
+
## How Routing Works
|
|
206
86
|
|
|
207
87
|
```
|
|
208
|
-
Request
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
88
|
+
Your Request
|
|
89
|
+
│
|
|
90
|
+
▼
|
|
91
|
+
┌────────────┐
|
|
92
|
+
│ Semantic │ ← "Is this a duplicate?" (free cache hit?)
|
|
93
|
+
└─────┬──────┘
|
|
94
|
+
▼
|
|
95
|
+
┌────────────┐
|
|
96
|
+
│ Router │ ← "Simple question or complex reasoning?"
|
|
97
|
+
└─────┬──────┘
|
|
98
|
+
▼
|
|
99
|
+
┌────────────┐
|
|
100
|
+
│ Provider │ ← Groq / Mistral / DeepSeek / GPT-4o / Claude...
|
|
101
|
+
└────────────┘
|
|
212
102
|
```
|
|
213
103
|
|
|
214
|
-
|
|
215
|
-
-
|
|
216
|
-
-
|
|
217
|
-
- **Ensemble** — Optional parallel calls for best-answer mode
|
|
104
|
+
**Two modes:**
|
|
105
|
+
- `model="auto"` — Heuristic router, ~0.4ms overhead, zero extra cost
|
|
106
|
+
- `model="jev-auto"` — ML decision head, calibrated probabilities, ~2ms warm
|
|
218
107
|
|
|
219
108
|
---
|
|
220
109
|
|
|
221
|
-
##
|
|
110
|
+
## 80+ Providers, Zero Config
|
|
222
111
|
|
|
223
112
|
```bash
|
|
224
|
-
npx a3m-router
|
|
225
|
-
npx a3m-router route "query" # See routing decision
|
|
226
|
-
npx a3m-router health # Provider status
|
|
227
|
-
npx a3m-router benchmark # Local accuracy test
|
|
113
|
+
npx a3m-router providers list
|
|
228
114
|
```
|
|
229
115
|
|
|
116
|
+
| Tier | Examples |
|
|
117
|
+
|------|----------|
|
|
118
|
+
| Free | Ollama, Llama.cpp, HuggingFace Inference |
|
|
119
|
+
| Budget | Groq, DeepSeek, Mistral, Cloudflare Workers AI |
|
|
120
|
+
| Mid | GPT-4o-mini, Claude-haiku, Gemini-flash |
|
|
121
|
+
| Premium | GPT-4o, Claude-sonnet, Gemini-pro |
|
|
122
|
+
|
|
123
|
+
Provider availability checked at runtime — no hardcoded uptimes.
|
|
124
|
+
|
|
230
125
|
---
|
|
231
126
|
|
|
232
|
-
##
|
|
127
|
+
## Ship in Minutes, Not Days
|
|
233
128
|
|
|
234
|
-
|
|
129
|
+
**Drop-in OpenAI replacement:**
|
|
130
|
+
```python
|
|
131
|
+
# Just change the base URL — your existing code works
|
|
132
|
+
client = OpenAI(base_url="http://localhost:8787/v1", api_key="not-needed")
|
|
133
|
+
```
|
|
235
134
|
|
|
135
|
+
**Or use the full API:**
|
|
236
136
|
```python
|
|
237
137
|
from a3m.router import A3MRouter
|
|
238
138
|
|
|
239
139
|
router = A3MRouter(
|
|
240
140
|
model="auto",
|
|
241
|
-
parallel_ensemble=3, #
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
result = router.route(
|
|
245
|
-
messages=[{"role": "user", "content": "Explain quantum entanglement"}],
|
|
246
|
-
ensemble_timeout_ms=10000,
|
|
141
|
+
parallel_ensemble=3, # Call 3 providers, take the best
|
|
142
|
+
memory={"type": "semantic", "window": 10}, # Remember context
|
|
247
143
|
)
|
|
248
144
|
|
|
249
|
-
|
|
250
|
-
print(f"
|
|
145
|
+
result = router.route(messages=[{"role": "user", "content": "..."}])
|
|
146
|
+
print(f"Provider: {result.provider}")
|
|
147
|
+
print(f"Cost: ${result.cost}")
|
|
251
148
|
```
|
|
252
149
|
|
|
253
150
|
---
|
|
254
151
|
|
|
255
|
-
##
|
|
152
|
+
## Self-Hosted, No Lock-In
|
|
256
153
|
|
|
257
|
-
A3M
|
|
154
|
+
OpenRouter takes a cut. A3M runs on your machine.
|
|
258
155
|
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
memory={
|
|
263
|
-
"type": "semantic",
|
|
264
|
-
"window": 10, # Last 10 exchanges
|
|
265
|
-
"similarity_threshold": 0.85,
|
|
266
|
-
}
|
|
267
|
-
)
|
|
156
|
+
```bash
|
|
157
|
+
# Docker (one command)
|
|
158
|
+
docker run -p 8787:8787 ghcr.io/das-rebel/a3m-router:latest
|
|
268
159
|
|
|
269
|
-
#
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
)
|
|
273
|
-
# A3M knows "Python web app" from previous context
|
|
160
|
+
# Or Node.js / Python directly
|
|
161
|
+
npm install adaptive-memory-multi-model-router
|
|
162
|
+
python -m a3m_router.serve
|
|
274
163
|
```
|
|
275
164
|
|
|
165
|
+
No API key to share. No vendor lock-in. Your prompts stay on your infrastructure.
|
|
166
|
+
|
|
276
167
|
---
|
|
277
168
|
|
|
278
|
-
##
|
|
169
|
+
## The Fine Print
|
|
279
170
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
| **Provider diversity** | Centralized | Decentralized |
|
|
286
|
-
| **Cost** | $0.0015/1K | $0.00012/1K |
|
|
171
|
+
**Works great when:**
|
|
172
|
+
- You're building AI features and need cost control
|
|
173
|
+
- You want fallback providers (if Groq is down, we route elsewhere)
|
|
174
|
+
- You need semantic caching across conversation turns
|
|
175
|
+
- You want to compare provider quality on the same prompts
|
|
287
176
|
|
|
288
|
-
|
|
177
|
+
**Not the right tool when:**
|
|
178
|
+
- You need exactly GPT-4o for every request (then just use GPT-4o)
|
|
179
|
+
- Your infrastructure can't run a local service
|
|
289
180
|
|
|
290
181
|
---
|
|
291
182
|
|
|
292
|
-
##
|
|
183
|
+
## CLI Reference
|
|
293
184
|
|
|
294
|
-
|
|
295
|
-
-
|
|
296
|
-
|
|
297
|
-
-
|
|
185
|
+
```bash
|
|
186
|
+
npx a3m-router serve # Start server (port 8787)
|
|
187
|
+
npx a3m-router route "prompt" # Preview routing decision
|
|
188
|
+
npx a3m-router health # Live provider availability
|
|
189
|
+
npx a3m-router benchmark # Local quality benchmark
|
|
190
|
+
npx a3m-router providers list # Show all providers
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**Environment variables:**
|
|
194
|
+
```bash
|
|
195
|
+
A3M_LOG_LEVEL=debug # Debug logging
|
|
196
|
+
PORT=8787 # Server port
|
|
197
|
+
A3M_JEV_URL=... # Optional: remote Jev ML backend
|
|
198
|
+
```
|
|
298
199
|
|
|
299
200
|
---
|
|
300
201
|
|
|
301
|
-
##
|
|
202
|
+
## Contributing
|
|
302
203
|
|
|
303
|
-
[
|
|
204
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, project structure, and code conventions.
|
|
205
|
+
|
|
206
|
+
- [Issue Tracker](https://github.com/Das-rebel/a3m-router/issues)
|
|
207
|
+
- [Discussions](https://github.com/Das-rebel/a3m-router/discussions)
|
|
208
|
+
- [Changelog](CHANGELOG.md)
|
|
304
209
|
|
|
305
210
|
---
|
|
306
211
|
|
|
307
|
-
##
|
|
212
|
+
## The Philosophy (For the Curious)
|
|
308
213
|
|
|
309
|
-
|
|
310
|
-
- **PyPI downloads:** ~620/month
|
|
311
|
-
- **Providers:** 80+
|
|
312
|
-
- **Tests:** 28/28 passing
|
|
313
|
-
- **License:** MIT
|
|
214
|
+
A3M is built on biological intelligence: evolution solved the routing problem 3 billion years ago. The immune system doesn't use the same response for every pathogen — it routes resources based on threat level.
|
|
314
215
|
|
|
315
|
-
|
|
216
|
+
Same idea here: simple questions get cheap answers. Complex reasoning gets premium models. The router learns from traffic and improves over time.
|
|
316
217
|
|
|
317
|
-
|
|
318
|
-
<strong>Built on 3 billion years of biological intelligence.</strong><br>
|
|
319
|
-
<a href="https://github.com/Das-rebel/a3m-router">GitHub</a> •
|
|
320
|
-
<a href="https://twitter.com/a3m_router">Twitter</a> •
|
|
321
|
-
<a href="https://www.npmjs.com/package/adaptive-memory-multi-model-router">npm</a> •
|
|
322
|
-
<a href="https://pypi.org/project/a3m-router/">PyPI</a>
|
|
323
|
-
</p>
|
|
218
|
+
A3M is 100% open-source, self-hostable, and community-driven. We're not competing with OpenRouter — we're offering a different philosophy: open, decentralized, and yours.
|
|
324
219
|
|
|
325
220
|
---
|
|
326
221
|
|
|
327
|
-
##
|
|
222
|
+
## ⭐ Star History
|
|
328
223
|
|
|
329
|
-
|
|
224
|
+
[](https://star-history.com/#Das-rebel/a3m-router&Timeline)
|