agentic-flow 2.0.1-alpha.17 → 2.0.1-alpha.18
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/CHANGELOG.md +38 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/intelligence/EmbeddingCache.d.ts +105 -0
- package/dist/intelligence/EmbeddingCache.d.ts.map +1 -0
- package/dist/intelligence/EmbeddingCache.js +253 -0
- package/dist/intelligence/EmbeddingCache.js.map +1 -0
- package/dist/intelligence/EmbeddingService.d.ts +31 -1
- package/dist/intelligence/EmbeddingService.d.ts.map +1 -1
- package/dist/intelligence/EmbeddingService.js +86 -7
- package/dist/intelligence/EmbeddingService.js.map +1 -1
- package/package.json +1 -1
- package/wasm/reasoningbank/reasoningbank_wasm_bg.js +2 -2
- package/wasm/reasoningbank/reasoningbank_wasm_bg.wasm +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,44 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [2.0.1-alpha.18] - 2025-12-31
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Persistent SQLite Embedding Cache**: Cross-session embedding persistence
|
|
9
|
+
- New `EmbeddingCache` class with SQLite (better-sqlite3) backend
|
|
10
|
+
- **9000x faster** cached lookups: ~0.045ms vs ~400ms ONNX inference
|
|
11
|
+
- Batch writes with transactions: 0.016ms per embedding
|
|
12
|
+
- Stored at `~/.agentic-flow/embedding-cache.db`
|
|
13
|
+
- LRU eviction with configurable max entries (default: 10,000)
|
|
14
|
+
- Automatic cleanup of entries older than 30 days
|
|
15
|
+
- WAL mode for concurrent access
|
|
16
|
+
|
|
17
|
+
- **Cache Hierarchy** (checked in order):
|
|
18
|
+
1. In-memory LRU cache (~0.001ms) - fastest, ephemeral
|
|
19
|
+
2. Persistent SQLite cache (~0.045ms) - persists across sessions
|
|
20
|
+
3. ONNX inference (~400ms) - only on complete cache miss
|
|
21
|
+
|
|
22
|
+
- **EmbeddingService Cache Methods**:
|
|
23
|
+
- `clearPersistentCache()` - Clear SQLite cache
|
|
24
|
+
- `clearAllCaches()` - Clear both memory and persistent caches
|
|
25
|
+
- `getPersistentCacheStats()` - Get cache statistics
|
|
26
|
+
|
|
27
|
+
- **Environment Variables**:
|
|
28
|
+
- `AGENTIC_FLOW_PERSISTENT_CACHE=true|false` (default: true)
|
|
29
|
+
|
|
30
|
+
### Performance (with persistent cache)
|
|
31
|
+
| Operation | Time | Notes |
|
|
32
|
+
|-----------|------|-------|
|
|
33
|
+
| ONNX cold | ~400ms | First inference + cache write |
|
|
34
|
+
| SQLite read | ~0.045ms | Persistent cache lookup |
|
|
35
|
+
| SQLite batch write | 0.016ms/ea | Transactional batch insert |
|
|
36
|
+
| Memory cache | ~0.001ms | In-memory LRU lookup |
|
|
37
|
+
| **Speedup** | **9000x** | SQLite vs ONNX inference |
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
- EmbeddingService now checks persistent cache before ONNX inference
|
|
41
|
+
- Only semantic (ONNX) embeddings are persisted (simple hash-based are not)
|
|
42
|
+
|
|
5
43
|
## [2.0.1-alpha.17] - 2025-12-31
|
|
6
44
|
|
|
7
45
|
### Added
|