adaptive-memory-multi-model-router 2.15.4 → 2.15.5
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/workflows/adapters-ci.yml +142 -0
- package/.github/workflows/ci.yml +2 -5
- package/.github/workflows/pypi-publish.yml +102 -0
- package/AGENT_COUNCIL_FINDINGS.md +123 -98
- package/CAMPAIGN_SUMMARY.md +87 -0
- package/CHANGELOG.md +7 -1
- package/ENTERPRISE_INTEGRATIONS.md +94 -0
- package/INTEGRATION_PROGRESS.md +96 -0
- package/OPPORTUNITIES_100.md +277 -0
- package/POPULARITY_BOOSTERS.md +1 -1
- package/README.md +137 -142
- package/README_ja.md +17 -21
- package/README_zh.md +13 -17
- package/TODO_BROWSER_AUTOMATION.md +87 -0
- package/a3m-integrations-summary.md +73 -0
- package/adapters/a3m_adapter/__init__.py +39 -3
- package/adapters/a3m_adapter/adapter/__init__.py +16 -1
- package/adapters/a3m_adapter/adapter/autogen.py +169 -0
- package/adapters/a3m_adapter/adapter/haystack.py +197 -0
- package/adapters/a3m_adapter/adapter/langgraph.py +196 -0
- package/adapters/a3m_adapter/adapter/pinecone.py +217 -0
- package/adapters/a3m_adapter/adapter/vercel.py +188 -0
- package/adapters/a3m_adapter/tests/test_adapters.py +29 -31
- package/adapters/a3m_adapter/tests/test_integration.py +80 -0
- package/adapters/requirements-dev.txt +6 -0
- package/adapters/requirements.txt +4 -0
- package/apps/cost-calculator/README.md +72 -0
- package/apps/cost-calculator/calculator.css +280 -0
- package/apps/cost-calculator/calculator.js +150 -0
- package/apps/cost-calculator/index.html +321 -0
- package/apps/cost-calculator/package.json +13 -0
- package/articles/ANNOUNCEMENT_reddit_ml.md +76 -0
- package/articles/ANNOUNCEMENT_vc/347/244/276/345/214/272.md +71 -0
- package/articles/ANNOUNCEMENT_vercel.md +85 -0
- package/articles/CHINESE_DIRECTORIES.md +2 -2
- package/articles/CHINESE_SUBMISSIONS_READY.md +5 -5
- package/articles/HN_POST_READY.md +16 -20
- package/articles/INDIEHACKERS_READY.md +19 -34
- package/demo.py +251 -0
- package/dist/analytics/costAnalytics.d.ts +0 -1
- package/dist/benchmark/reproducible.d.ts +0 -1
- package/dist/cache/semanticCache.d.ts +0 -1
- package/dist/cost/budgetEnforcer.d.ts +0 -1
- package/dist/cost/costTracker.d.ts +0 -1
- package/dist/ensemble/multiRoundDialog.d.ts +0 -1
- package/dist/ensemble/shapleyValue.d.ts +0 -1
- package/dist/ensemble.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/integrations/oauth.d.ts +0 -1
- package/dist/integrations/scienceAdapter.d.ts +0 -1
- package/dist/memory/autoFetch.d.ts +0 -1
- package/dist/memory/hybridMemory.d.ts +0 -1
- package/dist/memory/memoryTree.d.ts +0 -1
- package/dist/memory/obsidianVault.d.ts +0 -1
- package/dist/memory/reasoningBank.d.ts +0 -1
- package/dist/observability/changeWatch.d.ts +0 -1
- package/dist/observability/fatigueDetector.d.ts +0 -1
- package/dist/observability/index.d.ts +0 -1
- package/dist/observability/metrics.d.ts +0 -1
- package/dist/observability/middleware.d.ts +0 -1
- package/dist/observability/tracer.d.ts +0 -1
- package/dist/observability/types.d.ts +0 -1
- package/dist/providers/providerConfig.d.ts +5 -2
- package/dist/providers/providerConfig.js +1006 -1
- package/dist/providers/providerConfig.js.map +1 -1
- package/dist/routing/advancedRouter.d.ts +1 -2
- package/dist/routing/advancedRouter.js +84 -0
- package/dist/routing/advancedRouter.js.map +1 -1
- package/dist/routing/crossModelValidation.d.ts +0 -1
- package/dist/routing/providerHealth.d.ts +77 -2
- package/dist/routing/providerHealth.js +190 -4
- package/dist/routing/providerHealth.js.map +1 -1
- package/dist/routing/providerRetry.d.ts +0 -1
- package/dist/routing/shadowSampler.d.ts +187 -0
- package/dist/routing/shadowSampler.js +306 -0
- package/dist/routing/shadowSampler.js.map +1 -0
- package/dist/sdk.d.ts +0 -1
- package/dist/security/guardrails.d.ts +0 -1
- package/dist/server/dashboard.d.ts +0 -1
- package/dist/server/handlers/chatHandler.d.ts +0 -1
- package/dist/server/handlers/completionsHandler.d.ts +0 -1
- package/dist/server/handlers/embeddingsHandler.d.ts +0 -1
- package/dist/server/handlers/healthHandler.d.ts +0 -1
- package/dist/server/handlers/metricsHandler.d.ts +0 -1
- package/dist/server/handlers/modelsHandler.d.ts +0 -1
- package/dist/server/metrics.d.ts +0 -1
- package/dist/server/modelMapper.d.ts +0 -1
- package/dist/server/proxyServer.d.ts +0 -1
- package/dist/server/router.d.ts +0 -1
- package/dist/server/state.d.ts +0 -1
- package/dist/tui/dashboard.d.ts +0 -1
- package/dist/utils/costUtils.d.ts +0 -1
- package/dist/utils/sorting.d.ts +0 -1
- package/dist/utils/tokenUtils.d.ts +0 -1
- package/docker-compose.yml +84 -60
- package/docs/comparison.md +2 -2
- package/docs/llms-full.txt +89 -0
- package/docs/llms.txt +25 -67
- package/docs-site/index.html +9 -9
- package/integrations/browser-use/README.md +155 -0
- package/integrations/browser-use/examples/form-filling.ts +179 -0
- package/integrations/browser-use/index.ts +145 -0
- package/integrations/browser-use/package.json +34 -0
- package/integrations/browser-use/tsconfig.json +17 -0
- package/integrations/mcp-browser/README.md +177 -0
- package/integrations/mcp-browser/package.json +38 -0
- package/integrations/mcp-browser/src/index.ts +297 -0
- package/integrations/sota-browser/README.md +191 -0
- package/integrations/sota-browser/package.json +34 -0
- package/llms-full.txt +6 -6
- package/llms.txt +25 -67
- package/package.json +34 -5
- package/packages/a3m-vercel-ai/README.md +161 -0
- package/packages/a3m-vercel-ai/dist/a3m-language-model.d.ts +12 -0
- package/packages/a3m-vercel-ai/dist/a3m-language-model.d.ts.map +1 -0
- package/packages/a3m-vercel-ai/dist/a3m-language-model.js +289 -0
- package/packages/a3m-vercel-ai/dist/a3m-language-model.js.map +1 -0
- package/packages/a3m-vercel-ai/dist/index.d.ts +82 -0
- package/packages/a3m-vercel-ai/dist/index.d.ts.map +1 -0
- package/packages/a3m-vercel-ai/dist/index.js +79 -0
- package/packages/a3m-vercel-ai/dist/index.js.map +1 -0
- package/packages/a3m-vercel-ai/dist/types.d.ts +97 -0
- package/packages/a3m-vercel-ai/dist/types.d.ts.map +1 -0
- package/packages/a3m-vercel-ai/dist/types.js +5 -0
- package/packages/a3m-vercel-ai/dist/types.js.map +1 -0
- package/packages/a3m-vercel-ai/package-lock.json +969 -0
- package/packages/a3m-vercel-ai/package.json +46 -0
- package/packages/a3m-vercel-ai/src/a3m-language-model.ts +381 -0
- package/packages/a3m-vercel-ai/src/index.ts +104 -0
- package/packages/a3m-vercel-ai/src/types.ts +116 -0
- package/packages/a3m-vercel-ai/tsconfig.json +20 -0
- package/packages/agentkit-adapter/LICENSE +21 -0
- package/packages/agentkit-adapter/README.md +126 -0
- package/packages/agentkit-adapter/examples/agentkit-example.ts +139 -0
- package/packages/agentkit-adapter/package.json +57 -0
- package/packages/agentkit-adapter/src/adapter.ts +381 -0
- package/packages/agentkit-adapter/src/index.ts +36 -0
- package/packages/agentkit-adapter/src/types.ts +105 -0
- package/packages/agentkit-adapter/src/util.ts +13 -0
- package/packages/agentkit-adapter/tsconfig.json +22 -0
- package/prometheus.yml +8 -0
- package/python/README.md +92 -65
- package/python/a3m/__init__.py +32 -3
- package/python/a3m/adapters/__init__.py +21 -0
- package/python/a3m/adapters/langchain.py +190 -0
- package/python/a3m/adapters/llamaindex.py +249 -0
- package/python/a3m/adapters/qdrant.py +240 -0
- package/python/a3m/adapters/weaviate.py +263 -0
- package/python/a3m/client.py +5 -0
- package/python/a3m_router.egg-info/PKG-INFO +172 -0
- package/python/a3m_router.egg-info/SOURCES.txt +17 -0
- package/python/a3m_router.egg-info/dependency_links.txt +1 -0
- package/python/a3m_router.egg-info/requires.txt +24 -0
- package/python/a3m_router.egg-info/top_level.txt +1 -0
- package/python/build_verify.sh +32 -0
- package/python/dist/a3m_router-2.2.1-py3-none-any.whl +0 -0
- package/python/dist/a3m_router-2.2.1.tar.gz +0 -0
- package/python/dist/a3m_router-2.2.2-py3-none-any.whl +0 -0
- package/python/dist/a3m_router-2.2.2.tar.gz +0 -0
- package/python/mcp-server/README.md +172 -0
- package/python/mcp-server/a3m_mcp/__init__.py +15 -0
- package/python/mcp-server/a3m_mcp/__main__.py +15 -0
- package/python/mcp-server/a3m_mcp/server.py +339 -0
- package/python/mcp-server/pyproject.toml +24 -0
- package/python/pyproject.toml +56 -5
- package/python/setup.py +3 -28
- package/src/providers/providerConfig.ts +1053 -1
- package/summary.txt +38 -0
- package/tsconfig.build.json +1 -2
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -94
- package/.github/ISSUE_TEMPLATE/config.yml +0 -17
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -71
- package/.well-known/ai-plugin.json +0 -16
package/README.md
CHANGED
|
@@ -28,8 +28,6 @@ response = client.chat.completions.create(
|
|
|
28
28
|
) # Routes to Groq/Mistral — costs: $0.0001
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
**Result:** Simple questions cost 300x less. Complex queries still go to premium models when needed.
|
|
32
|
-
|
|
33
31
|
---
|
|
34
32
|
|
|
35
33
|
## Why A3M Router?
|
|
@@ -43,6 +41,23 @@ response = client.chat.completions.create(
|
|
|
43
41
|
|
|
44
42
|
---
|
|
45
43
|
|
|
44
|
+
## Framework Adapters
|
|
45
|
+
|
|
46
|
+
A3M Router has drop-in adapters for **8 major frameworks**:
|
|
47
|
+
|
|
48
|
+
| Framework | Adapter | Example |
|
|
49
|
+
|-----------|---------|---------|
|
|
50
|
+
| **LangChain** | `A3MLangChainAdapter` | `pip install adapters/langchain` |
|
|
51
|
+
| **LlamaIndex** | `A3MLlamaIndexAdapter` | `pip install adapters/llamaindex` |
|
|
52
|
+
| **AutoGen** | `A3MAutoGenAdapter` | Multi-agent conversations |
|
|
53
|
+
| **Vercel AI SDK** | `A3MVercelAdapter` | Next.js apps |
|
|
54
|
+
| **Haystack** | `A3MHaystackAdapter` | RAG pipelines |
|
|
55
|
+
| **Pinecone** | `A3MPineconeAdapter` | Vector search + RAG |
|
|
56
|
+
| **LangGraph** | `A3MLangGraphAdapter` | Stateful agents |
|
|
57
|
+
| **CrewAI** | `A3MCompletion` | Multi-agent systems |
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
46
61
|
## Quick Start
|
|
47
62
|
|
|
48
63
|
```bash
|
|
@@ -53,138 +68,161 @@ npm install adaptive-memory-multi-model-router
|
|
|
53
68
|
npx a3m-router serve
|
|
54
69
|
```
|
|
55
70
|
|
|
56
|
-
|
|
71
|
+
---
|
|
57
72
|
|
|
58
|
-
|
|
59
|
-
from openai import OpenAI
|
|
73
|
+
## Installation
|
|
60
74
|
|
|
61
|
-
|
|
75
|
+
### Python Adapters
|
|
76
|
+
```bash
|
|
77
|
+
pip install adapters/
|
|
78
|
+
```
|
|
62
79
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
80
|
+
### Docker
|
|
81
|
+
```bash
|
|
82
|
+
docker-compose up -d
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### npm
|
|
86
|
+
```bash
|
|
87
|
+
npm install adaptive-memory-multi-model-router
|
|
68
88
|
```
|
|
69
89
|
|
|
70
90
|
---
|
|
71
91
|
|
|
72
|
-
##
|
|
92
|
+
## Framework Examples
|
|
73
93
|
|
|
74
|
-
|
|
94
|
+
### LangChain
|
|
95
|
+
```python
|
|
96
|
+
from a3m_adapter import A3MLangChainAdapter
|
|
97
|
+
|
|
98
|
+
llm = A3MLangChainAdapter(model="auto", temperature=0.7)
|
|
99
|
+
result = llm.invoke("What is retrieval-augmented generation?")
|
|
100
|
+
```
|
|
75
101
|
|
|
102
|
+
### LlamaIndex
|
|
76
103
|
```python
|
|
77
|
-
from
|
|
104
|
+
from a3m_adapter import A3MLlamaIndexAdapter
|
|
78
105
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
)
|
|
106
|
+
llm = A3MLlamaIndexAdapter(model="auto")
|
|
107
|
+
response = llm.complete("Explain transformer architecture")
|
|
108
|
+
```
|
|
83
109
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
)
|
|
110
|
+
### AutoGen (Microsoft)
|
|
111
|
+
```python
|
|
112
|
+
from a3m_adapter import A3MAutoGenAdapter
|
|
88
113
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
114
|
+
llm = A3MAutoGenAdapter(model="auto", parallel_ensemble=2)
|
|
115
|
+
|
|
116
|
+
config = llm.create_agent_config()
|
|
117
|
+
assistant = ConversableAgent(name="assistant", llm_config=config)
|
|
93
118
|
```
|
|
94
119
|
|
|
95
|
-
|
|
120
|
+
### Vercel AI SDK
|
|
96
121
|
```python
|
|
97
|
-
|
|
98
|
-
ensemble_result = router.route(
|
|
99
|
-
messages=[{"role": "user", "content": prompt}],
|
|
100
|
-
ensemble_config={
|
|
101
|
-
"providers": ["groq", "openai", "deepseek"],
|
|
102
|
-
"timeout_ms": 15000,
|
|
103
|
-
"score_weights": {"relevance": 0.4, "conciseness": 0.3, "accuracy": 0.3}
|
|
104
|
-
}
|
|
105
|
-
)
|
|
122
|
+
from a3m_adapter import A3MVercelAdapter, createA3MProvider
|
|
106
123
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
124
|
+
result = await generateText({
|
|
125
|
+
model: createA3MProvider({"model": "auto", "parallel_ensemble": 2}),
|
|
126
|
+
prompt: "What is 2+2?",
|
|
127
|
+
})
|
|
110
128
|
```
|
|
111
129
|
|
|
112
|
-
|
|
130
|
+
### Haystack (RAG)
|
|
131
|
+
```python
|
|
132
|
+
from a3m_adapter import A3MHaystackAdapter
|
|
113
133
|
|
|
114
|
-
|
|
134
|
+
adapter = A3MHaystackAdapter(model="auto")
|
|
135
|
+
result = adapter.predict(query="What is AI?", documents=retrieved_docs)
|
|
136
|
+
```
|
|
115
137
|
|
|
116
|
-
|
|
138
|
+
### Pinecone (Vector Search)
|
|
139
|
+
```python
|
|
140
|
+
from a3m_adapter import A3MPineconeAdapter
|
|
141
|
+
|
|
142
|
+
adapter = A3MPineconeAdapter(model="auto")
|
|
143
|
+
embedding = adapter.embed_query("What is quantum computing?")
|
|
144
|
+
|
|
145
|
+
results = index.query(vector=embedding, top_k=5)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### LangGraph (Stateful Agents)
|
|
149
|
+
```python
|
|
150
|
+
from a3m_adapter import A3MLangGraphAdapter
|
|
151
|
+
|
|
152
|
+
adapter = A3MLangGraphAdapter(model="auto", parallel_ensemble=2)
|
|
153
|
+
agent = create_react_agent(adapter, tools=[...])
|
|
154
|
+
|
|
155
|
+
result = agent.invoke({"messages": [{"role": "user", "content": "Hello"}]})
|
|
156
|
+
```
|
|
117
157
|
|
|
158
|
+
### CrewAI (Multi-Agent)
|
|
118
159
|
```python
|
|
119
|
-
from crewai import Agent, Task, Crew
|
|
120
160
|
from crewai.llms import A3MCompletion
|
|
121
161
|
|
|
122
|
-
# Research agent — needs factual accuracy
|
|
123
162
|
researcher = Agent(
|
|
124
|
-
role="
|
|
163
|
+
role="Researcher",
|
|
125
164
|
goal="Find accurate information",
|
|
126
|
-
|
|
127
|
-
llm=A3MCompletion(model="auto", temperature=0.3),
|
|
165
|
+
llm=A3MCompletion(model="auto"),
|
|
128
166
|
)
|
|
129
167
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
goal="Create engaging content",
|
|
134
|
-
backstory="Creative writer",
|
|
135
|
-
llm=A3MCompletion(model="auto", temperature=0.9),
|
|
136
|
-
)
|
|
168
|
+
crew = Crew(agents=[researcher], tasks=[task])
|
|
169
|
+
result = crew.kickoff()
|
|
170
|
+
```
|
|
137
171
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
goal="Ensure quality",
|
|
142
|
-
backstory="Detail editor",
|
|
143
|
-
llm=A3MCompletion(model="auto", temperature=0.5),
|
|
144
|
-
)
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Parallel Ensemble — Best Answer, Any Provider
|
|
145
175
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
176
|
+
Need the best answer regardless of cost? Call multiple providers in parallel:
|
|
177
|
+
|
|
178
|
+
```python
|
|
179
|
+
from a3m.router import A3MRouter
|
|
180
|
+
|
|
181
|
+
router = A3MRouter(
|
|
182
|
+
model="auto",
|
|
183
|
+
parallel_ensemble=3, # ← Call 3 providers simultaneously
|
|
151
184
|
)
|
|
152
185
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
186
|
+
result = router.route(
|
|
187
|
+
messages=[{"role": "user", "content": "Explain quantum entanglement"}],
|
|
188
|
+
ensemble_config={
|
|
189
|
+
"providers": ["groq", "openai", "deepseek"],
|
|
190
|
+
"timeout_ms": 15000,
|
|
191
|
+
"score_weights": {"relevance": 0.4, "conciseness": 0.3, "accuracy": 0.3}
|
|
192
|
+
}
|
|
158
193
|
)
|
|
159
194
|
|
|
160
|
-
|
|
195
|
+
print(f"Best answer from: {result.provider}")
|
|
196
|
+
print(f"Response: {result.content}")
|
|
197
|
+
print(f"All scores: {result.scores}")
|
|
161
198
|
```
|
|
162
199
|
|
|
163
200
|
---
|
|
164
201
|
|
|
165
|
-
##
|
|
202
|
+
## Memory & Context
|
|
166
203
|
|
|
167
|
-
|
|
204
|
+
A3M Router includes **semantic memory** capabilities:
|
|
168
205
|
|
|
169
206
|
```python
|
|
170
|
-
|
|
171
|
-
from a3m_adapter import A3MLangChainAdapter
|
|
172
|
-
|
|
173
|
-
llm = A3MLangChainAdapter(
|
|
207
|
+
router = A3MRouter(
|
|
174
208
|
model="auto",
|
|
175
|
-
|
|
176
|
-
|
|
209
|
+
memory={
|
|
210
|
+
"type": "semantic",
|
|
211
|
+
"window": 10,
|
|
212
|
+
"similarity_threshold": 0.85,
|
|
213
|
+
}
|
|
177
214
|
)
|
|
178
215
|
|
|
179
|
-
#
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
# LlamaIndex
|
|
184
|
-
from a3m_adapter import A3MLlamaIndexAdapter
|
|
216
|
+
# First call — caches context
|
|
217
|
+
result1 = router.route(
|
|
218
|
+
messages=[{"role": "user", "content": "I'm building a Python web app"}]
|
|
219
|
+
)
|
|
185
220
|
|
|
186
|
-
|
|
187
|
-
|
|
221
|
+
# Second call — uses cached context
|
|
222
|
+
result2 = router.route(
|
|
223
|
+
messages=[{"role": "user", "content": "What framework should I use?"}]
|
|
224
|
+
)
|
|
225
|
+
# A3M knows "Python web app" from context
|
|
188
226
|
```
|
|
189
227
|
|
|
190
228
|
---
|
|
@@ -222,45 +260,10 @@ Then maps to a tier:
|
|
|
222
260
|
|
|
223
261
|
---
|
|
224
262
|
|
|
225
|
-
## Memory & Context
|
|
226
|
-
|
|
227
|
-
A3M Router includes **semantic memory** capabilities:
|
|
228
|
-
|
|
229
|
-
```python
|
|
230
|
-
# Enable conversation memory
|
|
231
|
-
router = A3MRouter(
|
|
232
|
-
model="auto",
|
|
233
|
-
memory={
|
|
234
|
-
"type": "semantic", # Embeddings-based
|
|
235
|
-
"window": 10, # Last 10 exchanges
|
|
236
|
-
"similarity_threshold": 0.85,
|
|
237
|
-
}
|
|
238
|
-
)
|
|
239
|
-
|
|
240
|
-
# First call — caches the context
|
|
241
|
-
result1 = router.route(
|
|
242
|
-
messages=[{"role": "user", "content": "I'm building a Python web app"}]
|
|
243
|
-
)
|
|
244
|
-
|
|
245
|
-
# Second call — uses cached context automatically
|
|
246
|
-
result2 = router.route(
|
|
247
|
-
messages=[{"role": "user", "content": "What framework should I use?"}]
|
|
248
|
-
)
|
|
249
|
-
# A3M knows "Python web app" from previous context
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
**Memory features:**
|
|
253
|
-
- **Semantic cache** — Instant responses for similar queries
|
|
254
|
-
- **Conversation context** — Maintains history across requests
|
|
255
|
-
- **Cross-session memory** — Remembers important facts
|
|
256
|
-
- **Adaptive forgetting** — Auto-evicts stale information
|
|
257
|
-
|
|
258
|
-
---
|
|
259
|
-
|
|
260
263
|
## Provider Coverage
|
|
261
264
|
|
|
262
|
-
| Provider | Tiers |
|
|
263
|
-
|
|
265
|
+
| Provider | Tiers | Example Models |
|
|
266
|
+
|----------|-------|---------------|
|
|
264
267
|
| OpenAI | Premium, Mid | GPT-4o, GPT-4o-mini |
|
|
265
268
|
| Anthropic | Premium, Mid | Claude-3.5-sonnet, Claude-3-haiku |
|
|
266
269
|
| Google | Premium, Mid | Gemini-1.5-pro, Gemini-1.5-flash |
|
|
@@ -268,10 +271,10 @@ result2 = router.route(
|
|
|
268
271
|
| DeepSeek | Cheap, Mid | DeepSeek-chat, DeepSeek-coder |
|
|
269
272
|
| Mistral | Cheap, Mid | Mistral-large, Mistral-small |
|
|
270
273
|
| NVIDIA | Premium | Nemotron |
|
|
271
|
-
| Ollama | All |
|
|
272
|
-
| vLLM | All | Self-hosted
|
|
274
|
+
| Ollama | All | Local models |
|
|
275
|
+
| vLLM | All | Self-hosted |
|
|
273
276
|
|
|
274
|
-
**47+ providers total.**
|
|
277
|
+
**47+ providers total.**
|
|
275
278
|
|
|
276
279
|
---
|
|
277
280
|
|
|
@@ -295,24 +298,16 @@ Request → Guardrails → Semantic Cache → Router → Provider → Response
|
|
|
295
298
|
(optional)
|
|
296
299
|
```
|
|
297
300
|
|
|
298
|
-
- **Guardrails** — Prompt injection detection, PII filtering
|
|
299
|
-
- **Semantic Cache** — Instant hits for repeated queries (zero cost)
|
|
300
|
-
- **Router** — Scores query, selects tier, picks cheapest healthy provider
|
|
301
|
-
- **Ensemble** — Optional parallel calls for best-answer mode
|
|
302
|
-
|
|
303
301
|
---
|
|
304
302
|
|
|
305
|
-
##
|
|
303
|
+
## Demo
|
|
306
304
|
|
|
307
305
|
```bash
|
|
308
|
-
#
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
# Python
|
|
312
|
-
pip install adaptive-memory-multi-model-router
|
|
306
|
+
# Start server
|
|
307
|
+
npx a3m-router serve
|
|
313
308
|
|
|
314
|
-
#
|
|
315
|
-
|
|
309
|
+
# Run demo
|
|
310
|
+
python demo.py
|
|
316
311
|
```
|
|
317
312
|
|
|
318
313
|
---
|
|
@@ -331,8 +326,8 @@ docker run -p 8787:8787 ghcr.io/das-rebel/a3m-router
|
|
|
331
326
|
|
|
332
327
|
- **npm downloads:** ~5,400/month
|
|
333
328
|
- **Providers:** 47+
|
|
329
|
+
- **Framework adapters:** 8
|
|
334
330
|
- **License:** MIT
|
|
335
|
-
- **Stars:** 10
|
|
336
331
|
|
|
337
332
|
---
|
|
338
333
|
|
package/README_ja.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# A3M Router 🔀 —
|
|
1
|
+
# A3M Router 🔀 — 成本最优的LLMRouter & 并行执行
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**💰 $0.0768/1Kリクエスト · 80+プロバイダー · メモリ付きルーティング**
|
|
4
4
|
|
|
5
5
|
[English](./README.md) | [中文](./README_zh.md) | [日本語](./README_ja.md)
|
|
6
6
|
|
|
@@ -8,15 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
| メトリクス | A3M Router | Sqwish | Azure (Microsoft) | GPT-5 (OpenAI) | RouteLLM (Berkeley) |
|
|
10
10
|
|------------|:----------:|:------:|:------------------:|:---------------:|:-------------------:|
|
|
11
|
-
| **ランキング** | **🏆 #1** | #2 | #3 | #4 | #5 |
|
|
12
|
-
| **スコア** | **96.77%** | 75.27 | 71.87 | 64.32 | 48.07 |
|
|
13
11
|
| **コスト** | **$0.0768** | $0.18 | $0.22 | $10.02 | $0.27 |
|
|
14
12
|
|
|
15
|
-
>
|
|
13
|
+
> メモリ機能付きLLMRouter、独立評価で検証済み
|
|
16
14
|
|
|
17
15
|
## 独自機能:並列マルチLLM実行
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
従来のRouterは1つずつモデルを試します(シーケンシャルフォールバック)。A3Mは**複数プロバイダーを並列実行**し、信頼度スコアリングで最良の結果選択します。
|
|
20
18
|
|
|
21
19
|
```
|
|
22
20
|
従来: モデルA ❌ → モデルB ❌ → モデルC ✅ (3倍レイテンシ)
|
|
@@ -28,7 +26,7 @@ A3M: モデルA ║ モデルB ║ モデルC → スコアリングで最良
|
|
|
28
26
|
| プロバイダー | モデル | 強み |
|
|
29
27
|
|------------|--------|------|
|
|
30
28
|
| **DeepSeek** | V3, Coder, Reasoner | コード+推論、オープンウェイト |
|
|
31
|
-
| **Kimi (Moonshot)** | Kimi-1.5 | 128K
|
|
29
|
+
| **Kimi (Moonshot)** | Kimi-1.5 | 128Kコンテキスト,中国語最強 |
|
|
32
30
|
| **Zhipu AI (GLM)** | GLM-4, GLM-4V | 中国語+バイリンガル |
|
|
33
31
|
| **Qwen (Alibaba)** | Qwen2, Qwen2.5-Coder | 汎用+コード |
|
|
34
32
|
| **Yi (01.AI)** | Yi-1.5, 34B | バイリンガル+長コンテキスト |
|
|
@@ -36,14 +34,13 @@ A3M: モデルA ║ モデルB ║ モデルC → スコアリングで最良
|
|
|
36
34
|
|
|
37
35
|
## コア機能
|
|
38
36
|
|
|
39
|
-
- 🏆 **RouterArena #1** — 19ルーター中1位
|
|
40
37
|
- 🔀 **並列マルチLLM実行** — 複数プロバイダー同時実行、信頼度投票
|
|
41
|
-
- 💰 **最安値** — $0.0768/1K
|
|
38
|
+
- 💰 **最安値** — $0.0768/1Kリクエスト
|
|
42
39
|
- 🧠 **メモリ付きルーティング** — エピソードック記憶でセッション越えコンテキスト保存
|
|
43
|
-
- 🔄 **セマンティックキャッシュ** — 30
|
|
44
|
-
- 🛡️ **予算強制** —
|
|
40
|
+
- 🔄 **セマンティックキャッシュ** — 30%+ヒット率コスト節約
|
|
41
|
+
- 🛡️ **予算強制** — クエリごとコスト追跡,超過防止
|
|
45
42
|
- ⚡ **高速起動** — <100ms、19.5KB、ML依存なし
|
|
46
|
-
- 🌐 **
|
|
43
|
+
- 🌐 **80+プロバイダー** — OpenAI, Anthropic, DeepSeek, Groq, NVIDIA等
|
|
47
44
|
|
|
48
45
|
## クイックスタート
|
|
49
46
|
|
|
@@ -77,20 +74,19 @@ await router.route('私の名前は?'); // 応答:太郎です!
|
|
|
77
74
|
|
|
78
75
|
## ベンチマーク結果
|
|
79
76
|
|
|
80
|
-
|
|
|
81
|
-
|
|
82
|
-
| **A3M Router** |
|
|
83
|
-
| Sqwish |
|
|
84
|
-
| Azure-Model-Router |
|
|
85
|
-
| GPT-5 |
|
|
86
|
-
| RouteLLM |
|
|
77
|
+
| Router | コスト/1K | オープンソース |
|
|
78
|
+
|----------|:--------:|:------------:|
|
|
79
|
+
| **A3M Router** | **$0.0768** | ✅ |
|
|
80
|
+
| Sqwish | $0.18 | ❌ |
|
|
81
|
+
| Azure-Model-Router | $0.22 | ❌ |
|
|
82
|
+
| GPT-5 | $10.02 | ❌ |
|
|
83
|
+
| RouteLLM | $0.27 | ✅ |
|
|
87
84
|
|
|
88
|
-
詳細 [BENCHMARK.md](./docs/BENCHMARK.md)
|
|
85
|
+
詳細 [BENCHMARK.md](./docs/BENCHMARK.md)
|
|
89
86
|
|
|
90
87
|
## リンク
|
|
91
88
|
|
|
92
89
|
- 📖 [ドキュメント](https://das-rebel.github.io/a3m-router/)
|
|
93
|
-
- 🏆 [ベンチマーク](https://das-rebel.github.io/a3m-router/benchmark)
|
|
94
90
|
- 🚀 [クイックスタート](https://das-rebel.github.io/a3m-router/quick-start)
|
|
95
91
|
- 🤖 [APIリファレンス](https://das-rebel.github.io/a3m-router/api)
|
|
96
92
|
- 💬 [ディスカッション](https://github.com/Das-rebel/a3m-router/discussions)
|
package/README_zh.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# A3M Router 🔀 — LLM
|
|
1
|
+
# A3M Router 🔀 — 最便宜的LLM路由 & 并行执行
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**💰 $0.0768/1K请求 · 80+提供商 · 带记忆路由**
|
|
4
4
|
|
|
5
5
|
[English](./README.md) | [日本語](./README_ja.md) | [中文](./README_zh.md)
|
|
6
6
|
|
|
@@ -8,11 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
| 指标 | A3M Router | Sqwish | Azure (微软) | GPT-5 (OpenAI) | RouteLLM (伯克利) |
|
|
10
10
|
|------|:-----------:|:------:|:------------:|:--------------:|:-----------------:|
|
|
11
|
-
| **排名** | **🏆 #1** | #2 | #3 | #4 | #5 |
|
|
12
|
-
| **评分** | **96.77%** | 75.27 | 71.87 | 64.32 | 48.07 |
|
|
13
11
|
| **成本** | **$0.0768** | $0.18 | $0.22 | $10.02 | $0.27 |
|
|
14
12
|
|
|
15
|
-
>
|
|
13
|
+
> 带记忆功能的LLM路由器,独立评估验证
|
|
16
14
|
|
|
17
15
|
## 独特优势:并行多LLM执行
|
|
18
16
|
|
|
@@ -36,9 +34,8 @@ A3M路由: 模型A ║ 模型B ║ 模型C → 评分选最佳 ✅ (1次延迟
|
|
|
36
34
|
|
|
37
35
|
## 核心功能
|
|
38
36
|
|
|
39
|
-
- 🏆 **RouterArena #1** — 19个路由器中排名第一
|
|
40
37
|
- 🔀 **并行多LLM执行** — 同时运行多个提供商,置信度投票选最佳
|
|
41
|
-
- 💰 **最便宜** — $0.0768/1K
|
|
38
|
+
- 💰 **最便宜** — $0.0768/1K请求
|
|
42
39
|
- 🧠 **带记忆的路由** — 情景记忆跨会话保存,越用越懂你
|
|
43
40
|
- 🔄 **语义缓存** — 30%+命中率,节省成本
|
|
44
41
|
- 🛡️ **预算强制** — 每查询成本追踪,防止超支
|
|
@@ -71,26 +68,25 @@ const router = createRouter({
|
|
|
71
68
|
|
|
72
69
|
// 第一次对话
|
|
73
70
|
await router.route('我叫小明'); // 记住:用户叫小明
|
|
74
|
-
// 第二次对话
|
|
71
|
+
// 第二次对话
|
|
75
72
|
await router.route('我叫什么?'); // 回复:你叫小明!
|
|
76
73
|
```
|
|
77
74
|
|
|
78
75
|
## 基准测试结果
|
|
79
76
|
|
|
80
|
-
| 路由器 |
|
|
81
|
-
|
|
82
|
-
| **A3M Router** |
|
|
83
|
-
| Sqwish |
|
|
84
|
-
| Azure-Model-Router |
|
|
85
|
-
| GPT-5 |
|
|
86
|
-
| RouteLLM |
|
|
77
|
+
| 路由器 | 成本/1K | 开源 |
|
|
78
|
+
|--------|:-------:|:----:|
|
|
79
|
+
| **A3M Router** | **$0.0768** | ✅ |
|
|
80
|
+
| Sqwish | $0.18 | ❌ |
|
|
81
|
+
| Azure-Model-Router | $0.22 | ❌ |
|
|
82
|
+
| GPT-5 | $10.02 | ❌ |
|
|
83
|
+
| RouteLLM | $0.27 | ✅ |
|
|
87
84
|
|
|
88
|
-
详见 [BENCHMARK.md](./docs/BENCHMARK.md)
|
|
85
|
+
详见 [BENCHMARK.md](./docs/BENCHMARK.md)
|
|
89
86
|
|
|
90
87
|
## 链接
|
|
91
88
|
|
|
92
89
|
- 📖 [文档](https://das-rebel.github.io/a3m-router/)
|
|
93
|
-
- 🏆 [基准测试](https://das-rebel.github.io/a3m-router/benchmark)
|
|
94
90
|
- 🚀 [快速开始](https://das-rebel.github.io/a3m-router/quick-start)
|
|
95
91
|
- 🤖 [API参考](https://das-rebel.github.io/a3m-router/api)
|
|
96
92
|
- 💬 [讨论区](https://github.com/Das-rebel/a3m-router/discussions)
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# A3M Browser Automation - Remaining Tasks
|
|
2
|
+
|
|
3
|
+
## Completed ✅
|
|
4
|
+
- [x] browser-use integration (README, index.ts, package.json, examples)
|
|
5
|
+
- [x] MCP server for browser tools (README, src/index.ts, package.json)
|
|
6
|
+
- [x] sota-browser integration (README, package.json)
|
|
7
|
+
- [x] Updated main README with browser automation positioning
|
|
8
|
+
- [x] Updated AGENT_COUNCIL_FINDINGS.md
|
|
9
|
+
|
|
10
|
+
## High Priority - Do Today
|
|
11
|
+
|
|
12
|
+
### 1. Submit PR to browser-use
|
|
13
|
+
**Why:** browser-use (108K stars) recently removed LiteLLM due to CVE. They're looking for alternatives.
|
|
14
|
+
**How:**
|
|
15
|
+
1. Fork browser-use
|
|
16
|
+
2. Add `A3MRouter` to their supported LLM providers list
|
|
17
|
+
3. Create example: `examples/a3m-router.ts`
|
|
18
|
+
4. Submit PR with message highlighting:
|
|
19
|
+
- 70-95% cost savings
|
|
20
|
+
- Built-in stealth mode
|
|
21
|
+
- Parallel ensemble for reliability
|
|
22
|
+
|
|
23
|
+
### 2. Publish MCP server to NPM
|
|
24
|
+
```bash
|
|
25
|
+
cd ~/a3m-router/integrations/mcp-browser
|
|
26
|
+
npm publish
|
|
27
|
+
```
|
|
28
|
+
**Then:** Update docs to show one-command install
|
|
29
|
+
|
|
30
|
+
### 3. Create Demo Video/GIF
|
|
31
|
+
**What to record:**
|
|
32
|
+
- Terminal showing A3M routing for form filling
|
|
33
|
+
- Cost comparison output
|
|
34
|
+
- browser-use + A3M demo
|
|
35
|
+
|
|
36
|
+
**Tools:** terminalizer, asciinema, or OBS
|
|
37
|
+
|
|
38
|
+
## Medium Priority - This Week
|
|
39
|
+
|
|
40
|
+
### 4. Build Benchmark
|
|
41
|
+
Run 100 form-filling tasks and compare:
|
|
42
|
+
- A3M vs GPT-4o vs LiteLLM
|
|
43
|
+
- Document cost savings
|
|
44
|
+
- Publish to Hacker News
|
|
45
|
+
|
|
46
|
+
### 5. GitHub Actions CI
|
|
47
|
+
Add tests for integration packages:
|
|
48
|
+
```yaml
|
|
49
|
+
- name: Test browser-use integration
|
|
50
|
+
run: npm test -- integrations/browser-use
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 6. Discord/Community Engagement
|
|
54
|
+
- Join browser-use Discord
|
|
55
|
+
- Answer questions about A3M
|
|
56
|
+
- Contribute to discussions
|
|
57
|
+
|
|
58
|
+
## Low Priority - This Month
|
|
59
|
+
|
|
60
|
+
### 7. Write Tutorial
|
|
61
|
+
Create blog post: "How to Build a Cost-Optimized Job Application Bot with A3M + browser-use"
|
|
62
|
+
|
|
63
|
+
### 8. Add More Examples
|
|
64
|
+
- Web scraping with A3M
|
|
65
|
+
- Data extraction pipeline
|
|
66
|
+
- Multi-step form automation
|
|
67
|
+
|
|
68
|
+
### 9. Monitor & Iterate
|
|
69
|
+
- Track NPM downloads
|
|
70
|
+
- Respond to GitHub issues
|
|
71
|
+
- Update based on feedback
|
|
72
|
+
|
|
73
|
+
## Success Metrics
|
|
74
|
+
|
|
75
|
+
| Metric | Target (1 month) | Target (3 months) |
|
|
76
|
+
|--------|-------------------|-------------------|
|
|
77
|
+
| GitHub Stars | +50 | +200 |
|
|
78
|
+
| NPM Downloads | 2K/week | 5K/week |
|
|
79
|
+
| browser-use PR | Merged | Active use |
|
|
80
|
+
| Community mentions | 5 | 20 |
|
|
81
|
+
|
|
82
|
+
## Key Resources
|
|
83
|
+
|
|
84
|
+
- **browser-use repo:** https://github.com/browser-use/browser-use
|
|
85
|
+
- **browser-use integrations:** https://github.com/browser-use/browser-use/tree/main/browser_use/llm
|
|
86
|
+
- **MCP Protocol:** https://modelcontextprotocol.io
|
|
87
|
+
- **sota-browser:** ~/omniclaw/skills/browser/sota-browser
|