agentdb 3.0.0-alpha.9 → 3.0.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/LICENSE +21 -0
- package/README.md +248 -269
- package/dist/schemas/frontier-schema.sql +7 -0
- package/dist/schemas/schema.sql +7 -0
- package/dist/src/backends/VectorBackend.d.ts +48 -6
- package/dist/src/backends/VectorBackend.d.ts.map +1 -1
- package/dist/src/backends/VectorBackend.js +13 -1
- package/dist/src/backends/VectorBackend.js.map +1 -1
- package/dist/src/backends/detector.js.map +1 -1
- package/dist/src/backends/factory.d.ts +16 -33
- package/dist/src/backends/factory.d.ts.map +1 -1
- package/dist/src/backends/factory.js +140 -110
- package/dist/src/backends/factory.js.map +1 -1
- package/dist/src/backends/graph/GraphDatabaseAdapter.d.ts +54 -6
- package/dist/src/backends/graph/GraphDatabaseAdapter.d.ts.map +1 -1
- package/dist/src/backends/graph/GraphDatabaseAdapter.js +143 -6
- package/dist/src/backends/graph/GraphDatabaseAdapter.js.map +1 -1
- package/dist/src/backends/hnswlib/HNSWLibBackend.d.ts.map +1 -1
- package/dist/src/backends/hnswlib/HNSWLibBackend.js +35 -8
- package/dist/src/backends/hnswlib/HNSWLibBackend.js.map +1 -1
- package/dist/src/backends/index.d.ts +2 -1
- package/dist/src/backends/index.d.ts.map +1 -1
- package/dist/src/backends/index.js +2 -0
- package/dist/src/backends/index.js.map +1 -1
- package/dist/src/backends/ruvector/RuVectorBackend.d.ts +256 -45
- package/dist/src/backends/ruvector/RuVectorBackend.d.ts.map +1 -1
- package/dist/src/backends/ruvector/RuVectorBackend.js +764 -290
- package/dist/src/backends/ruvector/RuVectorBackend.js.map +1 -1
- package/dist/src/backends/ruvector/RuVectorLearning.d.ts +0 -4
- package/dist/src/backends/ruvector/RuVectorLearning.d.ts.map +1 -1
- package/dist/src/backends/ruvector/RuVectorLearning.js +0 -6
- package/dist/src/backends/ruvector/RuVectorLearning.js.map +1 -1
- package/dist/src/backends/rvf/AdaptiveIndexTuner.d.ts +175 -0
- package/dist/src/backends/rvf/AdaptiveIndexTuner.d.ts.map +1 -0
- package/dist/src/backends/rvf/AdaptiveIndexTuner.js +567 -0
- package/dist/src/backends/rvf/AdaptiveIndexTuner.js.map +1 -0
- package/dist/src/backends/rvf/ContrastiveTrainer.d.ts +148 -0
- package/dist/src/backends/rvf/ContrastiveTrainer.d.ts.map +1 -0
- package/dist/src/backends/rvf/ContrastiveTrainer.js +438 -0
- package/dist/src/backends/rvf/ContrastiveTrainer.js.map +1 -0
- package/dist/src/backends/rvf/FederatedSessionManager.d.ts +212 -0
- package/dist/src/backends/rvf/FederatedSessionManager.d.ts.map +1 -0
- package/dist/src/backends/rvf/FederatedSessionManager.js +397 -0
- package/dist/src/backends/rvf/FederatedSessionManager.js.map +1 -0
- package/dist/src/backends/rvf/FilterBuilder.d.ts +136 -0
- package/dist/src/backends/rvf/FilterBuilder.d.ts.map +1 -0
- package/dist/src/backends/rvf/FilterBuilder.js +157 -0
- package/dist/src/backends/rvf/FilterBuilder.js.map +1 -0
- package/dist/src/backends/rvf/NativeAccelerator.d.ts +158 -0
- package/dist/src/backends/rvf/NativeAccelerator.d.ts.map +1 -0
- package/dist/src/backends/rvf/NativeAccelerator.js +702 -0
- package/dist/src/backends/rvf/NativeAccelerator.js.map +1 -0
- package/dist/src/backends/rvf/RvfBackend.d.ts +207 -0
- package/dist/src/backends/rvf/RvfBackend.d.ts.map +1 -0
- package/dist/src/backends/rvf/RvfBackend.js +651 -0
- package/dist/src/backends/rvf/RvfBackend.js.map +1 -0
- package/dist/src/backends/rvf/RvfSolver.d.ts +175 -0
- package/dist/src/backends/rvf/RvfSolver.d.ts.map +1 -0
- package/dist/src/backends/rvf/RvfSolver.js +176 -0
- package/dist/src/backends/rvf/RvfSolver.js.map +1 -0
- package/dist/src/backends/rvf/SelfLearningRvfBackend.d.ts +143 -0
- package/dist/src/backends/rvf/SelfLearningRvfBackend.d.ts.map +1 -0
- package/dist/src/backends/rvf/SelfLearningRvfBackend.js +612 -0
- package/dist/src/backends/rvf/SelfLearningRvfBackend.js.map +1 -0
- package/dist/src/backends/rvf/SemanticQueryRouter.d.ts +128 -0
- package/dist/src/backends/rvf/SemanticQueryRouter.d.ts.map +1 -0
- package/dist/src/backends/rvf/SemanticQueryRouter.js +415 -0
- package/dist/src/backends/rvf/SemanticQueryRouter.js.map +1 -0
- package/dist/src/backends/rvf/SimdFallbacks.d.ts +25 -0
- package/dist/src/backends/rvf/SimdFallbacks.d.ts.map +1 -0
- package/dist/src/backends/rvf/SimdFallbacks.js +287 -0
- package/dist/src/backends/rvf/SimdFallbacks.js.map +1 -0
- package/dist/src/backends/rvf/SolverBandit.d.ts +100 -0
- package/dist/src/backends/rvf/SolverBandit.d.ts.map +1 -0
- package/dist/src/backends/rvf/SolverBandit.js +216 -0
- package/dist/src/backends/rvf/SolverBandit.js.map +1 -0
- package/dist/src/backends/rvf/SonaLearningBackend.d.ts +157 -0
- package/dist/src/backends/rvf/SonaLearningBackend.d.ts.map +1 -0
- package/dist/src/backends/rvf/SonaLearningBackend.js +283 -0
- package/dist/src/backends/rvf/SonaLearningBackend.js.map +1 -0
- package/dist/src/backends/rvf/SqlJsRvfBackend.d.ts +104 -0
- package/dist/src/backends/rvf/SqlJsRvfBackend.d.ts.map +1 -0
- package/dist/src/backends/rvf/SqlJsRvfBackend.js +464 -0
- package/dist/src/backends/rvf/SqlJsRvfBackend.js.map +1 -0
- package/dist/src/backends/rvf/WasmStoreBridge.d.ts +27 -0
- package/dist/src/backends/rvf/WasmStoreBridge.d.ts.map +1 -0
- package/dist/src/backends/rvf/WasmStoreBridge.js +87 -0
- package/dist/src/backends/rvf/WasmStoreBridge.js.map +1 -0
- package/dist/src/backends/rvf/validation.d.ts +20 -0
- package/dist/src/backends/rvf/validation.d.ts.map +1 -0
- package/dist/src/backends/rvf/validation.js +78 -0
- package/dist/src/backends/rvf/validation.js.map +1 -0
- package/dist/src/benchmark/BenchmarkSuite.d.ts +318 -0
- package/dist/src/benchmark/BenchmarkSuite.d.ts.map +1 -0
- package/dist/src/benchmark/BenchmarkSuite.js +984 -0
- package/dist/src/benchmark/BenchmarkSuite.js.map +1 -0
- package/dist/src/benchmark/index.d.ts +29 -0
- package/dist/src/benchmark/index.d.ts.map +1 -0
- package/dist/src/benchmark/index.js +39 -0
- package/dist/src/benchmark/index.js.map +1 -0
- package/dist/src/browser/AttentionBrowser.d.ts.map +1 -1
- package/dist/src/browser/AttentionBrowser.js +1 -0
- package/dist/src/browser/AttentionBrowser.js.map +1 -1
- package/dist/src/cli/agentdb-cli.d.ts +14 -0
- package/dist/src/cli/agentdb-cli.d.ts.map +1 -1
- package/dist/src/cli/agentdb-cli.js +839 -143
- package/dist/src/cli/agentdb-cli.js.map +1 -1
- package/dist/src/cli/commands/attention.js +12 -2
- package/dist/src/cli/commands/attention.js.map +1 -1
- package/dist/src/cli/commands/doctor.js +5 -5
- package/dist/src/cli/commands/doctor.js.map +1 -1
- package/dist/src/cli/commands/hyperbolic.d.ts +11 -0
- package/dist/src/cli/commands/hyperbolic.d.ts.map +1 -0
- package/dist/src/cli/commands/hyperbolic.js +440 -0
- package/dist/src/cli/commands/hyperbolic.js.map +1 -0
- package/dist/src/cli/commands/install-embeddings.d.ts +1 -1
- package/dist/src/cli/commands/install-embeddings.d.ts.map +1 -1
- package/dist/src/cli/commands/install-embeddings.js +17 -11
- package/dist/src/cli/commands/install-embeddings.js.map +1 -1
- package/dist/src/cli/commands/learn.d.ts +11 -0
- package/dist/src/cli/commands/learn.d.ts.map +1 -0
- package/dist/src/cli/commands/learn.js +410 -0
- package/dist/src/cli/commands/learn.js.map +1 -0
- package/dist/src/cli/commands/migrate.d.ts +15 -0
- package/dist/src/cli/commands/migrate.d.ts.map +1 -1
- package/dist/src/cli/commands/migrate.js +190 -10
- package/dist/src/cli/commands/migrate.js.map +1 -1
- package/dist/src/cli/commands/route.d.ts +11 -0
- package/dist/src/cli/commands/route.d.ts.map +1 -0
- package/dist/src/cli/commands/route.js +419 -0
- package/dist/src/cli/commands/route.js.map +1 -0
- package/dist/src/cli/commands/rvf.d.ts +21 -0
- package/dist/src/cli/commands/rvf.d.ts.map +1 -0
- package/dist/src/cli/commands/rvf.js +448 -0
- package/dist/src/cli/commands/rvf.js.map +1 -0
- package/dist/src/cli/commands/simulate-report.js +14 -2
- package/dist/src/cli/commands/simulate-report.js.map +1 -1
- package/dist/src/cli/lib/report-store.d.ts +2 -1
- package/dist/src/cli/lib/report-store.d.ts.map +1 -1
- package/dist/src/cli/lib/report-store.js +85 -65
- package/dist/src/cli/lib/report-store.js.map +1 -1
- package/dist/src/cli/lib/simulation-runner.d.ts +40 -3
- package/dist/src/cli/lib/simulation-runner.d.ts.map +1 -1
- package/dist/src/cli/lib/simulation-runner.js +248 -6
- package/dist/src/cli/lib/simulation-runner.js.map +1 -1
- package/dist/src/compatibility/DeprecationWarnings.d.ts +54 -0
- package/dist/src/compatibility/DeprecationWarnings.d.ts.map +1 -0
- package/dist/src/compatibility/DeprecationWarnings.js +131 -0
- package/dist/src/compatibility/DeprecationWarnings.js.map +1 -0
- package/dist/src/compatibility/MigrationUtilities.d.ts +30 -0
- package/dist/src/compatibility/MigrationUtilities.d.ts.map +1 -0
- package/dist/src/compatibility/MigrationUtilities.js +184 -0
- package/dist/src/compatibility/MigrationUtilities.js.map +1 -0
- package/dist/src/compatibility/V1toV2Adapter.d.ts +76 -0
- package/dist/src/compatibility/V1toV2Adapter.d.ts.map +1 -0
- package/dist/src/compatibility/V1toV2Adapter.js +185 -0
- package/dist/src/compatibility/V1toV2Adapter.js.map +1 -0
- package/dist/src/compatibility/VersionDetector.d.ts +32 -0
- package/dist/src/compatibility/VersionDetector.d.ts.map +1 -0
- package/dist/src/compatibility/VersionDetector.js +144 -0
- package/dist/src/compatibility/VersionDetector.js.map +1 -0
- package/dist/src/compatibility/index.d.ts +14 -0
- package/dist/src/compatibility/index.d.ts.map +1 -0
- package/dist/src/compatibility/index.js +21 -0
- package/dist/src/compatibility/index.js.map +1 -0
- package/dist/src/compatibility/types.d.ts +103 -0
- package/dist/src/compatibility/types.d.ts.map +1 -0
- package/dist/src/compatibility/types.js +5 -0
- package/dist/src/compatibility/types.js.map +1 -0
- package/dist/src/controllers/AttentionService.d.ts +99 -202
- package/dist/src/controllers/AttentionService.d.ts.map +1 -1
- package/dist/src/controllers/AttentionService.js +450 -558
- package/dist/src/controllers/AttentionService.js.map +1 -1
- package/dist/src/controllers/CausalMemoryGraph.d.ts +30 -5
- package/dist/src/controllers/CausalMemoryGraph.d.ts.map +1 -1
- package/dist/src/controllers/CausalMemoryGraph.js +92 -15
- package/dist/src/controllers/CausalMemoryGraph.js.map +1 -1
- package/dist/src/controllers/CausalRecall.d.ts +4 -0
- package/dist/src/controllers/CausalRecall.d.ts.map +1 -1
- package/dist/src/controllers/CausalRecall.js +23 -5
- package/dist/src/controllers/CausalRecall.js.map +1 -1
- package/dist/src/controllers/EmbeddingService.d.ts +29 -0
- package/dist/src/controllers/EmbeddingService.d.ts.map +1 -1
- package/dist/src/controllers/EmbeddingService.js +154 -32
- package/dist/src/controllers/EmbeddingService.js.map +1 -1
- package/dist/src/controllers/EnhancedEmbeddingService.d.ts +4 -0
- package/dist/src/controllers/EnhancedEmbeddingService.d.ts.map +1 -1
- package/dist/src/controllers/EnhancedEmbeddingService.js +21 -7
- package/dist/src/controllers/EnhancedEmbeddingService.js.map +1 -1
- package/dist/src/controllers/ExplainableRecall.d.ts +1 -1
- package/dist/src/controllers/ExplainableRecall.d.ts.map +1 -1
- package/dist/src/controllers/ExplainableRecall.js +1 -1
- package/dist/src/controllers/ExplainableRecall.js.map +1 -1
- package/dist/src/controllers/HNSWIndex.d.ts +20 -2
- package/dist/src/controllers/HNSWIndex.d.ts.map +1 -1
- package/dist/src/controllers/HNSWIndex.js +114 -39
- package/dist/src/controllers/HNSWIndex.js.map +1 -1
- package/dist/src/controllers/LearningSystem.d.ts +6 -17
- package/dist/src/controllers/LearningSystem.d.ts.map +1 -1
- package/dist/src/controllers/LearningSystem.js +66 -155
- package/dist/src/controllers/LearningSystem.js.map +1 -1
- package/dist/src/controllers/MemoryController.d.ts +174 -0
- package/dist/src/controllers/MemoryController.d.ts.map +1 -0
- package/dist/src/controllers/MemoryController.js +320 -0
- package/dist/src/controllers/MemoryController.js.map +1 -0
- package/dist/src/controllers/MetadataFilter.d.ts.map +1 -1
- package/dist/src/controllers/MetadataFilter.js +38 -26
- package/dist/src/controllers/MetadataFilter.js.map +1 -1
- package/dist/src/controllers/MincutService.d.ts +92 -0
- package/dist/src/controllers/MincutService.d.ts.map +1 -0
- package/dist/src/controllers/MincutService.js +336 -0
- package/dist/src/controllers/MincutService.js.map +1 -0
- package/dist/src/controllers/NightlyLearner.d.ts +5 -1
- package/dist/src/controllers/NightlyLearner.d.ts.map +1 -1
- package/dist/src/controllers/NightlyLearner.js +45 -31
- package/dist/src/controllers/NightlyLearner.js.map +1 -1
- package/dist/src/controllers/QUICClient.d.ts +45 -0
- package/dist/src/controllers/QUICClient.d.ts.map +1 -1
- package/dist/src/controllers/QUICClient.js +211 -21
- package/dist/src/controllers/QUICClient.js.map +1 -1
- package/dist/src/controllers/QUICServer.d.ts.map +1 -1
- package/dist/src/controllers/QUICServer.js +36 -27
- package/dist/src/controllers/QUICServer.js.map +1 -1
- package/dist/src/controllers/ReasoningBank.d.ts +6 -3
- package/dist/src/controllers/ReasoningBank.d.ts.map +1 -1
- package/dist/src/controllers/ReasoningBank.js +77 -56
- package/dist/src/controllers/ReasoningBank.js.map +1 -1
- package/dist/src/controllers/ReflexionMemory.d.ts +129 -6
- package/dist/src/controllers/ReflexionMemory.d.ts.map +1 -1
- package/dist/src/controllers/ReflexionMemory.js +678 -220
- package/dist/src/controllers/ReflexionMemory.js.map +1 -1
- package/dist/src/controllers/SkillLibrary.d.ts +32 -3
- package/dist/src/controllers/SkillLibrary.d.ts.map +1 -1
- package/dist/src/controllers/SkillLibrary.js +239 -104
- package/dist/src/controllers/SkillLibrary.js.map +1 -1
- package/dist/src/controllers/SparsificationService.d.ts +151 -0
- package/dist/src/controllers/SparsificationService.d.ts.map +1 -0
- package/dist/src/controllers/SparsificationService.js +375 -0
- package/dist/src/controllers/SparsificationService.js.map +1 -0
- package/dist/src/controllers/SyncCoordinator.d.ts.map +1 -1
- package/dist/src/controllers/SyncCoordinator.js +126 -12
- package/dist/src/controllers/SyncCoordinator.js.map +1 -1
- package/dist/src/controllers/WASMVectorSearch.d.ts +12 -30
- package/dist/src/controllers/WASMVectorSearch.d.ts.map +1 -1
- package/dist/src/controllers/WASMVectorSearch.js +161 -102
- package/dist/src/controllers/WASMVectorSearch.js.map +1 -1
- package/dist/src/controllers/attention/AttentionCache.d.ts +38 -0
- package/dist/src/controllers/attention/AttentionCache.d.ts.map +1 -0
- package/dist/src/controllers/attention/AttentionCache.js +80 -0
- package/dist/src/controllers/attention/AttentionCache.js.map +1 -0
- package/dist/src/controllers/attention/AttentionConfig.d.ts +127 -0
- package/dist/src/controllers/attention/AttentionConfig.d.ts.map +1 -0
- package/dist/src/controllers/attention/AttentionConfig.js +124 -0
- package/dist/src/controllers/attention/AttentionConfig.js.map +1 -0
- package/dist/src/controllers/attention/AttentionCore.d.ts +89 -0
- package/dist/src/controllers/attention/AttentionCore.d.ts.map +1 -0
- package/dist/src/controllers/attention/AttentionCore.js +289 -0
- package/dist/src/controllers/attention/AttentionCore.js.map +1 -0
- package/dist/src/controllers/attention/AttentionHelpers.d.ts +55 -0
- package/dist/src/controllers/attention/AttentionHelpers.d.ts.map +1 -0
- package/dist/src/controllers/attention/AttentionHelpers.js +148 -0
- package/dist/src/controllers/attention/AttentionHelpers.js.map +1 -0
- package/dist/src/controllers/attention/AttentionMetrics.d.ts +55 -0
- package/dist/src/controllers/attention/AttentionMetrics.d.ts.map +1 -0
- package/dist/src/controllers/attention/AttentionMetrics.js +72 -0
- package/dist/src/controllers/attention/AttentionMetrics.js.map +1 -0
- package/dist/src/controllers/attention/AttentionWASM.d.ts +98 -0
- package/dist/src/controllers/attention/AttentionWASM.d.ts.map +1 -0
- package/dist/src/controllers/attention/AttentionWASM.js +147 -0
- package/dist/src/controllers/attention/AttentionWASM.js.map +1 -0
- package/dist/src/controllers/attention/CrossAttentionController.d.ts +141 -0
- package/dist/src/controllers/attention/CrossAttentionController.d.ts.map +1 -0
- package/dist/src/controllers/attention/CrossAttentionController.js +325 -0
- package/dist/src/controllers/attention/CrossAttentionController.js.map +1 -0
- package/dist/src/controllers/attention/MultiHeadAttentionController.d.ts +137 -0
- package/dist/src/controllers/attention/MultiHeadAttentionController.d.ts.map +1 -0
- package/dist/src/controllers/attention/MultiHeadAttentionController.js +336 -0
- package/dist/src/controllers/attention/MultiHeadAttentionController.js.map +1 -0
- package/dist/src/controllers/attention/SelfAttentionController.d.ts +117 -0
- package/dist/src/controllers/attention/SelfAttentionController.d.ts.map +1 -0
- package/dist/src/controllers/attention/SelfAttentionController.js +205 -0
- package/dist/src/controllers/attention/SelfAttentionController.js.map +1 -0
- package/dist/src/controllers/attention/index.d.ts +24 -0
- package/dist/src/controllers/attention/index.d.ts.map +1 -0
- package/dist/src/controllers/attention/index.js +20 -0
- package/dist/src/controllers/attention/index.js.map +1 -0
- package/dist/src/controllers/index.d.ts +15 -28
- package/dist/src/controllers/index.d.ts.map +1 -1
- package/dist/src/controllers/index.js +11 -19
- package/dist/src/controllers/index.js.map +1 -1
- package/dist/src/controllers/prerequisites.d.ts +76 -0
- package/dist/src/controllers/prerequisites.d.ts.map +1 -0
- package/dist/src/controllers/prerequisites.js +235 -0
- package/dist/src/controllers/prerequisites.js.map +1 -0
- package/dist/src/core/AgentDB.d.ts +33 -19
- package/dist/src/core/AgentDB.d.ts.map +1 -1
- package/dist/src/core/AgentDB.js +87 -127
- package/dist/src/core/AgentDB.js.map +1 -1
- package/dist/src/core/QueryCache.d.ts +138 -0
- package/dist/src/core/QueryCache.d.ts.map +1 -0
- package/dist/src/core/QueryCache.js +309 -0
- package/dist/src/core/QueryCache.js.map +1 -0
- package/dist/src/db-fallback.d.ts +52 -4
- package/dist/src/db-fallback.d.ts.map +1 -1
- package/dist/src/db-fallback.js +521 -71
- package/dist/src/db-fallback.js.map +1 -1
- package/dist/src/db-unified.d.ts.map +1 -1
- package/dist/src/db-unified.js +32 -30
- package/dist/src/db-unified.js.map +1 -1
- package/dist/src/embedding/EmbeddingSpaceIdentity.d.ts +58 -0
- package/dist/src/embedding/EmbeddingSpaceIdentity.d.ts.map +1 -0
- package/dist/src/embedding/EmbeddingSpaceIdentity.js +137 -0
- package/dist/src/embedding/EmbeddingSpaceIdentity.js.map +1 -0
- package/dist/src/embedding/index.d.ts +3 -0
- package/dist/src/embedding/index.d.ts.map +1 -0
- package/dist/src/embedding/index.js +2 -0
- package/dist/src/embedding/index.js.map +1 -0
- package/dist/src/examples/quic-sync-example.js +2 -2
- package/dist/src/examples/quic-sync-example.js.map +1 -1
- package/dist/src/governance/MetaHarnessGateway.d.ts +55 -0
- package/dist/src/governance/MetaHarnessGateway.d.ts.map +1 -0
- package/dist/src/governance/MetaHarnessGateway.js +65 -0
- package/dist/src/governance/MetaHarnessGateway.js.map +1 -0
- package/dist/src/governance/RvfExperimentBranch.d.ts +65 -0
- package/dist/src/governance/RvfExperimentBranch.d.ts.map +1 -0
- package/dist/src/governance/RvfExperimentBranch.js +115 -0
- package/dist/src/governance/RvfExperimentBranch.js.map +1 -0
- package/dist/src/index.d.ts +20 -16
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +44 -12
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcp/agentdb-mcp-server.js +178 -15
- package/dist/src/mcp/agentdb-mcp-server.js.map +1 -1
- package/dist/src/mcp/reset-database.d.ts +15 -0
- package/dist/src/mcp/reset-database.d.ts.map +1 -0
- package/dist/src/mcp/reset-database.js +45 -0
- package/dist/src/mcp/reset-database.js.map +1 -0
- package/dist/src/model/ModelCacheLoader.d.ts +31 -0
- package/dist/src/model/ModelCacheLoader.d.ts.map +1 -0
- package/dist/src/model/ModelCacheLoader.js +209 -0
- package/dist/src/model/ModelCacheLoader.js.map +1 -0
- package/dist/src/observability/index.d.ts +8 -0
- package/dist/src/observability/index.d.ts.map +1 -0
- package/dist/src/observability/index.js +8 -0
- package/dist/src/observability/index.js.map +1 -0
- package/dist/src/observability/integration.d.ts +32 -0
- package/dist/src/observability/integration.d.ts.map +1 -0
- package/dist/src/observability/integration.js +159 -0
- package/dist/src/observability/integration.js.map +1 -0
- package/dist/src/observability/telemetry.d.ts +137 -0
- package/dist/src/observability/telemetry.d.ts.map +1 -0
- package/dist/src/observability/telemetry.js +424 -0
- package/dist/src/observability/telemetry.js.map +1 -0
- package/dist/src/optimizations/BatchOperations.d.ts +47 -0
- package/dist/src/optimizations/BatchOperations.d.ts.map +1 -1
- package/dist/src/optimizations/BatchOperations.js +189 -35
- package/dist/src/optimizations/BatchOperations.js.map +1 -1
- package/dist/src/optimizations/Quantization.d.ts +330 -0
- package/dist/src/optimizations/Quantization.d.ts.map +1 -0
- package/dist/src/optimizations/Quantization.js +793 -0
- package/dist/src/optimizations/Quantization.js.map +1 -0
- package/dist/src/optimizations/index.d.ts +1 -3
- package/dist/src/optimizations/index.d.ts.map +1 -1
- package/dist/src/optimizations/index.js +0 -1
- package/dist/src/optimizations/index.js.map +1 -1
- package/dist/src/quantization/index.d.ts +7 -0
- package/dist/src/quantization/index.d.ts.map +1 -0
- package/dist/src/quantization/index.js +15 -0
- package/dist/src/quantization/index.js.map +1 -0
- package/dist/src/quantization/vector-quantization.d.ts +388 -0
- package/dist/src/quantization/vector-quantization.d.ts.map +1 -0
- package/dist/src/quantization/vector-quantization.js +1132 -0
- package/dist/src/quantization/vector-quantization.js.map +1 -0
- package/dist/src/schemas/inline.d.ts +3 -0
- package/dist/src/schemas/inline.d.ts.map +1 -0
- package/dist/src/schemas/inline.js +10 -0
- package/dist/src/schemas/inline.js.map +1 -0
- package/dist/src/search/HybridSearch.d.ts +311 -0
- package/dist/src/search/HybridSearch.d.ts.map +1 -0
- package/dist/src/search/HybridSearch.js +713 -0
- package/dist/src/search/HybridSearch.js.map +1 -0
- package/dist/src/search/index.d.ts +12 -0
- package/dist/src/search/index.d.ts.map +1 -0
- package/dist/src/search/index.js +16 -0
- package/dist/src/search/index.js.map +1 -0
- package/dist/src/security/input-validation.d.ts +30 -0
- package/dist/src/security/input-validation.d.ts.map +1 -1
- package/dist/src/security/input-validation.js +77 -3
- package/dist/src/security/input-validation.js.map +1 -1
- package/dist/src/security/limits.d.ts.map +1 -1
- package/dist/src/security/limits.js +12 -3
- package/dist/src/security/limits.js.map +1 -1
- package/dist/src/security/mcp-policy.d.ts +17 -0
- package/dist/src/security/mcp-policy.d.ts.map +1 -0
- package/dist/src/security/mcp-policy.js +90 -0
- package/dist/src/security/mcp-policy.js.map +1 -0
- package/dist/src/security/path-security.d.ts.map +1 -1
- package/dist/src/security/path-security.js +3 -1
- package/dist/src/security/path-security.js.map +1 -1
- package/dist/src/security/validation.js +3 -3
- package/dist/src/security/validation.js.map +1 -1
- package/dist/src/services/AttentionService.d.ts +303 -0
- package/dist/src/services/AttentionService.d.ts.map +1 -0
- package/dist/src/services/AttentionService.js +1165 -0
- package/dist/src/services/AttentionService.js.map +1 -0
- package/dist/src/services/LLMRouter.d.ts +70 -8
- package/dist/src/services/LLMRouter.d.ts.map +1 -1
- package/dist/src/services/LLMRouter.js +279 -28
- package/dist/src/services/LLMRouter.js.map +1 -1
- package/dist/src/services/audit-logger.service.d.ts +168 -0
- package/dist/src/services/audit-logger.service.d.ts.map +1 -0
- package/dist/src/services/audit-logger.service.js +331 -0
- package/dist/src/services/audit-logger.service.js.map +1 -0
- package/dist/src/services/enhanced-embeddings.d.ts +271 -0
- package/dist/src/services/enhanced-embeddings.d.ts.map +1 -0
- package/dist/src/services/enhanced-embeddings.js +1036 -0
- package/dist/src/services/enhanced-embeddings.js.map +1 -0
- package/dist/src/services/federated-learning.d.ts +172 -0
- package/dist/src/services/federated-learning.d.ts.map +1 -0
- package/dist/src/services/federated-learning.js +344 -0
- package/dist/src/services/federated-learning.js.map +1 -0
- package/dist/src/simd/index.d.ts +9 -0
- package/dist/src/simd/index.d.ts.map +1 -0
- package/dist/src/simd/index.js +27 -0
- package/dist/src/simd/index.js.map +1 -0
- package/dist/src/simd/simd-vector-ops.d.ts +332 -0
- package/dist/src/simd/simd-vector-ops.d.ts.map +1 -0
- package/dist/src/simd/simd-vector-ops.js +945 -0
- package/dist/src/simd/simd-vector-ops.js.map +1 -0
- package/dist/src/types/database.types.d.ts +275 -0
- package/dist/src/types/database.types.d.ts.map +1 -0
- package/dist/src/types/database.types.js +55 -0
- package/dist/src/types/database.types.js.map +1 -0
- package/dist/src/types/graph.d.ts +29 -0
- package/dist/src/types/graph.d.ts.map +1 -0
- package/dist/src/types/graph.js +8 -0
- package/dist/src/types/graph.js.map +1 -0
- package/dist/src/utils/chalk-fallback.d.ts +3 -0
- package/dist/src/utils/chalk-fallback.d.ts.map +1 -0
- package/dist/src/utils/chalk-fallback.js +20 -0
- package/dist/src/utils/chalk-fallback.js.map +1 -0
- package/dist/src/utils/similarity.d.ts +11 -0
- package/dist/src/utils/similarity.d.ts.map +1 -0
- package/dist/src/utils/similarity.js +25 -0
- package/dist/src/utils/similarity.js.map +1 -0
- package/dist/src/wasm-loader.d.ts +66 -0
- package/dist/src/wasm-loader.d.ts.map +1 -0
- package/dist/src/wasm-loader.js +76 -0
- package/dist/src/wasm-loader.js.map +1 -0
- package/dist/src/wrappers/agentdb-fast.d.ts +140 -0
- package/dist/src/wrappers/agentdb-fast.d.ts.map +1 -0
- package/dist/src/wrappers/agentdb-fast.js +309 -0
- package/dist/src/wrappers/agentdb-fast.js.map +1 -0
- package/dist/src/wrappers/attention-fallbacks.d.ts +343 -0
- package/dist/src/wrappers/attention-fallbacks.d.ts.map +1 -0
- package/dist/src/wrappers/attention-fallbacks.js +1484 -0
- package/dist/src/wrappers/attention-fallbacks.js.map +1 -0
- package/dist/src/wrappers/attention-native.d.ts +111 -0
- package/dist/src/wrappers/attention-native.d.ts.map +1 -0
- package/dist/src/wrappers/attention-native.js +273 -0
- package/dist/src/wrappers/attention-native.js.map +1 -0
- package/dist/src/wrappers/embedding-service.d.ts +117 -0
- package/dist/src/wrappers/embedding-service.d.ts.map +1 -0
- package/dist/src/wrappers/embedding-service.js +370 -0
- package/dist/src/wrappers/embedding-service.js.map +1 -0
- package/dist/src/wrappers/gnn-wrapper.d.ts +71 -0
- package/dist/src/wrappers/gnn-wrapper.d.ts.map +1 -0
- package/dist/src/wrappers/gnn-wrapper.js +236 -0
- package/dist/src/wrappers/gnn-wrapper.js.map +1 -0
- package/dist/src/wrappers/index.d.ts +48 -0
- package/dist/src/wrappers/index.d.ts.map +1 -0
- package/dist/src/wrappers/index.js +83 -0
- package/dist/src/wrappers/index.js.map +1 -0
- package/package.json +130 -80
- package/scripts/postinstall.cjs +13 -144
- package/dist/agentdb.browser.js +0 -1685
- package/dist/agentdb.browser.js.map +0 -7
- package/dist/agentdb.browser.min.js +0 -3
- package/dist/agentdb.browser.min.js.map +0 -7
- package/dist/agentdb.wasm-loader.js +0 -207
- package/dist/backends/VectorBackend.d.ts +0 -120
- package/dist/backends/VectorBackend.js +0 -14
- package/dist/backends/VectorBackend.js.map +0 -1
- package/dist/optimizations/RVFOptimizer.d.ts +0 -225
- package/dist/optimizations/RVFOptimizer.js +0 -541
- package/dist/optimizations/RVFOptimizer.js.map +0 -1
- package/dist/simulation/cli.d.ts +0 -9
- package/dist/simulation/cli.d.ts.map +0 -1
- package/dist/simulation/cli.js +0 -68
- package/dist/simulation/cli.js.map +0 -1
- package/dist/simulation/runner.d.ts +0 -21
- package/dist/simulation/runner.d.ts.map +0 -1
- package/dist/simulation/runner.js +0 -241
- package/dist/simulation/runner.js.map +0 -1
- package/dist/simulation/scenarios/aidefence-integration.d.ts +0 -24
- package/dist/simulation/scenarios/aidefence-integration.d.ts.map +0 -1
- package/dist/simulation/scenarios/aidefence-integration.js +0 -124
- package/dist/simulation/scenarios/aidefence-integration.js.map +0 -1
- package/dist/simulation/scenarios/bmssp-integration.d.ts +0 -23
- package/dist/simulation/scenarios/bmssp-integration.d.ts.map +0 -1
- package/dist/simulation/scenarios/bmssp-integration.js +0 -104
- package/dist/simulation/scenarios/bmssp-integration.js.map +0 -1
- package/dist/simulation/scenarios/causal-reasoning.d.ts +0 -16
- package/dist/simulation/scenarios/causal-reasoning.d.ts.map +0 -1
- package/dist/simulation/scenarios/causal-reasoning.js +0 -108
- package/dist/simulation/scenarios/causal-reasoning.js.map +0 -1
- package/dist/simulation/scenarios/consciousness-explorer.d.ts +0 -25
- package/dist/simulation/scenarios/consciousness-explorer.d.ts.map +0 -1
- package/dist/simulation/scenarios/consciousness-explorer.js +0 -108
- package/dist/simulation/scenarios/consciousness-explorer.js.map +0 -1
- package/dist/simulation/scenarios/domain-examples/e-commerce-recommendations.d.ts +0 -135
- package/dist/simulation/scenarios/domain-examples/e-commerce-recommendations.d.ts.map +0 -1
- package/dist/simulation/scenarios/domain-examples/e-commerce-recommendations.js +0 -158
- package/dist/simulation/scenarios/domain-examples/e-commerce-recommendations.js.map +0 -1
- package/dist/simulation/scenarios/domain-examples/index.d.ts +0 -14
- package/dist/simulation/scenarios/domain-examples/index.d.ts.map +0 -1
- package/dist/simulation/scenarios/domain-examples/index.js +0 -14
- package/dist/simulation/scenarios/domain-examples/index.js.map +0 -1
- package/dist/simulation/scenarios/domain-examples/iot-sensor-networks.d.ts +0 -178
- package/dist/simulation/scenarios/domain-examples/iot-sensor-networks.d.ts.map +0 -1
- package/dist/simulation/scenarios/domain-examples/iot-sensor-networks.js +0 -218
- package/dist/simulation/scenarios/domain-examples/iot-sensor-networks.js.map +0 -1
- package/dist/simulation/scenarios/domain-examples/medical-imaging.d.ts +0 -122
- package/dist/simulation/scenarios/domain-examples/medical-imaging.d.ts.map +0 -1
- package/dist/simulation/scenarios/domain-examples/medical-imaging.js +0 -129
- package/dist/simulation/scenarios/domain-examples/medical-imaging.js.map +0 -1
- package/dist/simulation/scenarios/domain-examples/robotics-navigation.d.ts +0 -166
- package/dist/simulation/scenarios/domain-examples/robotics-navigation.d.ts.map +0 -1
- package/dist/simulation/scenarios/domain-examples/robotics-navigation.js +0 -161
- package/dist/simulation/scenarios/domain-examples/robotics-navigation.js.map +0 -1
- package/dist/simulation/scenarios/domain-examples/scientific-research.d.ts +0 -151
- package/dist/simulation/scenarios/domain-examples/scientific-research.d.ts.map +0 -1
- package/dist/simulation/scenarios/domain-examples/scientific-research.js +0 -187
- package/dist/simulation/scenarios/domain-examples/scientific-research.js.map +0 -1
- package/dist/simulation/scenarios/domain-examples/trading-systems.d.ts +0 -102
- package/dist/simulation/scenarios/domain-examples/trading-systems.d.ts.map +0 -1
- package/dist/simulation/scenarios/domain-examples/trading-systems.js +0 -100
- package/dist/simulation/scenarios/domain-examples/trading-systems.js.map +0 -1
- package/dist/simulation/scenarios/goalie-integration.d.ts +0 -24
- package/dist/simulation/scenarios/goalie-integration.d.ts.map +0 -1
- package/dist/simulation/scenarios/goalie-integration.js +0 -121
- package/dist/simulation/scenarios/goalie-integration.js.map +0 -1
- package/dist/simulation/scenarios/graph-traversal.d.ts +0 -17
- package/dist/simulation/scenarios/graph-traversal.d.ts.map +0 -1
- package/dist/simulation/scenarios/graph-traversal.js +0 -101
- package/dist/simulation/scenarios/graph-traversal.js.map +0 -1
- package/dist/simulation/scenarios/latent-space/attention-analysis.d.ts +0 -45
- package/dist/simulation/scenarios/latent-space/attention-analysis.d.ts.map +0 -1
- package/dist/simulation/scenarios/latent-space/attention-analysis.js +0 -435
- package/dist/simulation/scenarios/latent-space/attention-analysis.js.map +0 -1
- package/dist/simulation/scenarios/latent-space/clustering-analysis.d.ts +0 -55
- package/dist/simulation/scenarios/latent-space/clustering-analysis.d.ts.map +0 -1
- package/dist/simulation/scenarios/latent-space/clustering-analysis.js +0 -606
- package/dist/simulation/scenarios/latent-space/clustering-analysis.js.map +0 -1
- package/dist/simulation/scenarios/latent-space/hnsw-exploration.d.ts +0 -74
- package/dist/simulation/scenarios/latent-space/hnsw-exploration.d.ts.map +0 -1
- package/dist/simulation/scenarios/latent-space/hnsw-exploration.js +0 -391
- package/dist/simulation/scenarios/latent-space/hnsw-exploration.js.map +0 -1
- package/dist/simulation/scenarios/latent-space/hypergraph-exploration.d.ts +0 -51
- package/dist/simulation/scenarios/latent-space/hypergraph-exploration.d.ts.map +0 -1
- package/dist/simulation/scenarios/latent-space/hypergraph-exploration.js +0 -536
- package/dist/simulation/scenarios/latent-space/hypergraph-exploration.js.map +0 -1
- package/dist/simulation/scenarios/latent-space/index.d.ts +0 -35
- package/dist/simulation/scenarios/latent-space/index.d.ts.map +0 -1
- package/dist/simulation/scenarios/latent-space/index.js +0 -35
- package/dist/simulation/scenarios/latent-space/index.js.map +0 -1
- package/dist/simulation/scenarios/latent-space/neural-augmentation.d.ts +0 -52
- package/dist/simulation/scenarios/latent-space/neural-augmentation.d.ts.map +0 -1
- package/dist/simulation/scenarios/latent-space/neural-augmentation.js +0 -472
- package/dist/simulation/scenarios/latent-space/neural-augmentation.js.map +0 -1
- package/dist/simulation/scenarios/latent-space/quantum-hybrid.d.ts +0 -53
- package/dist/simulation/scenarios/latent-space/quantum-hybrid.d.ts.map +0 -1
- package/dist/simulation/scenarios/latent-space/quantum-hybrid.js +0 -391
- package/dist/simulation/scenarios/latent-space/quantum-hybrid.js.map +0 -1
- package/dist/simulation/scenarios/latent-space/self-organizing-hnsw.d.ts +0 -52
- package/dist/simulation/scenarios/latent-space/self-organizing-hnsw.d.ts.map +0 -1
- package/dist/simulation/scenarios/latent-space/self-organizing-hnsw.js +0 -514
- package/dist/simulation/scenarios/latent-space/self-organizing-hnsw.js.map +0 -1
- package/dist/simulation/scenarios/latent-space/traversal-optimization.d.ts +0 -53
- package/dist/simulation/scenarios/latent-space/traversal-optimization.d.ts.map +0 -1
- package/dist/simulation/scenarios/latent-space/traversal-optimization.js +0 -595
- package/dist/simulation/scenarios/latent-space/traversal-optimization.js.map +0 -1
- package/dist/simulation/scenarios/lean-agentic-swarm.d.ts +0 -18
- package/dist/simulation/scenarios/lean-agentic-swarm.d.ts.map +0 -1
- package/dist/simulation/scenarios/lean-agentic-swarm.js +0 -132
- package/dist/simulation/scenarios/lean-agentic-swarm.js.map +0 -1
- package/dist/simulation/scenarios/multi-agent-swarm.d.ts +0 -17
- package/dist/simulation/scenarios/multi-agent-swarm.d.ts.map +0 -1
- package/dist/simulation/scenarios/multi-agent-swarm.js +0 -111
- package/dist/simulation/scenarios/multi-agent-swarm.js.map +0 -1
- package/dist/simulation/scenarios/psycho-symbolic-reasoner.d.ts +0 -23
- package/dist/simulation/scenarios/psycho-symbolic-reasoner.d.ts.map +0 -1
- package/dist/simulation/scenarios/psycho-symbolic-reasoner.js +0 -98
- package/dist/simulation/scenarios/psycho-symbolic-reasoner.js.map +0 -1
- package/dist/simulation/scenarios/reflexion-learning.d.ts +0 -16
- package/dist/simulation/scenarios/reflexion-learning.d.ts.map +0 -1
- package/dist/simulation/scenarios/reflexion-learning.js +0 -98
- package/dist/simulation/scenarios/reflexion-learning.js.map +0 -1
- package/dist/simulation/scenarios/research-swarm.d.ts +0 -24
- package/dist/simulation/scenarios/research-swarm.d.ts.map +0 -1
- package/dist/simulation/scenarios/research-swarm.js +0 -146
- package/dist/simulation/scenarios/research-swarm.js.map +0 -1
- package/dist/simulation/scenarios/skill-evolution.d.ts +0 -16
- package/dist/simulation/scenarios/skill-evolution.d.ts.map +0 -1
- package/dist/simulation/scenarios/skill-evolution.js +0 -109
- package/dist/simulation/scenarios/skill-evolution.js.map +0 -1
- package/dist/simulation/scenarios/stock-market-emergence.d.ts +0 -33
- package/dist/simulation/scenarios/stock-market-emergence.d.ts.map +0 -1
- package/dist/simulation/scenarios/stock-market-emergence.js +0 -246
- package/dist/simulation/scenarios/stock-market-emergence.js.map +0 -1
- package/dist/simulation/scenarios/strange-loops.d.ts +0 -18
- package/dist/simulation/scenarios/strange-loops.d.ts.map +0 -1
- package/dist/simulation/scenarios/strange-loops.js +0 -133
- package/dist/simulation/scenarios/strange-loops.js.map +0 -1
- package/dist/simulation/scenarios/sublinear-solver.d.ts +0 -22
- package/dist/simulation/scenarios/sublinear-solver.d.ts.map +0 -1
- package/dist/simulation/scenarios/sublinear-solver.js +0 -82
- package/dist/simulation/scenarios/sublinear-solver.js.map +0 -1
- package/dist/simulation/scenarios/temporal-lead-solver.d.ts +0 -23
- package/dist/simulation/scenarios/temporal-lead-solver.d.ts.map +0 -1
- package/dist/simulation/scenarios/temporal-lead-solver.js +0 -90
- package/dist/simulation/scenarios/temporal-lead-solver.js.map +0 -1
- package/dist/simulation/scenarios/voting-system-consensus.d.ts +0 -27
- package/dist/simulation/scenarios/voting-system-consensus.d.ts.map +0 -1
- package/dist/simulation/scenarios/voting-system-consensus.js +0 -175
- package/dist/simulation/scenarios/voting-system-consensus.js.map +0 -1
- package/dist/simulation/types.d.ts +0 -162
- package/dist/simulation/types.d.ts.map +0 -1
- package/dist/simulation/types.js +0 -5
- package/dist/simulation/types.js.map +0 -1
- package/dist/simulation/utils/PerformanceOptimizer.d.ts +0 -115
- package/dist/simulation/utils/PerformanceOptimizer.d.ts.map +0 -1
- package/dist/simulation/utils/PerformanceOptimizer.js +0 -223
- package/dist/simulation/utils/PerformanceOptimizer.js.map +0 -1
- package/dist/src/backends/index.cjs +0 -6
- package/dist/src/backends/ruvector/GuardedVectorBackend.d.ts +0 -93
- package/dist/src/backends/ruvector/GuardedVectorBackend.d.ts.map +0 -1
- package/dist/src/backends/ruvector/GuardedVectorBackend.js +0 -182
- package/dist/src/backends/ruvector/GuardedVectorBackend.js.map +0 -1
- package/dist/src/consensus/RaftConsensus.d.ts +0 -220
- package/dist/src/consensus/RaftConsensus.d.ts.map +0 -1
- package/dist/src/consensus/RaftConsensus.js +0 -762
- package/dist/src/consensus/RaftConsensus.js.map +0 -1
- package/dist/src/controllers/HierarchicalMemory.d.ts +0 -197
- package/dist/src/controllers/HierarchicalMemory.d.ts.map +0 -1
- package/dist/src/controllers/HierarchicalMemory.js +0 -519
- package/dist/src/controllers/HierarchicalMemory.js.map +0 -1
- package/dist/src/controllers/MemoryConsolidation.d.ts +0 -142
- package/dist/src/controllers/MemoryConsolidation.d.ts.map +0 -1
- package/dist/src/controllers/MemoryConsolidation.js +0 -479
- package/dist/src/controllers/MemoryConsolidation.js.map +0 -1
- package/dist/src/controllers/QUICConnection.d.ts +0 -122
- package/dist/src/controllers/QUICConnection.d.ts.map +0 -1
- package/dist/src/controllers/QUICConnection.js +0 -329
- package/dist/src/controllers/QUICConnection.js.map +0 -1
- package/dist/src/controllers/QUICConnectionPool.d.ts +0 -83
- package/dist/src/controllers/QUICConnectionPool.d.ts.map +0 -1
- package/dist/src/controllers/QUICConnectionPool.js +0 -256
- package/dist/src/controllers/QUICConnectionPool.js.map +0 -1
- package/dist/src/controllers/QUICStreamManager.d.ts +0 -114
- package/dist/src/controllers/QUICStreamManager.d.ts.map +0 -1
- package/dist/src/controllers/QUICStreamManager.js +0 -267
- package/dist/src/controllers/QUICStreamManager.js.map +0 -1
- package/dist/src/controllers/StreamingEmbeddingService.d.ts +0 -82
- package/dist/src/controllers/StreamingEmbeddingService.d.ts.map +0 -1
- package/dist/src/controllers/StreamingEmbeddingService.js +0 -243
- package/dist/src/controllers/StreamingEmbeddingService.js.map +0 -1
- package/dist/src/controllers/index.cjs +0 -6
- package/dist/src/coordination/MultiDatabaseCoordinator.d.ts +0 -348
- package/dist/src/coordination/MultiDatabaseCoordinator.d.ts.map +0 -1
- package/dist/src/coordination/MultiDatabaseCoordinator.js +0 -803
- package/dist/src/coordination/MultiDatabaseCoordinator.js.map +0 -1
- package/dist/src/coordination/index.d.ts +0 -10
- package/dist/src/coordination/index.d.ts.map +0 -1
- package/dist/src/coordination/index.js +0 -10
- package/dist/src/coordination/index.js.map +0 -1
- package/dist/src/index.cjs +0 -6
- package/dist/src/optimizations/RVFOptimizer.d.ts +0 -226
- package/dist/src/optimizations/RVFOptimizer.d.ts.map +0 -1
- package/dist/src/optimizations/RVFOptimizer.js +0 -541
- package/dist/src/optimizations/RVFOptimizer.js.map +0 -1
- package/dist/src/security/AttestationLog.d.ts +0 -70
- package/dist/src/security/AttestationLog.d.ts.map +0 -1
- package/dist/src/security/AttestationLog.js +0 -174
- package/dist/src/security/AttestationLog.js.map +0 -1
- package/dist/src/security/MutationGuard.d.ts +0 -83
- package/dist/src/security/MutationGuard.d.ts.map +0 -1
- package/dist/src/security/MutationGuard.js +0 -364
- package/dist/src/security/MutationGuard.js.map +0 -1
- package/dist/src/security/index.cjs +0 -6
- package/dist/src/security/index.d.ts +0 -15
- package/dist/src/security/index.d.ts.map +0 -1
- package/dist/src/security/index.js +0 -18
- package/dist/src/security/index.js.map +0 -1
- package/dist/src/services/GNNService.d.ts +0 -172
- package/dist/src/services/GNNService.d.ts.map +0 -1
- package/dist/src/services/GNNService.js +0 -612
- package/dist/src/services/GNNService.js.map +0 -1
- package/dist/src/services/GraphTransformerService.d.ts +0 -80
- package/dist/src/services/GraphTransformerService.d.ts.map +0 -1
- package/dist/src/services/GraphTransformerService.js +0 -369
- package/dist/src/services/GraphTransformerService.js.map +0 -1
- package/dist/src/services/SemanticRouter.d.ts +0 -83
- package/dist/src/services/SemanticRouter.d.ts.map +0 -1
- package/dist/src/services/SemanticRouter.js +0 -160
- package/dist/src/services/SemanticRouter.js.map +0 -1
- package/dist/src/services/SonaTrajectoryService.d.ts +0 -224
- package/dist/src/services/SonaTrajectoryService.d.ts.map +0 -1
- package/dist/src/services/SonaTrajectoryService.js +0 -539
- package/dist/src/services/SonaTrajectoryService.js.map +0 -1
- package/dist/src/utils/LegacyAttentionAdapter.d.ts +0 -93
- package/dist/src/utils/LegacyAttentionAdapter.d.ts.map +0 -1
- package/dist/src/utils/LegacyAttentionAdapter.js +0 -241
- package/dist/src/utils/LegacyAttentionAdapter.js.map +0 -1
- package/dist/src/utils/vector-math.d.ts +0 -29
- package/dist/src/utils/vector-math.d.ts.map +0 -1
- package/dist/src/utils/vector-math.js +0 -66
- package/dist/src/utils/vector-math.js.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2025 ruv
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,344 +1,323 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/agentdb)
|
|
4
|
+
[](https://www.npmjs.com/package/agentdb)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://www.typescriptlang.org/)
|
|
4
7
|
|
|
5
|
-
[](https://github.com/ruvnet/ruvector)
|
|
9
|
+
[](#-self-learning-loop)
|
|
10
|
+
[](#-mcp-integration)
|
|
11
|
+
[](https://github.com/ruvnet/agentdb)
|
|
9
12
|
|
|
10
|
-
AgentDB
|
|
13
|
+
# AgentDB
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
**Vector memory that gets smarter every time your agent uses it.**
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
- **8 Graph-Transformer Modules** — Sublinear attention, verified training, causal attention, Granger extraction, Hamiltonian dynamics, spiking attention, game-theoretic equilibrium, product manifold distance
|
|
16
|
-
- **AttestationLog** — Append-only audit trail with cryptographic proofs for compliance and debugging
|
|
17
|
-
- **GuardedVectorBackend** — Drop-in wrapper that enforces proof gates on any vector backend
|
|
18
|
-
- **21 Active Controllers** — All cognitive memory patterns are production-ready with proof validation
|
|
19
|
-
- **Zero-Native Regression** — Package size reduced from 50.1MB to 1.4MB by removing unused binaries
|
|
20
|
-
- **Browser Support** — Runs in Node.js, browsers, edge functions, and MCP tools via WASM fallback
|
|
17
|
+
</div>
|
|
21
18
|
|
|
22
|
-
|
|
19
|
+
A single-file cognitive container — vectors, indexes, learning state, and a cryptographic audit trail in one `.rvf`. Self-learning search improves up to **36% from feedback alone**, with no manual tuning. Runs in Node, the browser, edge runtimes, and offline.
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
npm install agentdb@v3
|
|
21
|
+
<!-- ecosystem-cta:start -->
|
|
22
|
+
### Explore the wider ecosystem
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
npm install agentdb@latest
|
|
30
|
-
```
|
|
24
|
+
[](https://ruos.cognitum.one/)
|
|
31
25
|
|
|
32
|
-
|
|
26
|
+
Building agents that remember? Explore the wider ecosystem.
|
|
33
27
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
// Initialize with proof-gated vectorBackend
|
|
38
|
-
const db = new AgentDB({
|
|
39
|
-
dbPath: './agent-memory.db',
|
|
40
|
-
dimension: 384,
|
|
41
|
-
vectorBackend: 'ruvector',
|
|
42
|
-
enableProofGate: true // Default: true in v3
|
|
43
|
-
});
|
|
28
|
+
**[Explore Cognitum One](https://cognitum.one/) · [Try ruOS](https://ruos.cognitum.one/)**, an agentic desktop in your browser.
|
|
29
|
+
<!-- ecosystem-cta:end -->
|
|
44
30
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
// Access controllers
|
|
48
|
-
const reflexion = db.getController('reflexion');
|
|
49
|
-
const reasoning = db.getController('reasoning');
|
|
50
|
-
const causalGraph = db.getController('causalGraph');
|
|
51
|
-
|
|
52
|
-
// Check proof engine status
|
|
53
|
-
const guard = db.getMutationGuard();
|
|
54
|
-
console.log(guard?.getStats());
|
|
55
|
-
// Output: { engineType: 'native', proofsGenerated: 42, denials: 0 }
|
|
56
|
-
|
|
57
|
-
// Store episode with automatic proof generation
|
|
58
|
-
await reflexion.storeEpisode({
|
|
59
|
-
sessionId: 'session-1',
|
|
60
|
-
task: 'Debug authentication bug',
|
|
61
|
-
reward: 0.95,
|
|
62
|
-
success: true,
|
|
63
|
-
critique: 'OAuth2 PKCE flow was more secure than basic flow',
|
|
64
|
-
input: 'Users cannot log in',
|
|
65
|
-
output: 'Working OAuth2 implementation'
|
|
66
|
-
});
|
|
31
|
+
### Why AgentDB?
|
|
67
32
|
|
|
68
|
-
|
|
69
|
-
const patterns = await reasoning.searchPatterns({
|
|
70
|
-
task: 'authentication security',
|
|
71
|
-
k: 10,
|
|
72
|
-
threshold: 0.7
|
|
73
|
-
});
|
|
74
|
-
```
|
|
33
|
+
> Most vector databases store embeddings and call it done. AgentDB watches *which* results your agent actually used, learns from that signal, and ranks the next query better. The bandit underneath also picks the right RL algorithm, the right compression tier, and the right pattern weighting on its own — so the database itself gets sharper while you focus on the agent.
|
|
75
34
|
|
|
76
|
-
|
|
35
|
+
> The name: a database that thinks like an agent — episodic memory, skill library, causal reasoning, and a learning loop, all in one file. Built by [`rUv`](https://ruv.io) on the [`ruvector`](https://github.com/ruvnet/ruvector) Rust engine.
|
|
77
36
|
|
|
78
|
-
|
|
37
|
+
### What AgentDB Does
|
|
79
38
|
|
|
80
39
|
```
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
│
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
↓
|
|
91
|
-
┌─────────────────────────────────────────────────────┐
|
|
92
|
-
│ Backend Layer │
|
|
93
|
-
│ RuVector (native) → WASM → JavaScript │
|
|
94
|
-
└─────────────────────────────────────────────────────┘
|
|
40
|
+
Self-Learning Vector Memory
|
|
41
|
+
|
|
42
|
+
Agent ──► AgentDB (.rvf) ──► HNSW search ──► top-k results
|
|
43
|
+
│ │
|
|
44
|
+
▼ ▼
|
|
45
|
+
recordFeedback(id, reward) ◄── agent uses some, ignores rest
|
|
46
|
+
│
|
|
47
|
+
▼
|
|
48
|
+
Bandit re-tunes ranking / RL choice / compression ──► next query is smarter
|
|
95
49
|
```
|
|
96
50
|
|
|
97
|
-
|
|
51
|
+
> **3 lines to self-learning search:**
|
|
52
|
+
> ```typescript
|
|
53
|
+
> const backend = await SelfLearningRvfBackend.create({ learning: true, storagePath: "./my.rvf" });
|
|
54
|
+
> const results = await backend.searchAsync(query, 10); // search
|
|
55
|
+
> backend.recordFeedback(results[0].id, 0.9); // learn — next search is smarter
|
|
56
|
+
> ```
|
|
98
57
|
|
|
99
|
-
|
|
100
|
-
2. **MutationGuard** generates a proof (structural hash + attestation token)
|
|
101
|
-
3. **AttestationLog** records the proof attempt
|
|
102
|
-
4. **GuardedBackend** validates proof before executing native operation
|
|
103
|
-
5. **Result** returns to application with proof certificate
|
|
58
|
+
---
|
|
104
59
|
|
|
105
|
-
##
|
|
60
|
+
## Quick Start
|
|
106
61
|
|
|
107
|
-
|
|
62
|
+
There are **three ways to use AgentDB** depending on what you're building. Pick whichever matches your stack:
|
|
108
63
|
|
|
109
|
-
|
|
64
|
+
| | **npm library** | **CLI** | **MCP server** |
|
|
65
|
+
|---|---|---|---|
|
|
66
|
+
| **What you get** | TypeScript / JS API for any Node app | `agentdb` binary, scriptable from any shell | 41 tools callable from Claude Code, Cursor, Cline, etc. |
|
|
67
|
+
| **Install** | `npm i agentdb` | `npx agentdb …` (no install) | `claude mcp add agentdb -- npx agentdb mcp start` |
|
|
68
|
+
| **Best for** | Embedding the engine in your own code | Quick experiments, CI scripts, ad-hoc memory | Plugging memory + learning into an LLM agent |
|
|
110
69
|
|
|
111
|
-
|
|
112
|
-
import { MutationGuard } from 'agentdb/security';
|
|
70
|
+
### Path A — npm library
|
|
113
71
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
enableNative: true // Prefer native proofs
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
// Insert requires proof
|
|
120
|
-
const proof = guard.generateProof({
|
|
121
|
-
operation: 'insert',
|
|
122
|
-
vectorId: 'vec-123',
|
|
123
|
-
embedding: [0.1, 0.2, ...],
|
|
124
|
-
metadata: { source: 'reflexion' }
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
// Proof includes:
|
|
128
|
-
// - structuralHash: SHA-256 of operation + data
|
|
129
|
-
// - attestationToken: 82-byte cryptographic token
|
|
130
|
-
// - timestamp: ISO8601 timestamp
|
|
131
|
-
// - nonce: Random 16-byte nonce
|
|
132
|
-
|
|
133
|
-
// Backend validates before execution
|
|
134
|
-
if (guard.validateProof(proof)) {
|
|
135
|
-
backend.insert(proof.vectorId, proof.embedding, proof.metadata);
|
|
136
|
-
}
|
|
72
|
+
```bash
|
|
73
|
+
npm install agentdb
|
|
137
74
|
```
|
|
138
75
|
|
|
139
|
-
### 2. Eight Graph-Transformer Modules
|
|
140
|
-
|
|
141
|
-
Native Rust implementations via `@ruvector/graph-transformer`:
|
|
142
|
-
|
|
143
|
-
- **Sublinear Attention** — O(n log n) replacing O(n²) JavaScript fallback
|
|
144
|
-
- **Verified Training** — SGD with cryptographic proof of each gradient step
|
|
145
|
-
- **Causal Attention** — Temporal-decay weighted attention for CausalRecall
|
|
146
|
-
- **Granger Extract** — Time-series causal discovery for memory graphs
|
|
147
|
-
- **Hamiltonian Step** — Physics-informed trajectory modeling
|
|
148
|
-
- **Spiking Attention** — Biological integrate-and-fire for episodic memory
|
|
149
|
-
- **Game-Theoretic Attention** — Nash equilibrium for multi-agent routing
|
|
150
|
-
- **Product Manifold Distance** — Curved-space similarity for reasoning patterns
|
|
151
|
-
|
|
152
76
|
```typescript
|
|
153
|
-
import {
|
|
77
|
+
import { SelfLearningRvfBackend } from 'agentdb';
|
|
154
78
|
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
79
|
+
const db = await SelfLearningRvfBackend.create({
|
|
80
|
+
learning: true,
|
|
81
|
+
storagePath: './memory.rvf',
|
|
158
82
|
});
|
|
159
83
|
|
|
160
|
-
await
|
|
161
|
-
|
|
162
|
-
//
|
|
163
|
-
const attended = await transformer.sublinearAttention(
|
|
164
|
-
queryVector,
|
|
165
|
-
keyMatrix,
|
|
166
|
-
valueMatrix
|
|
167
|
-
);
|
|
168
|
-
|
|
169
|
-
// Verify training step
|
|
170
|
-
const trainingProof = await transformer.verifiedTraining(
|
|
171
|
-
weights,
|
|
172
|
-
gradients,
|
|
173
|
-
learningRate
|
|
174
|
-
);
|
|
84
|
+
await db.insertAsync('doc1', new Float32Array(384), { text: 'Hello world' });
|
|
85
|
+
const hits = await db.searchAsync(queryEmbedding, 5);
|
|
86
|
+
db.recordFeedback(hits[0].id, 1.0); // it was useful — db gets smarter
|
|
175
87
|
```
|
|
176
88
|
|
|
177
|
-
###
|
|
178
|
-
|
|
179
|
-
All cognitive memory patterns are production-ready:
|
|
89
|
+
### Path B — CLI in 10 seconds
|
|
180
90
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
- **NightlyLearner** — Automated pattern discovery
|
|
188
|
-
- **LearningSystem** — 9 RL algorithms (Q-Learning, DQN, PPO, MCTS, etc.)
|
|
189
|
-
- **EmbeddingService** — Multi-provider embeddings (Transformers.js, OpenAI)
|
|
190
|
-
- **WASMVectorSearch** — Browser-compatible vector search
|
|
191
|
-
- **HNSWIndex** — HNSW graph indexing for approximate nearest neighbor
|
|
192
|
-
- **AttentionService** — 5 attention mechanisms (causal, spiking, game-theoretic)
|
|
193
|
-
- **And 9 more** — See [docs/CONTROLLERS.md](./docs/CONTROLLERS.md)
|
|
91
|
+
```bash
|
|
92
|
+
# Try it without installing
|
|
93
|
+
npx agentdb init my-memory.rvf
|
|
94
|
+
npx agentdb add my-memory.rvf "vector memory that learns"
|
|
95
|
+
npx agentdb search my-memory.rvf "self-improving search" --top-k 5
|
|
96
|
+
```
|
|
194
97
|
|
|
195
|
-
|
|
98
|
+
### Path C — MCP server (Claude Code, Cursor, etc.)
|
|
196
99
|
|
|
197
100
|
```bash
|
|
198
|
-
|
|
199
|
-
|
|
101
|
+
claude mcp add agentdb -- npx agentdb@latest mcp start
|
|
102
|
+
```
|
|
200
103
|
|
|
201
|
-
|
|
202
|
-
npm install agentdb@latest
|
|
104
|
+
That registers 41 MCP tools — `agentdb_pattern_store`, `agentdb_pattern_search`, `agentdb_hierarchical_store`, `agentdb_causal_edge`, `agentdb_skill_library`, `agentdb_reflexion`, etc. They call the same engine the npm library does, just over Claude's tool-calling surface.
|
|
203
105
|
|
|
204
|
-
|
|
205
|
-
npm install agentdb@v3 ruvector@latest
|
|
106
|
+
---
|
|
206
107
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
108
|
+
## What You Get
|
|
109
|
+
|
|
110
|
+
| Capability | Description |
|
|
111
|
+
|------------|-------------|
|
|
112
|
+
| 🧠 **Self-Learning Search** | Up to **+36% search quality** from feedback alone — Thompson Sampling bandit re-tunes ranking, RL choice, and compression tier with zero manual config |
|
|
113
|
+
| 🐝 **Cognitive Memory** | 6 human-inspired patterns — episodic replay (Reflexion), skill library, causal reasoning, hierarchical context, semantic clustering, working memory |
|
|
114
|
+
| 🤖 **9 RL Algorithms** | Q-Learning, SARSA, DQN, PPO, Actor-Critic, Policy Gradient, Decision Transformer, MCTS, Model-Based RL — bandit picks the right one per task |
|
|
115
|
+
| ⚡ **150× faster than SQLite** | RuVector Rust engine via NAPI bindings; HNSW vector search; sub-millisecond reads on 100k+ vectors |
|
|
116
|
+
| 🔍 **Hybrid Search** | BM25 keyword + dense vector fused with Reciprocal Rank Fusion — exact terms *and* semantic intent in one query |
|
|
117
|
+
| 🕸️ **Graph Intelligence** | Cypher queries, causal edges, GNN 8-head attention (+12.4% recall), hyperedges for n-ary relationships |
|
|
118
|
+
| 💾 **Single-file Storage** | Everything (vectors, indexes, learning state, audit log) in one `.rvf` "Cognitive Container" — no servers, no API keys, no monthly bills |
|
|
119
|
+
| 🎯 **Quantization** | 4-32× memory reduction with PQ8 / PQ4 / binary quantization; minimal recall loss; runs on commodity hardware |
|
|
120
|
+
| 🔌 **41 MCP Tools** | First-class Claude Code / Cursor / Cline integration — pattern store, search, skill library, reflexion, causal edges, hierarchical recall, delete |
|
|
121
|
+
| 🌐 **Runs Anywhere** | Node, browser (WASM), edge runtimes, fully offline — same API, same `.rvf` file |
|
|
122
|
+
| 🛡️ **Enterprise Security** | JWT auth, API key rotation, Argon2id hashing, SOC2 / GDPR audit trails, cryptographic witness chain |
|
|
123
|
+
| 🔗 **agentic-flow Integration** | Drop-in for [`agentic-flow`](https://github.com/ruvnet/agentic-flow) — backs ReasoningBank, MemoryController, NightlyLearner, and 30+ agents |
|
|
211
124
|
|
|
212
|
-
|
|
125
|
+
---
|
|
213
126
|
|
|
214
|
-
|
|
127
|
+
## 🧠 Self-Learning Loop
|
|
215
128
|
|
|
216
|
-
|
|
217
|
-
import { AgentDB } from 'agentdb';
|
|
218
|
-
|
|
219
|
-
const db = new AgentDB({
|
|
220
|
-
dbPath: './memory.db',
|
|
221
|
-
dimension: 384,
|
|
222
|
-
vectorBackend: 'ruvector', // or 'hnswlib' | 'sqlite'
|
|
223
|
-
enableProofGate: true,
|
|
224
|
-
strictMode: true
|
|
225
|
-
});
|
|
129
|
+
Most retrieval systems are read-only. AgentDB closes the loop:
|
|
226
130
|
|
|
227
|
-
await db.initialize();
|
|
228
131
|
```
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
// Access proof engine
|
|
240
|
-
const guard = db.getMutationGuard();
|
|
241
|
-
const stats = guard?.getStats();
|
|
132
|
+
search ──► top-k ──► agent picks the useful ones ──► recordFeedback()
|
|
133
|
+
│
|
|
134
|
+
▼
|
|
135
|
+
Thompson Sampling bandit
|
|
136
|
+
│
|
|
137
|
+
▼
|
|
138
|
+
re-weights ranking · re-picks RL algorithm · re-tunes compression
|
|
139
|
+
│
|
|
140
|
+
▼
|
|
141
|
+
next search is sharper
|
|
242
142
|
```
|
|
243
143
|
|
|
244
|
-
|
|
144
|
+
The bandit isn't a gimmick — it's used at four decision points:
|
|
245
145
|
|
|
246
|
-
|
|
247
|
-
|
|
146
|
+
1. **Pattern ranking** — which historical pattern matches this new query best?
|
|
147
|
+
2. **RL algorithm selection** — Q-Learning for tabular tasks, PPO for continuous control, MCTS for planning, etc.
|
|
148
|
+
3. **Compression tier** — full precision when accuracy matters, PQ4 when memory does.
|
|
149
|
+
4. **Skill composition** — chain skill A→B→C or skill A→D→E?
|
|
248
150
|
|
|
249
|
-
|
|
250
|
-
const guard = new MutationGuard({
|
|
251
|
-
strictMode: true,
|
|
252
|
-
enableNative: true,
|
|
253
|
-
logPath: './attestations.log'
|
|
254
|
-
});
|
|
151
|
+
Each decision logs reward over time. Bad arms decay fast. Good arms stick.
|
|
255
152
|
|
|
256
|
-
|
|
257
|
-
const proof = guard.generateProof({
|
|
258
|
-
operation: 'insert',
|
|
259
|
-
vectorId: 'vec-123',
|
|
260
|
-
embedding: embedding,
|
|
261
|
-
metadata: { source: 'test' }
|
|
262
|
-
});
|
|
153
|
+
---
|
|
263
154
|
|
|
264
|
-
|
|
265
|
-
const log = guard.getAttestationLog();
|
|
266
|
-
const recentProofs = await log.query({ limit: 10 });
|
|
267
|
-
```
|
|
155
|
+
## ⚡ Performance
|
|
268
156
|
|
|
269
|
-
|
|
157
|
+
| Metric | AgentDB | Baseline | Source |
|
|
158
|
+
|---|---|---|---|
|
|
159
|
+
| Vector search (100k vectors) | **<1 ms** | ~150 ms (SQLite + cosine loop) | `benchmarks/hnsw/` |
|
|
160
|
+
| HNSW query (1M vectors) | **2–5 ms** | ~100 ms (brute force) | `benchmarks/vector-search/` |
|
|
161
|
+
| Bulk insert (10k vectors) | **<100 ms** | ~12 s (sql.js) | `benchmarks/database/` |
|
|
162
|
+
| Memory footprint (1M × 384d) | **~96 MB (PQ8)** | ~1.5 GB (raw f32) | `benchmarks/quantization/` |
|
|
163
|
+
| Self-learning quality lift | **+36%** | n/a | `benchmarks/ruvector-performance.test.ts` |
|
|
164
|
+
| GNN attention recall | **+12.4%** | baseline HNSW | `benchmarks/attention-performance.ts` |
|
|
270
165
|
|
|
271
|
-
|
|
272
|
-
import { GuardedVectorBackend } from 'agentdb/backends';
|
|
166
|
+
Run them yourself: `npm run bench` from this repo.
|
|
273
167
|
|
|
274
|
-
|
|
275
|
-
const guardedBackend = new GuardedVectorBackend(rawBackend, guard);
|
|
168
|
+
---
|
|
276
169
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
170
|
+
## 🔌 MCP Integration
|
|
171
|
+
|
|
172
|
+
41 tools across six families, all callable from Claude Code, Cursor, Cline, or any MCP-compatible client:
|
|
173
|
+
|
|
174
|
+
<details>
|
|
175
|
+
<summary><strong>Pattern Store / Search (8 tools)</strong></summary>
|
|
176
|
+
|
|
177
|
+
| Tool | Purpose |
|
|
178
|
+
|---|---|
|
|
179
|
+
| `agentdb_pattern_store` | Store a successful pattern with embedding + metadata |
|
|
180
|
+
| `agentdb_pattern_search` | Semantic search for similar past patterns |
|
|
181
|
+
| `agentdb_pattern_stats` | Retrieval stats, cache hits, hit-rate trends |
|
|
182
|
+
| `agentdb_pattern_delete` | Remove a pattern by id |
|
|
183
|
+
| `agentdb_batch_insert` | Bulk insert many patterns at once |
|
|
184
|
+
| `agentdb_batch_search` | Parallel multi-query search |
|
|
185
|
+
| `agentdb_export` | Dump patterns to JSON / CSV |
|
|
186
|
+
| `agentdb_import` | Load patterns from JSON / CSV |
|
|
187
|
+
|
|
188
|
+
</details>
|
|
189
|
+
|
|
190
|
+
<details>
|
|
191
|
+
<summary><strong>Hierarchical / Causal Memory (10 tools)</strong></summary>
|
|
192
|
+
|
|
193
|
+
| Tool | Purpose |
|
|
194
|
+
|---|---|
|
|
195
|
+
| `agentdb_hierarchical_store` | Tier-aware memory store (working / short / long) |
|
|
196
|
+
| `agentdb_hierarchical_recall` | Tier-filtered retrieval |
|
|
197
|
+
| `agentdb_hierarchical_delete` | Remove hierarchical entry by key |
|
|
198
|
+
| `agentdb_causal_edge` | Add a causal relationship between memories |
|
|
199
|
+
| `agentdb_causal_edge_delete` | Remove a causal edge by id |
|
|
200
|
+
| `agentdb_causal_node_delete` | Cascade-delete a node + incident edges |
|
|
201
|
+
| `agentdb_edges_by_endpoints` | Bulk-delete edges by `(from, to, label)` |
|
|
202
|
+
| `agentdb_causal_query` | Cypher-like graph queries |
|
|
203
|
+
| `agentdb_causal_explain` | Explain why two memories are connected |
|
|
204
|
+
| `agentdb_attestation_log` | Cryptographic audit trail |
|
|
205
|
+
|
|
206
|
+
</details>
|
|
207
|
+
|
|
208
|
+
<details>
|
|
209
|
+
<summary><strong>Reflexion + Skill Library (12 tools)</strong></summary>
|
|
210
|
+
|
|
211
|
+
| Tool | Purpose |
|
|
212
|
+
|---|---|
|
|
213
|
+
| `agentdb_reflexion_store` | Store an episode (task + outcome + critique) |
|
|
214
|
+
| `agentdb_reflexion_recall` | Retrieve relevant past episodes |
|
|
215
|
+
| `agentdb_reflexion_delete` | Remove an episode |
|
|
216
|
+
| `agentdb_reflexion_rebuild` | Re-hydrate vector index from durable SQL |
|
|
217
|
+
| `agentdb_skill_create` | Create a reusable skill from a pattern |
|
|
218
|
+
| `agentdb_skill_compose` | Chain skills A→B→C with bandit-picked composition |
|
|
219
|
+
| `agentdb_skill_search` | Find skills by intent embedding |
|
|
220
|
+
| `agentdb_critique_summary` | Summarize lessons from past failures |
|
|
221
|
+
| `agentdb_success_strategies` | Surface what worked across past episodes |
|
|
222
|
+
| `agentdb_task_stats` | Per-task win-rate, latency, reward trends |
|
|
223
|
+
| `agentdb_prune` | TTL + quality-based episode pruning |
|
|
224
|
+
| `agentdb_warm_cache` | Pre-populate query cache for a session |
|
|
225
|
+
|
|
226
|
+
</details>
|
|
227
|
+
|
|
228
|
+
<details>
|
|
229
|
+
<summary><strong>Learning + Routing (11 tools)</strong></summary>
|
|
230
|
+
|
|
231
|
+
| Tool | Purpose |
|
|
232
|
+
|---|---|
|
|
233
|
+
| `agentdb_learning_route` | Route a task to the right RL algorithm |
|
|
234
|
+
| `agentdb_learning_train` | Train a specific RL agent on episodes |
|
|
235
|
+
| `agentdb_learning_predict` | Get an action prediction for a state |
|
|
236
|
+
| `agentdb_bandit_update` | Update bandit reward for an arm |
|
|
237
|
+
| `agentdb_bandit_pick` | Sample the best arm under Thompson Sampling |
|
|
238
|
+
| `agentdb_consolidate` | Run NightlyLearner consolidation pipeline |
|
|
239
|
+
| `agentdb_compose` | Combine memory patterns into a strategy |
|
|
240
|
+
| `agentdb_synthesize` | Build a context window from related memories |
|
|
241
|
+
| `agentdb_explain_recall` | Feature-attributed retrieval results |
|
|
242
|
+
| `agentdb_diversity_rank` | MMR-rerank for diverse top-k |
|
|
243
|
+
| `agentdb_metadata_filter` | Filtered semantic search |
|
|
244
|
+
|
|
245
|
+
</details>
|
|
281
246
|
|
|
282
|
-
|
|
247
|
+
---
|
|
283
248
|
|
|
284
|
-
|
|
285
|
-
- Native (NAPI-RS): ~50μs per proof
|
|
286
|
-
- WASM: ~200μs per proof
|
|
287
|
-
- JavaScript: ~500μs per proof
|
|
249
|
+
## 🔗 Used By
|
|
288
250
|
|
|
289
|
-
|
|
290
|
-
- Insert: 150x faster than JavaScript
|
|
291
|
-
- Search: 61μs p50 latency (96.8% recall@10)
|
|
292
|
-
- Pattern search: 32.6M ops/sec with caching
|
|
251
|
+
AgentDB powers the memory + learning layer in:
|
|
293
252
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
-
|
|
253
|
+
| Project | What it uses AgentDB for |
|
|
254
|
+
|---|---|
|
|
255
|
+
| [**`agentic-flow`**](https://github.com/ruvnet/agentic-flow) | ReasoningBank backend, ReflexionMemory, NightlyLearner consolidation, 30+ agent memory namespaces |
|
|
256
|
+
| [**`ruflo`**](https://github.com/ruvnet/ruflo) | Plugin marketplace memory, agent federation audit log, hierarchical recall for /adr-index, swarm coordination patterns |
|
|
257
|
+
| [**`@ruvector`**](https://github.com/ruvnet/ruvector) | Reference downstream for the Rust engine — every release is verified against AgentDB's test suite |
|
|
297
258
|
|
|
298
|
-
|
|
259
|
+
If you ship something on top of AgentDB, [open an issue](https://github.com/ruvnet/agentdb/issues) and we'll add you.
|
|
260
|
+
|
|
261
|
+
---
|
|
299
262
|
|
|
300
|
-
|
|
301
|
-
- **[Controllers Guide](./docs/CONTROLLERS.md)** — All 21 controllers documented
|
|
302
|
-
- **[MCP Tools Reference](./docs/MCP_TOOLS.md)** — 32 MCP tools for Claude Code
|
|
303
|
-
- **[Migration Guide](./MIGRATION_v3.0.0.md)** — Upgrade from v2 to v3
|
|
304
|
-
- **[Security Model](./docs/SECURITY.md)** — Proof validation and attestation
|
|
263
|
+
## 🐳 Docker / Edge / Browser
|
|
305
264
|
|
|
306
|
-
|
|
265
|
+
AgentDB compiles to four targets from one source:
|
|
307
266
|
|
|
308
|
-
|
|
267
|
+
| Target | What | When |
|
|
268
|
+
|---|---|---|
|
|
269
|
+
| **Node native** | NAPI bindings (Linux, macOS, Windows; x64 + arm64) | Backend services, CLI, MCP server |
|
|
270
|
+
| **Node WASM fallback** | sql.js + WASM engine | Restricted hosts that can't run NAPI |
|
|
271
|
+
| **Browser** | Pure WASM bundle | Offline-first apps, edge functions, IDE extensions |
|
|
272
|
+
| **Docker** | `docker-compose.yml` in `docker/` | Local dev, CI, prod deploy |
|
|
309
273
|
|
|
310
274
|
```bash
|
|
311
|
-
#
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
# Now Claude Code can:
|
|
315
|
-
# - Store reasoning patterns with proof validation
|
|
316
|
-
# - Search 32.6M patterns/sec for relevant approaches
|
|
317
|
-
# - Learn from successful task completions
|
|
318
|
-
# - Build reusable skills with attestation logs
|
|
319
|
-
```
|
|
275
|
+
# Browser
|
|
276
|
+
import { createBrowserDb } from 'agentdb/browser';
|
|
320
277
|
|
|
321
|
-
|
|
278
|
+
# Docker
|
|
279
|
+
docker compose -f docker/docker-compose.yml up
|
|
280
|
+
```
|
|
322
281
|
|
|
323
|
-
|
|
282
|
+
---
|
|
324
283
|
|
|
325
|
-
|
|
284
|
+
## Documentation
|
|
326
285
|
|
|
327
|
-
|
|
286
|
+
| Doc | When to read it |
|
|
287
|
+
|---|---|
|
|
288
|
+
| [**Full README** (deep)](docs/README-full.md) | Every feature, every API, every option — the complete reference (2,900+ lines) |
|
|
289
|
+
| [**PUBLISHING.md**](docs/PUBLISHING.md) | npm publish flow, dist-tag policy, release verification |
|
|
290
|
+
| [**ADR-071**](docs/ADR-071-agentdb-ruvector-wasm-capabilities-review.md) | WASM integration design |
|
|
291
|
+
| [**ADR-072**](docs/ADR-072-ruvector-advanced-features-integration.md) | RuVector advanced-feature integration |
|
|
292
|
+
| [**Examples**](examples/) | End-to-end runnable scripts — RAG chatbot, code-review agent, RL training, edge deploy |
|
|
293
|
+
| [**Benchmarks**](benchmarks/) | Reproducible perf harness — HNSW, attention, quantization, RL, end-to-end |
|
|
328
294
|
|
|
329
|
-
|
|
295
|
+
---
|
|
330
296
|
|
|
331
|
-
##
|
|
297
|
+
## Repository
|
|
332
298
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
299
|
+
| | |
|
|
300
|
+
|---|---|
|
|
301
|
+
| 📦 **npm** | [`agentdb`](https://www.npmjs.com/package/agentdb) |
|
|
302
|
+
| 🌐 **Source** | https://github.com/ruvnet/agentdb |
|
|
303
|
+
| 🐛 **Issues** | https://github.com/ruvnet/agentdb/issues |
|
|
304
|
+
| 🎨 **Marketing site** | [`ui/`](./ui) (Vite + React + shadcn/ui) |
|
|
305
|
+
| 🧬 **Engine** | [`@ruvector`](https://github.com/ruvnet/ruvector) (Rust + NAPI) |
|
|
306
|
+
| 🔗 **Reference consumer** | [`agentic-flow`](https://github.com/ruvnet/agentic-flow) (uses this as a git submodule at `packages/agentdb/`) |
|
|
339
307
|
|
|
340
308
|
---
|
|
341
309
|
|
|
342
|
-
|
|
310
|
+
## Support
|
|
311
|
+
|
|
312
|
+
| Resource | Link |
|
|
313
|
+
|---|---|
|
|
314
|
+
| Documentation | [docs/README-full.md](docs/README-full.md) |
|
|
315
|
+
| Issues & Bugs | [GitHub Issues](https://github.com/ruvnet/agentdb/issues) |
|
|
316
|
+
| Enterprise | [ruv.io](https://ruv.io) |
|
|
317
|
+
| Community | [Agentics Foundation Discord](https://discord.com/invite/dfxmpwkG2D) |
|
|
318
|
+
| Engine | [`ruvector`](https://github.com/ruvnet/ruvector) |
|
|
319
|
+
| Powered by | [Cognitum.one](https://cognitum.one) |
|
|
320
|
+
|
|
321
|
+
## License
|
|
343
322
|
|
|
344
|
-
[
|
|
323
|
+
[MIT](LICENSE) OR Apache-2.0 — [RuvNet](https://github.com/ruvnet)
|
|
@@ -338,6 +338,13 @@ WHERE e1.id != e2.id AND e2.id != e3.id AND e1.id != e3.id
|
|
|
338
338
|
-- Version: 2.0.0 (Frontier Features)
|
|
339
339
|
-- Features: Causal Memory Graph, Explainable Recall Certificates
|
|
340
340
|
-- Compatible with: AgentDB 1.x
|
|
341
|
+
--
|
|
342
|
+
-- Performance Optimization:
|
|
343
|
+
-- Apply composite index migration (003_composite_indexes.sql) for:
|
|
344
|
+
-- - 30-50% faster causal edge queries
|
|
345
|
+
-- - Optimized causal chain traversal (multi-hop reasoning)
|
|
346
|
+
-- - Faster experiment analysis and A/B testing
|
|
347
|
+
-- - See: db/migrations/README.md for details
|
|
341
348
|
-- ============================================================================
|
|
342
349
|
|
|
343
350
|
-- ============================================================================
|
package/dist/schemas/schema.sql
CHANGED
|
@@ -379,4 +379,11 @@ END;
|
|
|
379
379
|
-- Schema version: 1.0.0
|
|
380
380
|
-- Compatible with: SQLite 3.35+, sqlite-vec (optional), sqlite-vss (optional)
|
|
381
381
|
-- WASM compatible: Yes (via SQLite-WASM + OPFS)
|
|
382
|
+
--
|
|
383
|
+
-- Performance Optimization:
|
|
384
|
+
-- For production deployments, apply composite index migration for 30-50% query speedup:
|
|
385
|
+
-- - Migration file: db/migrations/003_composite_indexes.sql
|
|
386
|
+
-- - Adds 40+ composite indexes for common query patterns
|
|
387
|
+
-- - Trade-off: 2x slower writes, +15-20% storage (acceptable for read-heavy workloads)
|
|
388
|
+
-- - See: db/migrations/README.md for details
|
|
382
389
|
-- ============================================================================
|