adaptive-memory-multi-model-router 2.13.1 → 2.13.3

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.
@@ -1,47 +1,47 @@
1
- # TMLPD PI Extension — Parallel Multi-LLM for PI Agent
1
+ # TMLPD — Parallel Multi-LLM Execution Module
2
2
 
3
3
  > **Part of the [A3M Router](https://github.com/Das-rebel/adaptive-memory-multi-model-router) ecosystem.**
4
4
 
5
- PI agent tools for parallel multi-LLM execution with confidence-weighted ensemble merging. Powers `/tmlpd-parallel`, `/tmlpd-route`, `/tmlpd-compare`, and `/tmlpd-cost` commands in the PI CLI.
5
+ Parallel multi-LLM execution with confidence-weighted ensemble merging. Runs providers simultaneously, scores each result, and returns the best answer with transparent reasoning.
6
6
 
7
7
  ## What This Is
8
8
 
9
- The PI agent integration for A3M Router. These tools let your PI agent:
10
-
11
- - **Execute prompts across multiple LLMs in parallel** and pick the best result
12
- - **Smart-route** single queries to the optimal provider based on task type
13
- - **Track costs** across all providers and sessions
14
- - **Persist agent memory** across CLI sessions
9
+ A TypeScript library for executing prompts across multiple LLM providers **in parallel** — not sequentially. Every provider runs at the same time, results are scored on quality, and the best answer is selected with a clear explanation of why it won.
15
10
 
16
11
  ## Core Features
17
12
 
18
- | Tool | Description |
19
- |:-----|:------------|
20
- | `tmlpd_execute` | Run prompt across multiple providers in parallel, merge results |
21
- | `tmlpd_execute_single` | Smart-route to optimal single provider |
22
- | Parallel ensemble | NVIDIA + Groq simultaneously, scored and merged |
23
- | Cost tracking | Per-query cost display, provider-level breakdown |
24
- | Persistent memory | Cross-session `.memory.json` with keyword indexing |
25
-
26
- ## Quick Start
13
+ | Feature | Description |
14
+ |:--------|:------------|
15
+ | **Parallel execution** | Run N providers simultaneously, not sequentially |
16
+ | **Ensemble scoring** | Score results on specificity, structure, and relevance |
17
+ | **Query-type presets** | Auto-configure provider + temp per task type |
18
+ | **Cost tracking** | Per-query cost display with provider breakdown |
19
+ | **Persistent memory** | Cross-session `.memory.json` with keyword indexing |
20
+ | **Prefix caching** | RadixAttention-style caching for repeated prefixes |
21
+ | **Speculative decoding** | Medusa/EAGLE-style multi-token prediction |
22
+ | **Token compression** | ISON encoding for ~40% token reduction |
27
23
 
28
- ```bash
29
- npm install tmlpd-pi
30
- ```
24
+ ## Usage
31
25
 
32
26
  ```typescript
33
- import { createTMLPD } from "tmlpd-pi";
34
-
35
- const tmlpd = createTMLPD({ cache: { ttl_seconds: 3600 } });
27
+ import { executeEnsemble, createPresetRouter, EpisodicMemoryStore } from "tmlpd-pi";
36
28
 
37
- // Parallel execution across providers
38
- const result = await tmlpd.executeParallel(prompt, ["nvidia", "groq"]);
39
-
40
- // With ensemble scoring
41
- const { best, winner, scores } = await executeEnsemble(
42
- prompt, systemPrompt, context,
29
+ // Parallel ensemble: run all providers simultaneously, pick best
30
+ const result = await executeEnsemble(
31
+ "Explain vector databases",
32
+ systemPrompt,
33
+ context,
43
34
  { nvidia: callNvidia, groq: callGroq }
44
35
  );
36
+ console.log(`Winner: ${result.winner} (score: ${result.scores[result.winner]})`);
37
+
38
+ // Query-type presets: auto-configure per task
39
+ const router = createPresetRouter();
40
+ const preset = router.classify("Write a Python sort function"); // → 'code'
41
+
42
+ // Persistent memory
43
+ const memory = new EpisodicMemoryStore(1000, './memory.json');
44
+ const similar = memory.getSimilarTasks("Python async API", 5);
45
45
  ```
46
46
 
47
47
  ## Exports