@soulcraft/brainy 3.0.0 β 3.1.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/CHANGELOG.md +53 -3
- package/README.md +427 -111
- package/bin/brainy.js +340 -62
- package/dist/api/ConfigAPI.d.ts +67 -0
- package/dist/api/ConfigAPI.js +166 -0
- package/dist/api/DataAPI.d.ts +123 -0
- package/dist/api/DataAPI.js +391 -0
- package/dist/api/SecurityAPI.d.ts +50 -0
- package/dist/api/SecurityAPI.js +139 -0
- package/dist/api/UniversalImportAPI.d.ts +134 -0
- package/dist/api/UniversalImportAPI.js +615 -0
- package/dist/augmentationManager.js +12 -7
- package/dist/augmentationPipeline.d.ts +0 -61
- package/dist/augmentationPipeline.js +0 -87
- package/dist/augmentationRegistry.d.ts +1 -1
- package/dist/augmentationRegistry.js +1 -1
- package/dist/augmentations/apiServerAugmentation.d.ts +27 -1
- package/dist/augmentations/apiServerAugmentation.js +290 -9
- package/dist/augmentations/auditLogAugmentation.d.ts +109 -0
- package/dist/augmentations/auditLogAugmentation.js +358 -0
- package/dist/augmentations/batchProcessingAugmentation.d.ts +3 -2
- package/dist/augmentations/batchProcessingAugmentation.js +123 -22
- package/dist/augmentations/brainyAugmentation.d.ts +142 -8
- package/dist/augmentations/brainyAugmentation.js +179 -2
- package/dist/augmentations/cacheAugmentation.d.ts +8 -5
- package/dist/augmentations/cacheAugmentation.js +116 -17
- package/dist/augmentations/conduitAugmentations.d.ts +2 -2
- package/dist/augmentations/conduitAugmentations.js +2 -2
- package/dist/augmentations/configResolver.d.ts +122 -0
- package/dist/augmentations/configResolver.js +440 -0
- package/dist/augmentations/connectionPoolAugmentation.d.ts +3 -1
- package/dist/augmentations/connectionPoolAugmentation.js +37 -12
- package/dist/augmentations/defaultAugmentations.d.ts +14 -10
- package/dist/augmentations/defaultAugmentations.js +16 -11
- package/dist/augmentations/discovery/catalogDiscovery.d.ts +142 -0
- package/dist/augmentations/discovery/catalogDiscovery.js +249 -0
- package/dist/augmentations/discovery/localDiscovery.d.ts +84 -0
- package/dist/augmentations/discovery/localDiscovery.js +246 -0
- package/dist/augmentations/discovery/runtimeLoader.d.ts +97 -0
- package/dist/augmentations/discovery/runtimeLoader.js +337 -0
- package/dist/augmentations/discovery.d.ts +152 -0
- package/dist/augmentations/discovery.js +441 -0
- package/dist/augmentations/display/cache.d.ts +130 -0
- package/dist/augmentations/display/cache.js +319 -0
- package/dist/augmentations/display/fieldPatterns.d.ts +52 -0
- package/dist/augmentations/display/fieldPatterns.js +393 -0
- package/dist/augmentations/display/iconMappings.d.ts +57 -0
- package/dist/augmentations/display/iconMappings.js +68 -0
- package/dist/augmentations/display/intelligentComputation.d.ts +109 -0
- package/dist/augmentations/display/intelligentComputation.js +462 -0
- package/dist/augmentations/display/types.d.ts +203 -0
- package/dist/augmentations/display/types.js +7 -0
- package/dist/augmentations/entityRegistryAugmentation.d.ts +3 -1
- package/dist/augmentations/entityRegistryAugmentation.js +5 -1
- package/dist/augmentations/indexAugmentation.d.ts +5 -3
- package/dist/augmentations/indexAugmentation.js +5 -2
- package/dist/augmentations/intelligentVerbScoringAugmentation.d.ts +24 -7
- package/dist/augmentations/intelligentVerbScoringAugmentation.js +111 -27
- package/dist/augmentations/manifest.d.ts +176 -0
- package/dist/augmentations/manifest.js +8 -0
- package/dist/augmentations/marketplace/AugmentationMarketplace.d.ts +168 -0
- package/dist/augmentations/marketplace/AugmentationMarketplace.js +329 -0
- package/dist/augmentations/marketplace/cli.d.ts +47 -0
- package/dist/augmentations/marketplace/cli.js +265 -0
- package/dist/augmentations/metricsAugmentation.d.ts +3 -3
- package/dist/augmentations/metricsAugmentation.js +2 -2
- package/dist/augmentations/monitoringAugmentation.d.ts +3 -3
- package/dist/augmentations/monitoringAugmentation.js +2 -2
- package/dist/augmentations/neuralImport.d.ts +1 -1
- package/dist/augmentations/neuralImport.js +4 -4
- package/dist/augmentations/rateLimitAugmentation.d.ts +82 -0
- package/dist/augmentations/rateLimitAugmentation.js +321 -0
- package/dist/augmentations/requestDeduplicatorAugmentation.d.ts +2 -2
- package/dist/augmentations/requestDeduplicatorAugmentation.js +1 -1
- package/dist/augmentations/storageAugmentation.d.ts +1 -1
- package/dist/augmentations/storageAugmentation.js +2 -2
- package/dist/augmentations/storageAugmentations.d.ts +37 -8
- package/dist/augmentations/storageAugmentations.js +204 -15
- package/dist/augmentations/synapseAugmentation.d.ts +1 -1
- package/dist/augmentations/synapseAugmentation.js +35 -16
- package/dist/augmentations/typeMatching/brainyTypes.d.ts +83 -0
- package/dist/augmentations/typeMatching/brainyTypes.js +425 -0
- package/dist/augmentations/typeMatching/intelligentTypeMatcher.d.ts +39 -59
- package/dist/augmentations/typeMatching/intelligentTypeMatcher.js +103 -389
- package/dist/augmentations/universalDisplayAugmentation.d.ts +191 -0
- package/dist/augmentations/universalDisplayAugmentation.js +371 -0
- package/dist/brainy-unified.d.ts +106 -0
- package/dist/brainy-unified.js +327 -0
- package/dist/brainy.d.ts +277 -0
- package/dist/brainy.js +1241 -0
- package/dist/brainyData.d.ts +56 -111
- package/dist/brainyData.js +912 -756
- package/dist/brainyDataV3.d.ts +186 -0
- package/dist/brainyDataV3.js +337 -0
- package/dist/config/distributedPresets-new.d.ts +118 -0
- package/dist/config/distributedPresets-new.js +318 -0
- package/dist/config/distributedPresets.d.ts +118 -0
- package/dist/config/distributedPresets.js +318 -0
- package/dist/config/extensibleConfig.d.ts +99 -0
- package/dist/config/extensibleConfig.js +268 -0
- package/dist/config/index.d.ts +17 -0
- package/dist/config/index.js +35 -0
- package/dist/config/modelAutoConfig.d.ts +32 -0
- package/dist/config/modelAutoConfig.js +139 -0
- package/dist/config/modelPrecisionManager.d.ts +42 -0
- package/dist/config/modelPrecisionManager.js +98 -0
- package/dist/config/sharedConfigManager.d.ts +67 -0
- package/dist/config/sharedConfigManager.js +215 -0
- package/dist/config/storageAutoConfig.d.ts +41 -0
- package/dist/config/storageAutoConfig.js +328 -0
- package/dist/config/zeroConfig.d.ts +68 -0
- package/dist/config/zeroConfig.js +301 -0
- package/dist/cortex/backupRestore.d.ts +2 -2
- package/dist/cortex/backupRestore.js +85 -27
- package/dist/cortex/healthCheck.d.ts +2 -2
- package/dist/cortex/neuralImport.d.ts +2 -2
- package/dist/cortex/neuralImport.js +18 -13
- package/dist/cortex/performanceMonitor.d.ts +2 -2
- package/dist/critical/model-guardian.d.ts +4 -0
- package/dist/critical/model-guardian.js +31 -11
- package/dist/demo.d.ts +4 -4
- package/dist/demo.js +7 -7
- package/dist/distributed/cacheSync.d.ts +112 -0
- package/dist/distributed/cacheSync.js +265 -0
- package/dist/distributed/coordinator.d.ts +193 -0
- package/dist/distributed/coordinator.js +548 -0
- package/dist/distributed/httpTransport.d.ts +120 -0
- package/dist/distributed/httpTransport.js +446 -0
- package/dist/distributed/index.d.ts +8 -0
- package/dist/distributed/index.js +5 -0
- package/dist/distributed/networkTransport.d.ts +132 -0
- package/dist/distributed/networkTransport.js +633 -0
- package/dist/distributed/queryPlanner.d.ts +104 -0
- package/dist/distributed/queryPlanner.js +327 -0
- package/dist/distributed/readWriteSeparation.d.ts +134 -0
- package/dist/distributed/readWriteSeparation.js +350 -0
- package/dist/distributed/shardManager.d.ts +114 -0
- package/dist/distributed/shardManager.js +357 -0
- package/dist/distributed/shardMigration.d.ts +110 -0
- package/dist/distributed/shardMigration.js +289 -0
- package/dist/distributed/storageDiscovery.d.ts +160 -0
- package/dist/distributed/storageDiscovery.js +551 -0
- package/dist/embeddings/CachedEmbeddings.d.ts +40 -0
- package/dist/embeddings/CachedEmbeddings.js +146 -0
- package/dist/embeddings/EmbeddingManager.d.ts +102 -0
- package/dist/embeddings/EmbeddingManager.js +291 -0
- package/dist/embeddings/SingletonModelManager.d.ts +95 -0
- package/dist/embeddings/SingletonModelManager.js +220 -0
- package/dist/embeddings/index.d.ts +12 -0
- package/dist/embeddings/index.js +16 -0
- package/dist/embeddings/lightweight-embedder.d.ts +0 -1
- package/dist/embeddings/lightweight-embedder.js +4 -12
- package/dist/embeddings/model-manager.d.ts +11 -0
- package/dist/embeddings/model-manager.js +43 -7
- package/dist/embeddings/universal-memory-manager.d.ts +1 -1
- package/dist/embeddings/universal-memory-manager.js +27 -67
- package/dist/embeddings/worker-embedding.js +4 -8
- package/dist/errors/brainyError.d.ts +5 -1
- package/dist/errors/brainyError.js +12 -0
- package/dist/examples/basicUsage.js +7 -4
- package/dist/graph/graphAdjacencyIndex.d.ts +96 -0
- package/dist/graph/graphAdjacencyIndex.js +288 -0
- package/dist/graph/pathfinding.js +4 -2
- package/dist/hnsw/scaledHNSWSystem.js +11 -2
- package/dist/importManager.js +8 -5
- package/dist/index.d.ts +17 -22
- package/dist/index.js +37 -23
- package/dist/mcp/brainyMCPAdapter.d.ts +4 -4
- package/dist/mcp/brainyMCPAdapter.js +5 -5
- package/dist/mcp/brainyMCPService.d.ts +3 -3
- package/dist/mcp/brainyMCPService.js +3 -11
- package/dist/mcp/mcpAugmentationToolset.js +20 -30
- package/dist/neural/embeddedPatterns.d.ts +1 -1
- package/dist/neural/embeddedPatterns.js +2 -2
- package/dist/neural/entityExtractor.d.ts +65 -0
- package/dist/neural/entityExtractor.js +316 -0
- package/dist/neural/improvedNeuralAPI.d.ts +357 -0
- package/dist/neural/improvedNeuralAPI.js +2628 -0
- package/dist/neural/naturalLanguageProcessor.d.ts +155 -10
- package/dist/neural/naturalLanguageProcessor.js +941 -66
- package/dist/neural/naturalLanguageProcessorStatic.d.ts +2 -2
- package/dist/neural/naturalLanguageProcessorStatic.js +3 -3
- package/dist/neural/neuralAPI.js +8 -2
- package/dist/neural/patternLibrary.d.ts +57 -3
- package/dist/neural/patternLibrary.js +348 -13
- package/dist/neural/staticPatternMatcher.d.ts +2 -2
- package/dist/neural/staticPatternMatcher.js +2 -2
- package/dist/neural/types.d.ts +287 -0
- package/dist/neural/types.js +24 -0
- package/dist/shared/default-augmentations.d.ts +3 -3
- package/dist/shared/default-augmentations.js +5 -5
- package/dist/storage/adapters/baseStorageAdapter.d.ts +42 -0
- package/dist/storage/adapters/fileSystemStorage.d.ts +26 -2
- package/dist/storage/adapters/fileSystemStorage.js +218 -15
- package/dist/storage/adapters/memoryStorage.d.ts +4 -4
- package/dist/storage/adapters/memoryStorage.js +17 -12
- package/dist/storage/adapters/opfsStorage.d.ts +2 -2
- package/dist/storage/adapters/opfsStorage.js +2 -2
- package/dist/storage/adapters/s3CompatibleStorage.d.ts +2 -2
- package/dist/storage/adapters/s3CompatibleStorage.js +2 -2
- package/dist/storage/backwardCompatibility.d.ts +10 -78
- package/dist/storage/backwardCompatibility.js +17 -132
- package/dist/storage/baseStorage.d.ts +18 -2
- package/dist/storage/baseStorage.js +74 -3
- package/dist/storage/cacheManager.js +2 -2
- package/dist/storage/readOnlyOptimizations.js +8 -3
- package/dist/streaming/pipeline.d.ts +154 -0
- package/dist/streaming/pipeline.js +551 -0
- package/dist/triple/TripleIntelligence.d.ts +25 -110
- package/dist/triple/TripleIntelligence.js +4 -574
- package/dist/triple/TripleIntelligenceSystem.d.ts +159 -0
- package/dist/triple/TripleIntelligenceSystem.js +519 -0
- package/dist/types/apiTypes.d.ts +278 -0
- package/dist/types/apiTypes.js +33 -0
- package/dist/types/brainy.types.d.ts +308 -0
- package/dist/types/brainy.types.js +8 -0
- package/dist/types/brainyDataInterface.d.ts +5 -8
- package/dist/types/brainyDataInterface.js +2 -2
- package/dist/types/graphTypes.js +2 -2
- package/dist/universal/crypto.d.ts +11 -1
- package/dist/universal/crypto.js +24 -93
- package/dist/universal/events.d.ts +3 -2
- package/dist/universal/events.js +6 -75
- package/dist/universal/fs.d.ts +2 -3
- package/dist/universal/fs.js +5 -211
- package/dist/universal/path.d.ts +3 -2
- package/dist/universal/path.js +22 -78
- package/dist/universal/uuid.d.ts +1 -1
- package/dist/universal/uuid.js +1 -1
- package/dist/utils/brainyTypes.d.ts +217 -0
- package/dist/utils/brainyTypes.js +261 -0
- package/dist/utils/cacheAutoConfig.d.ts +3 -3
- package/dist/utils/embedding.d.ts +9 -4
- package/dist/utils/embedding.js +89 -26
- package/dist/utils/enhancedLogger.d.ts +104 -0
- package/dist/utils/enhancedLogger.js +232 -0
- package/dist/utils/hybridModelManager.d.ts +19 -28
- package/dist/utils/hybridModelManager.js +36 -200
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/intelligentTypeMapper.d.ts +60 -0
- package/dist/utils/intelligentTypeMapper.js +349 -0
- package/dist/utils/metadataIndex.d.ts +118 -1
- package/dist/utils/metadataIndex.js +539 -16
- package/dist/utils/nodeVersionCheck.d.ts +24 -0
- package/dist/utils/nodeVersionCheck.js +65 -0
- package/dist/utils/paramValidation.d.ts +39 -0
- package/dist/utils/paramValidation.js +192 -0
- package/dist/utils/rateLimiter.d.ts +160 -0
- package/dist/utils/rateLimiter.js +271 -0
- package/dist/utils/statistics.d.ts +4 -4
- package/dist/utils/statistics.js +3 -3
- package/dist/utils/structuredLogger.d.ts +146 -0
- package/dist/utils/structuredLogger.js +394 -0
- package/dist/utils/textEncoding.js +2 -1
- package/dist/utils/typeValidation.d.ts +59 -0
- package/dist/utils/typeValidation.js +374 -0
- package/dist/utils/version.js +19 -3
- package/package.json +15 -17
- package/scripts/download-models.cjs +94 -20
- package/dist/augmentations/walAugmentation.d.ts +0 -109
- package/dist/augmentations/walAugmentation.js +0 -516
- package/dist/browserFramework.d.ts +0 -15
- package/dist/browserFramework.js +0 -31
- package/dist/browserFramework.minimal.d.ts +0 -14
- package/dist/browserFramework.minimal.js +0 -31
- package/dist/chat/BrainyChat.d.ts +0 -121
- package/dist/chat/BrainyChat.js +0 -396
- package/dist/chat/ChatCLI.d.ts +0 -61
- package/dist/chat/ChatCLI.js +0 -351
package/README.md
CHANGED
|
@@ -9,72 +9,181 @@
|
|
|
9
9
|
[](LICENSE)
|
|
10
10
|
[](https://www.typescriptlang.org/)
|
|
11
11
|
|
|
12
|
-
**π§ Brainy
|
|
12
|
+
**π§ Brainy 3.0 - Universal Knowledge Protocolβ’**
|
|
13
13
|
|
|
14
|
-
**World's first Triple Intelligenceβ’ database
|
|
14
|
+
**World's first Triple Intelligenceβ’ database** unifying vector similarity, graph relationships, and document filtering in one magical API. **Framework-friendly design** works seamlessly with Next.js, React, Vue, Angular, and any modern JavaScript framework.
|
|
15
15
|
|
|
16
16
|
**Why Brainy Leads**: We're the first to solve the impossibleβcombining three different database paradigms (vector, graph, document) into one unified query interface. This breakthrough enables us to be the Universal Knowledge Protocol where all tools, augmentations, and AI models speak the same language.
|
|
17
17
|
|
|
18
|
-
**
|
|
18
|
+
**Framework-first design.** Built for modern web development with zero configuration and automatic framework compatibility. O(log n) performance, <10ms search latency, production-ready.
|
|
19
19
|
|
|
20
|
-
## π What's New in
|
|
20
|
+
## π What's New in 3.0
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
- **Universal Knowledge Protocol**: 31 nouns Γ 40 verbs standardize all knowledge
|
|
24
|
-
- **Infinite Expressiveness**: Model ANY data with unlimited metadata
|
|
25
|
-
- **API Consolidation**: 15+ methods β 2 clean APIs (`search()` and `find()`)
|
|
26
|
-
- **Natural Language**: Ask questions in plain English
|
|
27
|
-
- **Zero Configuration**: Works instantly, no setup required
|
|
28
|
-
- **O(log n) Performance**: Binary search on sorted indices
|
|
29
|
-
- **Perfect Interoperability**: All tools and AI models speak the same language
|
|
30
|
-
- **Universal Compatibility**: Node.js, Browser, Edge, Workers
|
|
22
|
+
### π§ **Triple Intelligenceβ’ Engine**
|
|
31
23
|
|
|
32
|
-
|
|
24
|
+
- **Vector Search**: HNSW-powered semantic similarity
|
|
25
|
+
- **Graph Relationships**: Navigate connected knowledge
|
|
26
|
+
- **Document Filtering**: MongoDB-style metadata queries
|
|
27
|
+
- **Unified API**: All three in a single query interface
|
|
28
|
+
|
|
29
|
+
### π― **Clean API Design**
|
|
30
|
+
|
|
31
|
+
- **Modern Syntax**: `brain.add()`, `brain.find()`, `brain.relate()`
|
|
32
|
+
- **Type Safety**: Full TypeScript integration
|
|
33
|
+
- **Zero Config**: Works out of the box with memory storage
|
|
34
|
+
- **Consistent Parameters**: Clean, predictable API surface
|
|
35
|
+
|
|
36
|
+
### β‘ **Performance & Reliability**
|
|
37
|
+
|
|
38
|
+
- **<10ms Search**: Fast semantic queries
|
|
39
|
+
- **384D Vectors**: Optimized embeddings (all-MiniLM-L6-v2)
|
|
40
|
+
- **Built-in Caching**: Intelligent result caching
|
|
41
|
+
- **Production Ready**: Thoroughly tested core functionality
|
|
42
|
+
|
|
43
|
+
## β‘ Quick Start - Zero Configuration
|
|
33
44
|
|
|
34
45
|
```bash
|
|
35
46
|
npm install @soulcraft/brainy
|
|
36
47
|
```
|
|
37
48
|
|
|
49
|
+
### π― **True Zero Configuration**
|
|
50
|
+
|
|
38
51
|
```javascript
|
|
39
|
-
import {
|
|
52
|
+
import {Brainy} from '@soulcraft/brainy'
|
|
40
53
|
|
|
41
|
-
|
|
54
|
+
// Just this - auto-detects everything!
|
|
55
|
+
const brain = new Brainy()
|
|
42
56
|
await brain.init()
|
|
43
57
|
|
|
44
|
-
// Add entities
|
|
45
|
-
const jsId = await brain.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
58
|
+
// Add entities with automatic embedding
|
|
59
|
+
const jsId = await brain.add({
|
|
60
|
+
data: "JavaScript is a programming language",
|
|
61
|
+
type: "concept",
|
|
62
|
+
metadata: {
|
|
63
|
+
type: "language",
|
|
64
|
+
year: 1995,
|
|
65
|
+
paradigm: "multi-paradigm"
|
|
66
|
+
}
|
|
49
67
|
})
|
|
50
68
|
|
|
51
|
-
const nodeId = await brain.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
69
|
+
const nodeId = await brain.add({
|
|
70
|
+
data: "Node.js runtime environment",
|
|
71
|
+
type: "concept",
|
|
72
|
+
metadata: {
|
|
73
|
+
type: "runtime",
|
|
74
|
+
year: 2009,
|
|
75
|
+
platform: "server-side"
|
|
76
|
+
}
|
|
55
77
|
})
|
|
56
78
|
|
|
57
|
-
// Create relationships
|
|
58
|
-
await brain.
|
|
59
|
-
|
|
60
|
-
|
|
79
|
+
// Create relationships between entities
|
|
80
|
+
await brain.relate({
|
|
81
|
+
from: nodeId,
|
|
82
|
+
to: jsId,
|
|
83
|
+
type: "executes",
|
|
84
|
+
metadata: {
|
|
85
|
+
since: 2009,
|
|
86
|
+
performance: "high"
|
|
87
|
+
}
|
|
61
88
|
})
|
|
62
89
|
|
|
63
90
|
// Natural language search with graph relationships
|
|
64
|
-
const results = await brain.find("programming languages used by server runtimes")
|
|
91
|
+
const results = await brain.find({query: "programming languages used by server runtimes"})
|
|
65
92
|
|
|
66
93
|
// Triple Intelligence: vector + metadata + relationships
|
|
67
94
|
const filtered = await brain.find({
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
95
|
+
query: "JavaScript", // Vector similarity
|
|
96
|
+
where: {type: "language"}, // Metadata filtering
|
|
97
|
+
connected: {from: nodeId, depth: 1} // Graph relationships
|
|
71
98
|
})
|
|
72
99
|
```
|
|
73
100
|
|
|
101
|
+
## π Framework Integration
|
|
102
|
+
|
|
103
|
+
**Brainy 3.0 is framework-first!** Works seamlessly with any modern JavaScript framework:
|
|
104
|
+
|
|
105
|
+
### βοΈ **React & Next.js**
|
|
106
|
+
```javascript
|
|
107
|
+
import { Brainy } from '@soulcraft/brainy'
|
|
108
|
+
|
|
109
|
+
function SearchComponent() {
|
|
110
|
+
const [brain] = useState(() => new Brainy())
|
|
111
|
+
|
|
112
|
+
useEffect(() => {
|
|
113
|
+
brain.init()
|
|
114
|
+
}, [])
|
|
115
|
+
|
|
116
|
+
const handleSearch = async (query) => {
|
|
117
|
+
const results = await brain.find(query)
|
|
118
|
+
setResults(results)
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### π’ **Vue.js & Nuxt.js**
|
|
124
|
+
```javascript
|
|
125
|
+
import { Brainy } from '@soulcraft/brainy'
|
|
126
|
+
|
|
127
|
+
export default {
|
|
128
|
+
async mounted() {
|
|
129
|
+
this.brain = new Brainy()
|
|
130
|
+
await this.brain.init()
|
|
131
|
+
},
|
|
132
|
+
methods: {
|
|
133
|
+
async search(query) {
|
|
134
|
+
return await this.brain.find(query)
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### π
°οΈ **Angular**
|
|
141
|
+
```typescript
|
|
142
|
+
import { Injectable } from '@angular/core'
|
|
143
|
+
import { Brainy } from '@soulcraft/brainy'
|
|
144
|
+
|
|
145
|
+
@Injectable({ providedIn: 'root' })
|
|
146
|
+
export class BrainyService {
|
|
147
|
+
private brain = new Brainy()
|
|
148
|
+
|
|
149
|
+
async init() {
|
|
150
|
+
await this.brain.init()
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
async search(query: string) {
|
|
154
|
+
return await this.brain.find(query)
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### π₯ **Other Frameworks**
|
|
160
|
+
Brainy works with **any** framework that supports ES6 imports: Svelte, Solid.js, Qwik, Fresh, and more!
|
|
161
|
+
|
|
162
|
+
**Framework Compatibility:**
|
|
163
|
+
- β
All modern bundlers (Webpack, Vite, Rollup, Parcel)
|
|
164
|
+
- β
SSR/SSG (Next.js, Nuxt, SvelteKit, Astro)
|
|
165
|
+
- β
Edge runtimes (Vercel Edge, Cloudflare Workers)
|
|
166
|
+
- β
Browser and Node.js environments
|
|
167
|
+
|
|
168
|
+
## π System Requirements
|
|
169
|
+
|
|
170
|
+
**Node.js Version:** 22 LTS or later (recommended)
|
|
171
|
+
|
|
172
|
+
- β
**Node.js 22 LTS** - Fully supported and recommended for production
|
|
173
|
+
- β
**Node.js 20 LTS** - Compatible (maintenance mode)
|
|
174
|
+
- β **Node.js 24** - Not supported (known ONNX runtime compatibility issues)
|
|
175
|
+
|
|
176
|
+
> **Important:** Brainy uses ONNX runtime for AI embeddings. Node.js 24 has known compatibility issues that cause
|
|
177
|
+
> crashes during inference operations. We recommend Node.js 22 LTS for maximum stability.
|
|
178
|
+
|
|
179
|
+
If using nvm: `nvm use` (we provide a `.nvmrc` file)
|
|
180
|
+
|
|
74
181
|
## π Key Features
|
|
75
182
|
|
|
76
183
|
### World's First Triple Intelligenceβ’ Engine
|
|
184
|
+
|
|
77
185
|
**The breakthrough that enables the Universal Knowledge Protocol:**
|
|
186
|
+
|
|
78
187
|
- **Vector Search**: Semantic similarity with HNSW indexing
|
|
79
188
|
- **Graph Relationships**: Navigate connected knowledge like Neo4j
|
|
80
189
|
- **Document Filtering**: MongoDB-style queries with O(log n) performance
|
|
@@ -82,7 +191,9 @@ const filtered = await brain.find({
|
|
|
82
191
|
- **First to solve this**: Others do vector OR graph OR documentβwe do ALL
|
|
83
192
|
|
|
84
193
|
### Universal Knowledge Protocol with Infinite Expressiveness
|
|
194
|
+
|
|
85
195
|
**Enabled by Triple Intelligence, standardized for everyone:**
|
|
196
|
+
|
|
86
197
|
- **24 Noun Types Γ 40 Verb Types**: 960 base combinations
|
|
87
198
|
- **β Expressiveness**: Unlimited metadata = model ANY data
|
|
88
199
|
- **One Language**: All tools, augmentations, AI models speak the same types
|
|
@@ -90,6 +201,7 @@ const filtered = await brain.find({
|
|
|
90
201
|
- **No Schema Lock-in**: Evolve without migrations
|
|
91
202
|
|
|
92
203
|
### Natural Language Understanding
|
|
204
|
+
|
|
93
205
|
```javascript
|
|
94
206
|
// Ask questions naturally
|
|
95
207
|
await brain.find("Show me recent React components with tests")
|
|
@@ -97,54 +209,118 @@ await brain.find("Popular JavaScript libraries similar to Vue")
|
|
|
97
209
|
await brain.find("Documentation about authentication from last month")
|
|
98
210
|
```
|
|
99
211
|
|
|
100
|
-
### Zero Configuration Philosophy
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
212
|
+
### π― Zero Configuration Philosophy
|
|
213
|
+
|
|
214
|
+
Brainy 3.0 automatically configures **everything**:
|
|
215
|
+
|
|
216
|
+
```javascript
|
|
217
|
+
import {Brainy} from '@soulcraft/brainy'
|
|
218
|
+
|
|
219
|
+
// 1. Pure zero-config - detects everything
|
|
220
|
+
const brain = new Brainy()
|
|
221
|
+
|
|
222
|
+
// 2. Custom configuration
|
|
223
|
+
const brain = new Brainy({
|
|
224
|
+
storage: { type: 'memory' },
|
|
225
|
+
embeddings: { model: 'all-MiniLM-L6-v2' },
|
|
226
|
+
cache: { enabled: true, maxSize: 1000 }
|
|
227
|
+
})
|
|
228
|
+
|
|
229
|
+
// 3. Production configuration
|
|
230
|
+
const customBrain = new Brainy({
|
|
231
|
+
mode: 'production',
|
|
232
|
+
model: 'q8', // Optimized model (99% accuracy, 75% smaller)
|
|
233
|
+
storage: 'cloud', // or 'memory', 'disk', 'auto'
|
|
234
|
+
features: ['core', 'search', 'cache']
|
|
235
|
+
})
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**What's Auto-Detected:**
|
|
239
|
+
|
|
240
|
+
- **Storage**: S3/GCS/R2 β Filesystem β Memory (priority order)
|
|
241
|
+
- **Models**: Always Q8 for optimal balance
|
|
242
|
+
- **Features**: Minimal β Default β Full based on environment
|
|
243
|
+
- **Memory**: Optimal cache sizes and batching
|
|
244
|
+
- **Performance**: Threading, chunking, indexing strategies
|
|
105
245
|
|
|
106
246
|
### Production Performance
|
|
247
|
+
|
|
107
248
|
- **3ms average search** - Lightning fast queries
|
|
108
249
|
- **24MB memory footprint** - Efficient resource usage
|
|
109
250
|
- **Worker-based embeddings** - Non-blocking operations
|
|
110
251
|
- **Automatic caching** - Intelligent result caching
|
|
111
252
|
|
|
253
|
+
### ποΈ Advanced Configuration (When Needed)
|
|
254
|
+
|
|
255
|
+
Most users **never need this** - zero-config handles everything. For advanced use cases:
|
|
256
|
+
|
|
257
|
+
```javascript
|
|
258
|
+
// Model is always Q8 for optimal performance
|
|
259
|
+
const brain = new Brainy() // Uses Q8 automatically
|
|
260
|
+
|
|
261
|
+
// Storage control (auto-detected by default)
|
|
262
|
+
const memoryBrain = new Brainy({storage: 'memory'}) // RAM only
|
|
263
|
+
const diskBrain = new Brainy({storage: 'disk'}) // Local filesystem
|
|
264
|
+
const cloudBrain = new Brainy({storage: 'cloud'}) // S3/GCS/R2
|
|
265
|
+
|
|
266
|
+
// Legacy full config (still supported)
|
|
267
|
+
const legacyBrain = new Brainy({
|
|
268
|
+
storage: {forceMemoryStorage: true}
|
|
269
|
+
})
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
**Model Details:**
|
|
273
|
+
|
|
274
|
+
- **Q8**: 33MB, 99% accuracy, 75% smaller than full precision
|
|
275
|
+
- Fast loading and optimal memory usage
|
|
276
|
+
- Perfect for all environments
|
|
277
|
+
|
|
278
|
+
**Air-gap deployment:**
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
npm run download-models # Download Q8 model
|
|
282
|
+
npm run download-models:q8 # Download Q8 model
|
|
283
|
+
```
|
|
284
|
+
|
|
112
285
|
## π Core API
|
|
113
286
|
|
|
114
287
|
### `search()` - Vector Similarity
|
|
288
|
+
|
|
115
289
|
```javascript
|
|
116
290
|
const results = await brain.search("machine learning", {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
291
|
+
limit: 10, // Number of results
|
|
292
|
+
metadata: {type: "article"}, // Filter by metadata
|
|
293
|
+
includeContent: true // Include full content
|
|
120
294
|
})
|
|
121
295
|
```
|
|
122
296
|
|
|
123
297
|
### `find()` - Natural Language Queries
|
|
298
|
+
|
|
124
299
|
```javascript
|
|
125
300
|
// Simple natural language
|
|
126
301
|
const results = await brain.find("recent important documents")
|
|
127
302
|
|
|
128
303
|
// Structured query with Triple Intelligence
|
|
129
304
|
const results = await brain.find({
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
305
|
+
like: "JavaScript", // Vector similarity
|
|
306
|
+
where: { // Metadata filters
|
|
307
|
+
year: {greaterThan: 2020},
|
|
308
|
+
important: true
|
|
309
|
+
},
|
|
310
|
+
related: {to: "React"} // Graph relationships
|
|
136
311
|
})
|
|
137
312
|
```
|
|
138
313
|
|
|
139
314
|
### CRUD Operations
|
|
315
|
+
|
|
140
316
|
```javascript
|
|
141
317
|
// Create entities (nouns)
|
|
142
|
-
const id = await brain.addNoun(data, metadata)
|
|
318
|
+
const id = await brain.addNoun(data, nounType, metadata)
|
|
143
319
|
|
|
144
320
|
// Create relationships (verbs)
|
|
145
321
|
const verbId = await brain.addVerb(sourceId, targetId, "relationType", {
|
|
146
|
-
|
|
147
|
-
|
|
322
|
+
strength: 0.9,
|
|
323
|
+
bidirectional: false
|
|
148
324
|
})
|
|
149
325
|
|
|
150
326
|
// Read
|
|
@@ -161,36 +337,106 @@ await brain.deleteVerb(verbId)
|
|
|
161
337
|
|
|
162
338
|
// Bulk operations
|
|
163
339
|
await brain.import(arrayOfData)
|
|
164
|
-
const exported = await brain.export({
|
|
340
|
+
const exported = await brain.export({format: 'json'})
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
## π Distributed System (NEW!)
|
|
344
|
+
|
|
345
|
+
### Zero-Config Distributed Setup
|
|
346
|
+
|
|
347
|
+
```javascript
|
|
348
|
+
// Single node (default)
|
|
349
|
+
const brain = new Brainy({
|
|
350
|
+
storage: {type: 's3', options: {bucket: 'my-data'}}
|
|
351
|
+
})
|
|
352
|
+
|
|
353
|
+
// Distributed cluster - just add one flag!
|
|
354
|
+
const brain = new Brainy({
|
|
355
|
+
storage: {type: 's3', options: {bucket: 'my-data'}},
|
|
356
|
+
distributed: true // That's it! Everything else is automatic
|
|
357
|
+
})
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### How It Works
|
|
361
|
+
|
|
362
|
+
- **Storage-Based Discovery**: Nodes find each other via S3/GCS (no Consul/etcd!)
|
|
363
|
+
- **Automatic Sharding**: Data distributed by content hash
|
|
364
|
+
- **Smart Query Planning**: Queries routed to optimal shards
|
|
365
|
+
- **Live Rebalancing**: Handles node joins/leaves automatically
|
|
366
|
+
- **Zero Downtime**: Streaming shard migration
|
|
367
|
+
|
|
368
|
+
### Real-World Example: Social Media Firehose
|
|
369
|
+
|
|
370
|
+
```javascript
|
|
371
|
+
// Ingestion nodes (optimized for writes)
|
|
372
|
+
const ingestionNode = new Brainy({
|
|
373
|
+
storage: {type: 's3', options: {bucket: 'social-data'}},
|
|
374
|
+
distributed: true,
|
|
375
|
+
writeOnly: true // Optimized for high-throughput writes
|
|
376
|
+
})
|
|
377
|
+
|
|
378
|
+
// Process Bluesky firehose
|
|
379
|
+
blueskyStream.on('post', async (post) => {
|
|
380
|
+
await ingestionNode.addNoun(post, 'social-post', {
|
|
381
|
+
platform: 'bluesky',
|
|
382
|
+
author: post.author,
|
|
383
|
+
timestamp: post.createdAt
|
|
384
|
+
})
|
|
385
|
+
})
|
|
386
|
+
|
|
387
|
+
// Search nodes (optimized for queries)
|
|
388
|
+
const searchNode = new Brainy({
|
|
389
|
+
storage: {type: 's3', options: {bucket: 'social-data'}},
|
|
390
|
+
distributed: true,
|
|
391
|
+
readOnly: true // Optimized for fast queries
|
|
392
|
+
})
|
|
393
|
+
|
|
394
|
+
// Search across ALL data from ALL nodes
|
|
395
|
+
const trending = await searchNode.find('trending AI topics', {
|
|
396
|
+
where: {timestamp: {greaterThan: Date.now() - 3600000}},
|
|
397
|
+
limit: 100
|
|
398
|
+
})
|
|
165
399
|
```
|
|
166
400
|
|
|
401
|
+
### Benefits Over Traditional Systems
|
|
402
|
+
|
|
403
|
+
| Feature | Traditional (Pinecone, Weaviate) | Brainy Distributed |
|
|
404
|
+
|----------------|----------------------------------|-------------------------------|
|
|
405
|
+
| Setup | Complex (k8s, operators) | One flag: `distributed: true` |
|
|
406
|
+
| Coordination | External (etcd, Consul) | Built-in (via storage) |
|
|
407
|
+
| Minimum Nodes | 3-5 for HA | 1 (scale as needed) |
|
|
408
|
+
| Sharding | Random | Domain-aware |
|
|
409
|
+
| Query Planning | Basic | Triple Intelligence |
|
|
410
|
+
| Cost | High (always-on clusters) | Low (scale to zero) |
|
|
411
|
+
|
|
167
412
|
## π― Use Cases
|
|
168
413
|
|
|
169
414
|
### Knowledge Management with Relationships
|
|
415
|
+
|
|
170
416
|
```javascript
|
|
171
417
|
// Store documentation with rich relationships
|
|
172
|
-
const apiGuide = await brain.addNoun("REST API Guide", {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
418
|
+
const apiGuide = await brain.addNoun("REST API Guide", 'document', {
|
|
419
|
+
title: "API Guide",
|
|
420
|
+
category: "documentation",
|
|
421
|
+
version: "2.0"
|
|
176
422
|
})
|
|
177
423
|
|
|
178
|
-
const author = await brain.addNoun("Jane Developer", {
|
|
179
|
-
|
|
180
|
-
|
|
424
|
+
const author = await brain.addNoun("Jane Developer", 'person', {
|
|
425
|
+
type: "person",
|
|
426
|
+
role: "tech-lead"
|
|
181
427
|
})
|
|
182
428
|
|
|
183
|
-
const project = await brain.addNoun("E-commerce Platform", {
|
|
184
|
-
|
|
185
|
-
|
|
429
|
+
const project = await brain.addNoun("E-commerce Platform", 'project', {
|
|
430
|
+
type: "project",
|
|
431
|
+
status: "active"
|
|
186
432
|
})
|
|
187
433
|
|
|
188
434
|
// Create knowledge graph
|
|
189
|
-
await brain.addVerb(author, apiGuide, "authored", {
|
|
190
|
-
|
|
435
|
+
await brain.addVerb(author, apiGuide, "authored", {
|
|
436
|
+
date: "2024-03-15"
|
|
191
437
|
})
|
|
192
|
-
await brain.addVerb(apiGuide, project, "documents", {
|
|
193
|
-
|
|
438
|
+
await brain.addVerb(apiGuide, project, "documents", {
|
|
439
|
+
coverage: "complete"
|
|
194
440
|
})
|
|
195
441
|
|
|
196
442
|
// Query the knowledge graph naturally
|
|
@@ -198,31 +444,33 @@ const docs = await brain.find("documentation authored by tech leads for active p
|
|
|
198
444
|
```
|
|
199
445
|
|
|
200
446
|
### Semantic Search
|
|
447
|
+
|
|
201
448
|
```javascript
|
|
202
449
|
// Find similar content
|
|
203
450
|
const similar = await brain.search(existingContent, {
|
|
204
|
-
|
|
205
|
-
|
|
451
|
+
limit: 5,
|
|
452
|
+
threshold: 0.8
|
|
206
453
|
})
|
|
207
454
|
```
|
|
208
455
|
|
|
209
456
|
### AI Memory Layer with Context
|
|
457
|
+
|
|
210
458
|
```javascript
|
|
211
459
|
// Store conversation with relationships
|
|
212
|
-
const userId = await brain.addNoun("User 123", {
|
|
213
|
-
|
|
214
|
-
|
|
460
|
+
const userId = await brain.addNoun("User 123", 'user', {
|
|
461
|
+
type: "user",
|
|
462
|
+
tier: "premium"
|
|
215
463
|
})
|
|
216
464
|
|
|
217
|
-
const messageId = await brain.addNoun(userMessage, {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
465
|
+
const messageId = await brain.addNoun(userMessage, 'message', {
|
|
466
|
+
type: "message",
|
|
467
|
+
timestamp: Date.now(),
|
|
468
|
+
session: "abc"
|
|
221
469
|
})
|
|
222
470
|
|
|
223
|
-
const topicId = await brain.addNoun("Product Support", {
|
|
224
|
-
|
|
225
|
-
|
|
471
|
+
const topicId = await brain.addNoun("Product Support", 'topic', {
|
|
472
|
+
type: "topic",
|
|
473
|
+
category: "support"
|
|
226
474
|
})
|
|
227
475
|
|
|
228
476
|
// Link conversation elements
|
|
@@ -231,9 +479,9 @@ await brain.addVerb(messageId, topicId, "about")
|
|
|
231
479
|
|
|
232
480
|
// Retrieve context with relationships
|
|
233
481
|
const context = await brain.find({
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
482
|
+
where: {type: "message"},
|
|
483
|
+
connected: {from: userId, type: "sent"},
|
|
484
|
+
like: "previous product issues"
|
|
237
485
|
})
|
|
238
486
|
```
|
|
239
487
|
|
|
@@ -243,30 +491,30 @@ Brainy supports multiple storage backends:
|
|
|
243
491
|
|
|
244
492
|
```javascript
|
|
245
493
|
// Memory (default for testing)
|
|
246
|
-
const brain = new
|
|
247
|
-
|
|
494
|
+
const brain = new Brainy({
|
|
495
|
+
storage: {type: 'memory'}
|
|
248
496
|
})
|
|
249
497
|
|
|
250
498
|
// FileSystem (Node.js)
|
|
251
|
-
const brain = new
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
499
|
+
const brain = new Brainy({
|
|
500
|
+
storage: {
|
|
501
|
+
type: 'filesystem',
|
|
502
|
+
path: './data'
|
|
503
|
+
}
|
|
256
504
|
})
|
|
257
505
|
|
|
258
|
-
// Browser Storage (OPFS)
|
|
259
|
-
const brain = new
|
|
260
|
-
|
|
506
|
+
// Browser Storage (OPFS) - Works with frameworks
|
|
507
|
+
const brain = new Brainy({
|
|
508
|
+
storage: {type: 'opfs'} // Framework handles browser polyfills
|
|
261
509
|
})
|
|
262
510
|
|
|
263
511
|
// S3 Compatible (Production)
|
|
264
|
-
const brain = new
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
512
|
+
const brain = new Brainy({
|
|
513
|
+
storage: {
|
|
514
|
+
type: 's3',
|
|
515
|
+
bucket: 'my-bucket',
|
|
516
|
+
region: 'us-east-1'
|
|
517
|
+
}
|
|
270
518
|
})
|
|
271
519
|
```
|
|
272
520
|
|
|
@@ -294,6 +542,68 @@ brainy chat
|
|
|
294
542
|
brainy export --format json > backup.json
|
|
295
543
|
```
|
|
296
544
|
|
|
545
|
+
## π§ Neural API - Advanced AI Features
|
|
546
|
+
|
|
547
|
+
Brainy includes a powerful Neural API for advanced semantic analysis:
|
|
548
|
+
|
|
549
|
+
### Clustering & Analysis
|
|
550
|
+
|
|
551
|
+
```javascript
|
|
552
|
+
// Access via brain.neural
|
|
553
|
+
const neural = brain.neural
|
|
554
|
+
|
|
555
|
+
// Automatic semantic clustering
|
|
556
|
+
const clusters = await neural.clusters()
|
|
557
|
+
// Returns groups of semantically similar items
|
|
558
|
+
|
|
559
|
+
// Cluster with options
|
|
560
|
+
const clusters = await neural.clusters({
|
|
561
|
+
algorithm: 'kmeans', // or 'hierarchical', 'sample'
|
|
562
|
+
maxClusters: 5, // Maximum number of clusters
|
|
563
|
+
threshold: 0.8 // Similarity threshold
|
|
564
|
+
})
|
|
565
|
+
|
|
566
|
+
// Calculate similarity between any items
|
|
567
|
+
const similarity = await neural.similar('item1', 'item2')
|
|
568
|
+
// Returns 0-1 score
|
|
569
|
+
|
|
570
|
+
// Find nearest neighbors
|
|
571
|
+
const neighbors = await neural.neighbors('item-id', 10)
|
|
572
|
+
|
|
573
|
+
// Build semantic hierarchy
|
|
574
|
+
const hierarchy = await neural.hierarchy('item-id')
|
|
575
|
+
|
|
576
|
+
// Detect outliers
|
|
577
|
+
const outliers = await neural.outliers(0.3)
|
|
578
|
+
|
|
579
|
+
// Generate visualization data for D3/Cytoscape
|
|
580
|
+
const vizData = await neural.visualize({
|
|
581
|
+
maxNodes: 100,
|
|
582
|
+
dimensions: 3,
|
|
583
|
+
algorithm: 'force'
|
|
584
|
+
})
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
### Real-World Examples
|
|
588
|
+
|
|
589
|
+
```javascript
|
|
590
|
+
// Group customer feedback into themes
|
|
591
|
+
const feedbackClusters = await neural.clusters()
|
|
592
|
+
for (const cluster of feedbackClusters) {
|
|
593
|
+
console.log(`Theme: ${cluster.label}`)
|
|
594
|
+
console.log(`Items: ${cluster.members.length}`)
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
// Find related documents
|
|
598
|
+
const docId = await brain.addNoun("Machine learning guide", 'document')
|
|
599
|
+
const similar = await neural.neighbors(docId, 5)
|
|
600
|
+
// Returns 5 most similar documents
|
|
601
|
+
|
|
602
|
+
// Detect anomalies in data
|
|
603
|
+
const anomalies = await neural.outliers(0.2)
|
|
604
|
+
console.log(`Found ${anomalies.length} outliers`)
|
|
605
|
+
```
|
|
606
|
+
|
|
297
607
|
## π Augmentations
|
|
298
608
|
|
|
299
609
|
Extend Brainy with powerful augmentations:
|
|
@@ -314,32 +624,30 @@ brainy cloud setup
|
|
|
314
624
|
Brainy includes enterprise-grade capabilities at no extra cost. **No premium tiers, no paywalls.**
|
|
315
625
|
|
|
316
626
|
- **Scales to 10M+ items** with consistent 3ms search latency
|
|
317
|
-
- **Write-Ahead Logging (WAL)** for zero data loss durability
|
|
318
627
|
- **Distributed architecture** with sharding and replication
|
|
319
628
|
- **Read/write separation** for horizontal scaling
|
|
320
629
|
- **Connection pooling** and request deduplication
|
|
321
630
|
- **Built-in monitoring** with metrics and health checks
|
|
322
631
|
- **Production ready** with circuit breakers and backpressure
|
|
323
632
|
|
|
324
|
-
π **
|
|
633
|
+
π **Enterprise features coming in Brainy 3.1** - Stay tuned!
|
|
325
634
|
|
|
326
635
|
## π Benchmarks
|
|
327
636
|
|
|
328
|
-
| Operation
|
|
329
|
-
|
|
330
|
-
| Initialize
|
|
331
|
-
| Add Item
|
|
332
|
-
| Vector Search (1k items)
|
|
333
|
-
| Metadata Filter (10k items)
|
|
334
|
-
| Natural Language Query
|
|
335
|
-
| Bulk Import (1000 items)
|
|
336
|
-
| **Production Scale (10M items)** | **5.8ms**
|
|
637
|
+
| Operation | Performance | Memory |
|
|
638
|
+
|----------------------------------|-------------|----------|
|
|
639
|
+
| Initialize | 450ms | 24MB |
|
|
640
|
+
| Add Item | 12ms | +0.1MB |
|
|
641
|
+
| Vector Search (1k items) | 3ms | - |
|
|
642
|
+
| Metadata Filter (10k items) | 0.8ms | - |
|
|
643
|
+
| Natural Language Query | 15ms | - |
|
|
644
|
+
| Bulk Import (1000 items) | 2.3s | +8MB |
|
|
645
|
+
| **Production Scale (10M items)** | **5.8ms** | **12GB** |
|
|
337
646
|
|
|
338
|
-
## π Migration from
|
|
647
|
+
## π Migration from 2.x
|
|
339
648
|
|
|
340
|
-
|
|
649
|
+
Key changes for upgrading to 3.0:
|
|
341
650
|
|
|
342
|
-
Key changes:
|
|
343
651
|
- Search methods consolidated into `search()` and `find()`
|
|
344
652
|
- Result format now includes full objects with metadata
|
|
345
653
|
- New natural language capabilities
|
|
@@ -353,8 +661,9 @@ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
|
353
661
|
### How We Achieved The Impossible
|
|
354
662
|
|
|
355
663
|
**Triple Intelligenceβ’** makes us the **world's first** to unify three database paradigms:
|
|
664
|
+
|
|
356
665
|
1. **Vector databases** (Pinecone, Weaviate) - semantic similarity
|
|
357
|
-
2. **Graph databases** (Neo4j, ArangoDB) - relationships
|
|
666
|
+
2. **Graph databases** (Neo4j, ArangoDB) - relationships
|
|
358
667
|
3. **Document databases** (MongoDB, Elasticsearch) - metadata filtering
|
|
359
668
|
|
|
360
669
|
**One API to rule them all.** Others make you choose. We unified them.
|
|
@@ -373,6 +682,7 @@ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
|
373
682
|
### Why This Changes Everything
|
|
374
683
|
|
|
375
684
|
**Like HTTP for the web, Brainy for knowledge:**
|
|
685
|
+
|
|
376
686
|
- All augmentations compose perfectly - same noun-verb language
|
|
377
687
|
- All AI models share knowledge - GPT, Claude, Llama all understand
|
|
378
688
|
- All tools integrate seamlessly - no translation layers
|
|
@@ -386,6 +696,12 @@ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
|
386
696
|
|
|
387
697
|
## π Documentation
|
|
388
698
|
|
|
699
|
+
### Framework Integration
|
|
700
|
+
- [Framework Integration Guide](docs/guides/framework-integration.md) - **NEW!** Complete framework setup guide
|
|
701
|
+
- [Next.js Integration](docs/guides/nextjs-integration.md) - **NEW!** React and Next.js examples
|
|
702
|
+
- [Vue.js Integration](docs/guides/vue-integration.md) - **NEW!** Vue and Nuxt examples
|
|
703
|
+
|
|
704
|
+
### Core Documentation
|
|
389
705
|
- [Getting Started Guide](docs/guides/getting-started.md)
|
|
390
706
|
- [API Reference](docs/api/README.md)
|
|
391
707
|
- [Architecture Overview](docs/architecture/overview.md)
|