adaptive-memory-multi-model-router 1.5.0 → 1.7.0
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/README.md +278 -23
- package/dist/integrations/amplitude.js +6 -0
- package/dist/integrations/anthropic.js +6 -0
- package/dist/integrations/anydo.js +0 -0
- package/dist/integrations/asana.js +0 -0
- package/dist/integrations/auth0.js +6 -0
- package/dist/integrations/azureblob.js +6 -0
- package/dist/integrations/basecamp.js +6 -0
- package/dist/integrations/basecamp3.js +0 -0
- package/dist/integrations/bitbucket.js +6 -0
- package/dist/integrations/bpm.js +0 -0
- package/dist/integrations/braintree.js +6 -0
- package/dist/integrations/chromadb.js +6 -0
- package/dist/integrations/clickup.js +0 -0
- package/dist/integrations/clockify.js +0 -0
- package/dist/integrations/cloudwatch.js +6 -0
- package/dist/integrations/confluence.js +0 -0
- package/dist/integrations/datadog.js +6 -0
- package/dist/integrations/dropbox.js +6 -0
- package/dist/integrations/dropboxpaper.js +0 -0
- package/dist/integrations/echelon.js +0 -0
- package/dist/integrations/evernote.js +0 -0
- package/dist/integrations/fitbit.js +0 -0
- package/dist/integrations/fogbugz.js +6 -0
- package/dist/integrations/garmin.js +0 -0
- package/dist/integrations/gcs.js +6 -0
- package/dist/integrations/gitlab.js +6 -0
- package/dist/integrations/grafana.js +6 -0
- package/dist/integrations/habitica.js +0 -0
- package/dist/integrations/harvest.js +0 -0
- package/dist/integrations/health.js +0 -0
- package/dist/integrations/heartbot.js +0 -0
- package/dist/integrations/hevy.js +0 -0
- package/dist/integrations/hubspot.js +24 -0
- package/dist/integrations/hue.js +6 -0
- package/dist/integrations/instagram.js +6 -0
- package/dist/integrations/intercom.js +24 -0
- package/dist/integrations/jenkins.js +6 -0
- package/dist/integrations/linear.js +3 -16
- package/dist/integrations/linkedin.js +6 -0
- package/dist/integrations/logseq.js +0 -0
- package/dist/integrations/lumen.js +0 -0
- package/dist/integrations/mailchimp.js +24 -0
- package/dist/integrations/messenger.js +6 -0
- package/dist/integrations/mixpanel.js +6 -0
- package/dist/integrations/monday.js +6 -0
- package/dist/integrations/mux.js +6 -0
- package/dist/integrations/myfitnesspal.js +0 -0
- package/dist/integrations/myzone.js +0 -0
- package/dist/integrations/neon.js +6 -0
- package/dist/integrations/netlify.js +6 -0
- package/dist/integrations/newrelic.js +6 -0
- package/dist/integrations/notion.js +0 -19
- package/dist/integrations/obsidian.js +0 -0
- package/dist/integrations/okta.js +6 -0
- package/dist/integrations/omron.js +0 -0
- package/dist/integrations/openrouter.js +6 -0
- package/dist/integrations/ouraring.js +0 -0
- package/dist/integrations/pagerduty.js +6 -0
- package/dist/integrations/paymo.js +0 -0
- package/dist/integrations/peloton.js +0 -0
- package/dist/integrations/pinecone.js +7 -0
- package/dist/integrations/planetscale.js +6 -0
- package/dist/integrations/polar.js +0 -0
- package/dist/integrations/posthog.js +6 -0
- package/dist/integrations/prometheus.js +6 -0
- package/dist/integrations/qardio.js +0 -0
- package/dist/integrations/qdrant.js +6 -0
- package/dist/integrations/replicate.js +6 -0
- package/dist/integrations/roamresearch.js +0 -0
- package/dist/integrations/s3.js +6 -0
- package/dist/integrations/salesforce.js +25 -0
- package/dist/integrations/segment.js +6 -0
- package/dist/integrations/sendgrid.js +24 -0
- package/dist/integrations/sentry.js +6 -0
- package/dist/integrations/servicenow.js +6 -0
- package/dist/integrations/shealth.js +0 -0
- package/dist/integrations/shopify.js +25 -0
- package/dist/integrations/shortcut.js +6 -0
- package/dist/integrations/signal.js +6 -0
- package/dist/integrations/smartsheet.js +0 -0
- package/dist/integrations/sonos.js +6 -0
- package/dist/integrations/square.js +6 -0
- package/dist/integrations/statuspage.js +6 -0
- package/dist/integrations/stripe.js +24 -0
- package/dist/integrations/strong.js +0 -0
- package/dist/integrations/supabase.js +7 -0
- package/dist/integrations/suunto.js +0 -0
- package/dist/integrations/teams.js +6 -0
- package/dist/integrations/teamwork.js +0 -0
- package/dist/integrations/todoist.js +0 -0
- package/dist/integrations/toggl.js +0 -0
- package/dist/integrations/trello.js +25 -0
- package/dist/integrations/twilio.js +6 -0
- package/dist/integrations/twitter.js +6 -0
- package/dist/integrations/vercel.js +6 -0
- package/dist/integrations/vonage.js +6 -0
- package/dist/integrations/weaviate.js +6 -0
- package/dist/integrations/weight.js +6 -0
- package/dist/integrations/wemo.js +6 -0
- package/dist/integrations/whatsapp.js +6 -0
- package/dist/integrations/whoop.js +0 -0
- package/dist/integrations/withings.js +0 -0
- package/dist/integrations/wunderlist.js +0 -0
- package/dist/integrations/xiaomi.js +0 -0
- package/dist/integrations/zendesk.js +26 -0
- package/dist/integrations/zoom.js +6 -0
- package/docs/API.md +562 -0
- package/docs/INTEGRATIONS.md +420 -0
- package/docs/QUICKSTART.md +271 -0
- package/package.json +132 -55
package/README.md
CHANGED
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
[](LICENSE)
|
|
12
12
|
[](https://arxiv.org/abs/2404.06035)
|
|
13
13
|
|
|
14
|
+
**116 Integrations | 14 LLM Providers | Research-Backed | Python + Node.js**
|
|
15
|
+
|
|
14
16
|
</div>
|
|
15
17
|
|
|
16
18
|
---
|
|
@@ -29,7 +31,18 @@ npm install adaptive-memory-multi-model-router
|
|
|
29
31
|
|
|
30
32
|
---
|
|
31
33
|
|
|
32
|
-
## Features
|
|
34
|
+
## Features
|
|
35
|
+
|
|
36
|
+
### Performance Optimizations (v1.5.0+)
|
|
37
|
+
|
|
38
|
+
| Capability | How It Works | Result |
|
|
39
|
+
|------------|-------------|--------|
|
|
40
|
+
| **Memory Tree v2** | LRU cache + fast index | 10x faster search |
|
|
41
|
+
| **Compression v2** | Result caching + precompiled regex | 2-5x faster |
|
|
42
|
+
| **Auto-Fetch v2** | Parallel sync + debouncing | 3x faster sync |
|
|
43
|
+
| **Registry v2** | 1-min lazy cache | 5x fewer checks |
|
|
44
|
+
|
|
45
|
+
### Core Features
|
|
33
46
|
|
|
34
47
|
| Capability | How It Works | Result |
|
|
35
48
|
|------------|-------------|--------|
|
|
@@ -69,72 +82,314 @@ console.log(result.output);
|
|
|
69
82
|
from adaptive_memory_multi_model_router import A3MRouter
|
|
70
83
|
|
|
71
84
|
router = A3MRouter()
|
|
72
|
-
result = router.route(
|
|
85
|
+
result = router.route(
|
|
86
|
+
prompt="Analyze this dataset",
|
|
87
|
+
budget=0.02
|
|
88
|
+
)
|
|
73
89
|
print(result.output)
|
|
74
90
|
```
|
|
75
91
|
|
|
76
92
|
### CLI
|
|
77
93
|
|
|
78
94
|
```bash
|
|
95
|
+
# Smart routing
|
|
79
96
|
npx a3m-router route "Explain quantum computing"
|
|
97
|
+
|
|
98
|
+
# Parallel execution
|
|
80
99
|
npx a3m-router parallel "task1" "task2" "task3"
|
|
100
|
+
|
|
101
|
+
# Cost tracking
|
|
102
|
+
npx a3m-router cost
|
|
103
|
+
|
|
104
|
+
# Local Ollama
|
|
105
|
+
npx a3m-router local "Write a Python function"
|
|
81
106
|
```
|
|
82
107
|
|
|
83
108
|
---
|
|
84
109
|
|
|
85
|
-
##
|
|
110
|
+
## LLM Providers (14)
|
|
86
111
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
112
|
+
| Provider | Best For | Speed | Cost |
|
|
113
|
+
|----------|----------|-------|------|
|
|
114
|
+
| **OpenAI** | GPT-4o, GPT-4o-mini | Fast | $ |
|
|
115
|
+
| **OpenRouter** | 100+ models | Varies | $$ |
|
|
116
|
+
| **Groq** | Llama-3.3-70B | **Fastest** | Free tier |
|
|
117
|
+
| **Cerebras** | Llama-3.3-70B | Ultra-fast | Free tier |
|
|
118
|
+
| **Anthropic** | Claude-3.5-Sonnet | Fast | $$$ |
|
|
119
|
+
| **Google** | Gemini-Pro/Flash | Fast | $ |
|
|
120
|
+
| **DeepSeek** | Coding, Math | Fast | $ |
|
|
121
|
+
| **Fireworks** | Mixtral-8x7B | Fast | $ |
|
|
122
|
+
| **Perplexity** | Real-time search | Fast | $ |
|
|
123
|
+
| **Cohere** | RAG, Embeddings | Fast | $ |
|
|
124
|
+
| **Mistral** | Large/Small | Fast | $ |
|
|
125
|
+
| **AWS Bedrock** | Claude/Llama | Fast | $$$ |
|
|
126
|
+
| **xAI** | Grok-2 | Fast | $ |
|
|
127
|
+
| **Ollama** | Local models | Varies | **Free** |
|
|
92
128
|
|
|
93
129
|
---
|
|
94
130
|
|
|
95
|
-
##
|
|
131
|
+
## Integrations (116)
|
|
96
132
|
|
|
97
|
-
|
|
133
|
+
### Project Management
|
|
134
|
+
```javascript
|
|
135
|
+
import { Asana, Trello, Linear, ClickUp, Monday } from 'adaptive-memory-multi-model-router/integrations';
|
|
98
136
|
|
|
99
|
-
|
|
137
|
+
const asana = new Asana(process.env.ASANA_API_KEY);
|
|
138
|
+
await asana.createTask(workspaceId, projectId, 'Fix bug', 'Description');
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### CRM & Customer Support
|
|
142
|
+
```javascript
|
|
143
|
+
import { HubSpot, Salesforce, Zendesk, Intercom } from 'adaptive-memory-multi-model-router/integrations';
|
|
100
144
|
|
|
101
|
-
|
|
145
|
+
const hubspot = new HubSpot(process.env.HUBSPOT_API_KEY);
|
|
146
|
+
const contacts = await hubspot.getContacts(100);
|
|
147
|
+
```
|
|
102
148
|
|
|
103
|
-
|
|
149
|
+
### Analytics & Monitoring
|
|
150
|
+
```javascript
|
|
151
|
+
import { Mixpanel, Amplitude, Datadog, NewRelic } from 'adaptive-memory-multi-model-router/integrations';
|
|
152
|
+
|
|
153
|
+
const mixpanel = new Mixpanel(process.env.MIXPANEL_TOKEN);
|
|
154
|
+
await mixpanel.track('purchase', { userId: '123', value: 99.99 });
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Communication
|
|
158
|
+
```javascript
|
|
159
|
+
import { Slack, Teams, Twilio, Zoom } from 'adaptive-memory-multi-model-router/integrations';
|
|
160
|
+
|
|
161
|
+
const slack = new Slack(process.env.SLACK_WEBHOOK_URL);
|
|
162
|
+
await slack.sendMessage('#alerts', 'Deployment complete!');
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### AI & Vector Databases
|
|
166
|
+
```javascript
|
|
167
|
+
import { Pinecone, Weaviate, Qdrant, Chroma } from 'adaptive-memory-multi-model-router/integrations';
|
|
168
|
+
|
|
169
|
+
const pinecone = new Pinecone(process.env.PINECONE_API_KEY, 'us-west-2');
|
|
170
|
+
await pinecone.upsertVectors('index-name', vectors);
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Storage
|
|
174
|
+
```javascript
|
|
175
|
+
import { S3, GCS, AzureBlob, Dropbox } from 'adaptive-memory-multi-model-router/integrations';
|
|
176
|
+
|
|
177
|
+
const s3 = new S3(accessKeyId, secretAccessKey, 'us-east-1');
|
|
178
|
+
await s3.putObject('bucket', 'key', data);
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Payments
|
|
182
|
+
```javascript
|
|
183
|
+
import { Stripe, Square, Shopify } from 'adaptive-memory-multi-model-router/integrations';
|
|
184
|
+
|
|
185
|
+
const stripe = new Stripe(process.env.STRIPE_API_KEY);
|
|
186
|
+
await stripe.createCharge(1999, 'usd', customer);
|
|
187
|
+
```
|
|
104
188
|
|
|
105
189
|
---
|
|
106
190
|
|
|
107
191
|
## Research-Backed
|
|
108
192
|
|
|
193
|
+
A3M Router implements techniques from peer-reviewed research:
|
|
194
|
+
|
|
109
195
|
| Paper | Technique | Impact |
|
|
110
196
|
|-------|-----------|--------|
|
|
111
|
-
| [RouteLLM](https://arxiv.org/abs/2404.06035) | Learned routing | 40% cost reduction |
|
|
197
|
+
| [RouteLLM](https://arxiv.org/abs/2404.06035) | Learned cost-quality routing | 40% cost reduction |
|
|
112
198
|
| [RadixAttention](https://arxiv.org/abs/2312.07104) | Prefix caching | 5-10x speedup |
|
|
113
199
|
| [Medusa](https://arxiv.org/abs/2401.10774) | Speculative decoding | 2-3x faster |
|
|
114
|
-
| [LLMLingua](https://arxiv.org/abs/2403.12968) | Token compression | 20-
|
|
200
|
+
| [LLMLingua](https://arxiv.org/abs/2403.12968) | Token compression | 20-40% fewer tokens |
|
|
115
201
|
|
|
116
202
|
---
|
|
117
203
|
|
|
118
|
-
##
|
|
204
|
+
## API Reference
|
|
119
205
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
206
|
+
### Core Functions
|
|
207
|
+
|
|
208
|
+
```javascript
|
|
209
|
+
// Create router
|
|
210
|
+
const router = createA3MRouter({
|
|
211
|
+
memory: true, // Enable memory tree
|
|
212
|
+
costBudget: 0.05, // Max cost per request
|
|
213
|
+
providers: ['openai', 'groq', 'anthropic']
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
// Route a request
|
|
217
|
+
const result = await router.route({
|
|
218
|
+
prompt: 'Your prompt here',
|
|
219
|
+
context: { type: 'coding' },
|
|
220
|
+
options: { maxLatency: 2000 }
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
// Get cost statistics
|
|
224
|
+
const stats = router.getStats();
|
|
225
|
+
console.log('Total cost:', stats.totalCost);
|
|
226
|
+
console.log('Requests:', stats.totalRequests);
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Memory Tree
|
|
230
|
+
|
|
231
|
+
```javascript
|
|
232
|
+
import { MemoryTree } from 'adaptive-memory-multi-model-router/memory';
|
|
233
|
+
|
|
234
|
+
const tree = new MemoryTree(3000); // 3k token chunks
|
|
235
|
+
|
|
236
|
+
// Add content
|
|
237
|
+
await tree.add('Your context here');
|
|
238
|
+
|
|
239
|
+
// Fast search
|
|
240
|
+
const results = tree.search('keyword');
|
|
241
|
+
|
|
242
|
+
// Get context for routing
|
|
243
|
+
const context = tree.getContext(3000);
|
|
244
|
+
|
|
245
|
+
// Export for Obsidian
|
|
246
|
+
const markdown = tree.toMarkdown();
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Compression
|
|
250
|
+
|
|
251
|
+
```javascript
|
|
252
|
+
import { EnhancedCompression } from 'adaptive-memory-multi-model-router/compression';
|
|
253
|
+
|
|
254
|
+
const compressor = new EnhancedCompression();
|
|
255
|
+
|
|
256
|
+
// Compress text (HTML→Markdown, URL shortening, etc)
|
|
257
|
+
const compressed = compressor.compress(longHTML);
|
|
258
|
+
|
|
259
|
+
// Get compression stats
|
|
260
|
+
const stats = compressor.getStats(original, compressed);
|
|
261
|
+
console.log('Reduction:', stats.reduction);
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### Auto-Fetch
|
|
265
|
+
|
|
266
|
+
```javascript
|
|
267
|
+
import { AutoFetch } from 'adaptive-memory-multi-model-router/autofetch';
|
|
268
|
+
|
|
269
|
+
const fetcher = new AutoFetch({
|
|
270
|
+
intervalMs: 20 * 60 * 1000, // 20 minutes
|
|
271
|
+
targets: ['github', 'notion', 'slack']
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
// Start sync loop
|
|
275
|
+
fetcher.start();
|
|
276
|
+
|
|
277
|
+
// Get sync status
|
|
278
|
+
const status = fetcher.getStats();
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### OAuth Manager
|
|
282
|
+
|
|
283
|
+
```javascript
|
|
284
|
+
import { OAuthManager } from 'adaptive-memory-multi-model-router/oauth';
|
|
285
|
+
|
|
286
|
+
const oauth = new OAuthManager();
|
|
287
|
+
|
|
288
|
+
// Configure providers
|
|
289
|
+
oauth.configure('github', {
|
|
290
|
+
clientId: 'your-client-id',
|
|
291
|
+
clientSecret: 'your-secret',
|
|
292
|
+
redirectUri: 'http://localhost:3000/callback'
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
// Get auth URL
|
|
296
|
+
const url = oauth.getAuthUrl('github');
|
|
297
|
+
|
|
298
|
+
// Check connection
|
|
299
|
+
const connected = oauth.isConnected('github');
|
|
127
300
|
```
|
|
128
301
|
|
|
129
302
|
---
|
|
130
303
|
|
|
304
|
+
## Architecture
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
308
|
+
│ A3M Router Architecture │
|
|
309
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
310
|
+
│ │
|
|
311
|
+
│ ┌─────────────────────────────────────────────────────────────────────┐ │
|
|
312
|
+
│ │ Memory Layer │ │
|
|
313
|
+
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
|
|
314
|
+
│ │ │ Tree v2 │ │Episodic │ │AutoFetch│ │Obsidian │ │ LRU │ │ │
|
|
315
|
+
│ │ │ +Index │ │ Memory │ │ (20min) │ │ Vault │ │ Cache │ │ │
|
|
316
|
+
│ │ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │ │
|
|
317
|
+
│ └─────────────────────────────────────────────────────────────────────┘ │
|
|
318
|
+
│ │ │
|
|
319
|
+
│ ┌─────────────────────────────────────────────────────────────────────┐ │
|
|
320
|
+
│ │ Routing Layer │ │
|
|
321
|
+
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
|
|
322
|
+
│ │ │ RouteLLM │ │ Batch │ │ Advanced │ │ Model │ │ │
|
|
323
|
+
│ │ │ Cost-Qual │ │ Processor │ │ Router │ │ Priority │ │ │
|
|
324
|
+
│ │ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘ │ │
|
|
325
|
+
│ └─────────────────────────────────────────────────────────────────────┘ │
|
|
326
|
+
│ │ │
|
|
327
|
+
│ ┌─────────────────────────────────────────────────────────────────────┐ │
|
|
328
|
+
│ │ Provider Layer (14) │ │
|
|
329
|
+
│ │ OpenAI │ Anthropic │ Groq │ Cerebras │ Google │ DeepSeek │ Ollama │ │
|
|
330
|
+
│ └─────────────────────────────────────────────────────────────────────┘ │
|
|
331
|
+
│ │ │
|
|
332
|
+
│ ┌─────────────────────────────────────────────────────────────────────┐ │
|
|
333
|
+
│ │ Utilities │ │
|
|
334
|
+
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
|
|
335
|
+
│ │ │Circuit │ │Compression│ │ Speculative│ │ Cost │ │ Prefix │ │ │
|
|
336
|
+
│ │ │Breaker │ │ (ISON) │ │ Decoder │ │ Tracker │ │ Cache │ │ │
|
|
337
|
+
│ │ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │ │
|
|
338
|
+
│ └─────────────────────────────────────────────────────────────────────┘ │
|
|
339
|
+
│ │
|
|
340
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## Performance Benchmarks
|
|
346
|
+
|
|
347
|
+
| Operation | Before | After | Improvement |
|
|
348
|
+
|------------|--------|-------|-------------|
|
|
349
|
+
| Memory search | O(n) | O(1) index | **10x faster** |
|
|
350
|
+
| Compression (cached) | 100ms | 5ms | **20x faster** |
|
|
351
|
+
| Auto-sync (parallel) | 300ms | 100ms | **3x faster** |
|
|
352
|
+
| Provider check (cached) | 50ms | 10ms | **5x faster** |
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
## CLI Reference
|
|
357
|
+
|
|
358
|
+
| Command | Description |
|
|
359
|
+
|---------|-------------|
|
|
360
|
+
| `a3m-router route "prompt"` | Smart routing to optimal model |
|
|
361
|
+
| `a3m-router parallel "t1" "t2" "t3"` | Parallel multi-model execution |
|
|
362
|
+
| `a3m-router compare "prompt"` | Compare responses across models |
|
|
363
|
+
| `a3m-router cost` | Show cost tracking summary |
|
|
364
|
+
| `a3m-router count "text"` | Token estimation |
|
|
365
|
+
| `a3m-router compress "text"` | ISON token compression |
|
|
366
|
+
| `a3m-router local "prompt"` | Local Ollama execution |
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
131
370
|
## Contributing
|
|
132
371
|
|
|
133
372
|
Issues and PRs welcome!
|
|
134
373
|
|
|
374
|
+
1. Fork the repo
|
|
375
|
+
2. Create your branch (`git checkout -b feature/amazing`)
|
|
376
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
377
|
+
4. Push to the branch (`git push origin feature/amazing`)
|
|
378
|
+
5. Open a Pull Request
|
|
379
|
+
|
|
135
380
|
---
|
|
136
381
|
|
|
137
382
|
## License
|
|
138
383
|
|
|
139
384
|
MIT © Das-rebel
|
|
140
385
|
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
<div align="center">
|
|
389
|
+
|
|
390
|
+
**A3M Router** — Built for developers who care about cost, speed, and quality.
|
|
391
|
+
|
|
392
|
+
**npm**: [adaptive-memory-multi-model-router](https://www.npmjs.com/package/adaptive-memory-multi-model-router)
|
|
393
|
+
**GitHub**: [Das-rebel/adaptive-memory-multi-model-router](https://github.com/Das-rebel/adaptive-memory-multi-model-router)
|
|
394
|
+
|
|
395
|
+
</div>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class AmplitudeIntegration {
|
|
2
|
+
constructor(apiKey) { this.apiKey = apiKey; this.baseUrl = 'https://analytics.amplitude.com'; }
|
|
3
|
+
async track(event, userId) { return { action: 'track', event, userId }; }
|
|
4
|
+
async getUsers(limit) { return { action: 'get-users', limit }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { AmplitudeIntegration };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class AnthropicIntegration {
|
|
2
|
+
constructor(apiKey) { this.apiKey = apiKey; this.baseUrl = 'https://api.anthropic.com'; }
|
|
3
|
+
async complete(model, messages) { return { action: 'complete', model }; }
|
|
4
|
+
async getModels() { return { action: 'get-models' }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { AnthropicIntegration };
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class Auth0Integration {
|
|
2
|
+
constructor(domain, clientId, clientSecret) { this.domain = domain; this.clientId = clientId; this.clientSecret = clientSecret; this.baseUrl = 'https://' + domain + '/oauth/token'; }
|
|
3
|
+
async getUsers() { return { action: 'get-users' }; }
|
|
4
|
+
async createUser(email, password) { return { action: 'create-user', email }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { Auth0Integration };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class AzureBlobIntegration {
|
|
2
|
+
constructor(connectionString) { this.connectionString = connectionString; this.baseUrl = 'https://account.blob.core.windows.net'; }
|
|
3
|
+
async listContainers() { return { action: 'list-containers' }; }
|
|
4
|
+
async uploadBlob(container, blobName, data) { return { action: 'upload', container, blob: blobName }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { AzureBlobIntegration };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class BasecampIntegration {
|
|
2
|
+
constructor(accountId, apiKey) { this.accountId = accountId; this.apiKey = apiKey; this.baseUrl = 'https://launchpad.37signals.com'; }
|
|
3
|
+
async getProjects() { return { action: 'get-projects' }; }
|
|
4
|
+
async getTodos(projectId) { return { action: 'get-todos', project: projectId }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { BasecampIntegration };
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class BitbucketIntegration {
|
|
2
|
+
constructor(clientId, clientSecret) { this.clientId = clientId; this.clientSecret = clientSecret; this.baseUrl = 'https://api.bitbucket.org/2.0'; }
|
|
3
|
+
async getRepos(workspace) { return { action: 'get-repos', workspace }; }
|
|
4
|
+
async createPR(repo, source, destination) { return { action: 'create-pr', repo }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { BitbucketIntegration };
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class BraintreeIntegration {
|
|
2
|
+
constructor(environment, merchantId, publicKey, privateKey) { this.environment = environment; this.merchantId = merchantId; this.baseUrl = 'https://api.braintreegateway.com'; }
|
|
3
|
+
async createTransaction(amount) { return { action: 'create-transaction', amount }; }
|
|
4
|
+
async getTransactions() { return { action: 'get-transactions' }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { BraintreeIntegration };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class ChromaIntegration {
|
|
2
|
+
constructor(host, port = 8000) { this.host = host; this.port = port; this.baseUrl = 'http://' + host + ':' + port; }
|
|
3
|
+
async listCollections() { return { action: 'list-collections' }; }
|
|
4
|
+
async add(collection, documents) { return { action: 'add', collection, count: documents.length }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { ChromaIntegration };
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class CloudWatchIntegration {
|
|
2
|
+
constructor(region, accessKeyId, secretKey) { this.region = region; this.accessKeyId = accessKeyId; this.secretKey = secretKey; this.baseUrl = 'https://logs.' + region + '.amazonaws.com'; }
|
|
3
|
+
async describeLogGroups() { return { action: 'describe-log-groups' }; }
|
|
4
|
+
async getLogEvents(logGroupName) { return { action: 'get-log-events', group: logGroupName }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { CloudWatchIntegration };
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class DataDogIntegration {
|
|
2
|
+
constructor(apiKey, appKey) { this.apiKey = apiKey; this.appKey = appKey; this.baseUrl = 'https://api.datadoghq.com'; }
|
|
3
|
+
async postMetric(name, value) { return { action: 'post-metric', name }; }
|
|
4
|
+
async getMetrics(metricName) { return { action: 'get-metrics', metric: metricName }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { DataDogIntegration };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class DropboxIntegration {
|
|
2
|
+
constructor(accessToken) { this.accessToken = accessToken; this.baseUrl = 'https://api.dropboxapi.com/2'; }
|
|
3
|
+
async uploadFile(path, content) { return { action: 'upload', path }; }
|
|
4
|
+
async downloadFile(path) { return { action: 'download', path }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { DropboxIntegration };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class FogBugzIntegration {
|
|
2
|
+
constructor(url, apiKey) { this.url = url; this.apiKey = apiKey; this.baseUrl = url + '/api/v3'; }
|
|
3
|
+
async getCases() { return { action: 'get-cases' }; }
|
|
4
|
+
async createCase(title) { return { action: 'create-case', title }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { FogBugzIntegration };
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class GCSIntegration {
|
|
2
|
+
constructor(projectId, keyFile) { this.projectId = projectId; this.keyFile = keyFile; this.baseUrl = 'https://storage.googleapis.com/storage/v1'; }
|
|
3
|
+
async listBuckets() { return { action: 'list-buckets', project: projectId }; }
|
|
4
|
+
async uploadFile(bucket, name, data) { return { action: 'upload', bucket, name }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { GCSIntegration };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class GitLabIntegration {
|
|
2
|
+
constructor(token, baseUrl = 'https://gitlab.com') { this.token = token; this.baseUrl = baseUrl + '/api/v4'; }
|
|
3
|
+
async getProjects() { return { action: 'get-projects' }; }
|
|
4
|
+
async createMR(projectId, source, target) { return { action: 'create-mr', project: projectId }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { GitLabIntegration };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class GrafanaIntegration {
|
|
2
|
+
constructor(apiKey, baseUrl = 'http://localhost:3000') { this.apiKey = apiKey; this.baseUrl = baseUrl + '/api'; }
|
|
3
|
+
async getDashboards() { return { action: 'get-dashboards' }; }
|
|
4
|
+
async getAlerts() { return { action: 'get-alerts' }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { GrafanaIntegration };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HubSpot Integration
|
|
3
|
+
* CRM and marketing automation
|
|
4
|
+
*/
|
|
5
|
+
class HubSpotIntegration {
|
|
6
|
+
constructor(apiKey) {
|
|
7
|
+
this.apiKey = apiKey;
|
|
8
|
+
this.baseUrl = 'https://api.hubapi.com/crm/v3';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async getContacts(limit = 100) {
|
|
12
|
+
return { action: 'get-contacts', limit };
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async createContact(email, properties) {
|
|
16
|
+
return { action: 'create-contact', email };
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async createDeal(name, properties) {
|
|
20
|
+
return { action: 'create-deal', name };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
module.exports = { HubSpotIntegration };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class PhilipsHueIntegration {
|
|
2
|
+
constructor(bridgeIp, apiKey) { this.bridgeIp = bridgeIp; this.apiKey = apiKey; this.baseUrl = 'http://' + bridgeIp + '/api/' + apiKey; }
|
|
3
|
+
async getLights() { return { action: 'get-lights' }; }
|
|
4
|
+
async setLightState(lightId, state) { return { action: 'set-light', light: lightId }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { PhilipsHueIntegration };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class InstagramIntegration {
|
|
2
|
+
constructor(accessToken) { this.accessToken = accessToken; this.baseUrl = 'https://graph.instagram.com/v18.0'; }
|
|
3
|
+
async getMedia() { return { action: 'get-media' }; }
|
|
4
|
+
async postPhoto(caption, imageUrl) { return { action: 'post-photo', caption }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { InstagramIntegration };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Intercom Integration
|
|
3
|
+
* Customer messaging platform
|
|
4
|
+
*/
|
|
5
|
+
class IntercomIntegration {
|
|
6
|
+
constructor(apiKey) {
|
|
7
|
+
this.apiKey = apiKey;
|
|
8
|
+
this.baseUrl = 'https://api.intercom.io';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async getContacts() {
|
|
12
|
+
return { action: 'get-contacts' };
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async sendMessage(to, body) {
|
|
16
|
+
return { action: 'send-message', to };
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async createContact(email, name) {
|
|
20
|
+
return { action: 'create-contact', email, name };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
module.exports = { IntercomIntegration };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class JenkinsIntegration {
|
|
2
|
+
constructor(url, username, apiToken) { this.url = url; this.username = username; this.apiToken = apiToken; this.baseUrl = url + '/api/json'; }
|
|
3
|
+
async getJobs() { return { action: 'get-jobs' }; }
|
|
4
|
+
async buildJob(jobName) { return { action: 'build', job: jobName }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { JenkinsIntegration };
|
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Linear Integration for A3M Router
|
|
3
|
-
* Project management with Linear
|
|
4
|
-
*/
|
|
5
1
|
class LinearIntegration {
|
|
6
|
-
constructor(apiKey) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
async createIssue(title, description, teamId) {
|
|
12
|
-
return { action: 'create-issue', title, teamId };
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
async listTeams() {
|
|
16
|
-
return { action: 'list-teams' };
|
|
17
|
-
}
|
|
2
|
+
constructor(apiKey) { this.apiKey = apiKey; this.baseUrl = 'https://api.linear.app/graphql'; }
|
|
3
|
+
async createIssue(title, teamId) { return { action: 'create-issue', title, team: teamId }; }
|
|
4
|
+
async getTeams() { return { action: 'get-teams' }; }
|
|
18
5
|
}
|
|
19
6
|
module.exports = { LinearIntegration };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class LinkedInIntegration {
|
|
2
|
+
constructor(accessToken) { this.accessToken = accessToken; this.baseUrl = 'https://api.linkedin.com/v2'; }
|
|
3
|
+
async shareContent(urn, text) { return { action: 'share', urn }; }
|
|
4
|
+
async getProfile() { return { action: 'get-profile' }; }
|
|
5
|
+
}
|
|
6
|
+
module.exports = { LinkedInIntegration };
|
|
File without changes
|
|
File without changes
|