@soulcraft/brainy 4.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +392 -449
- package/dist/augmentations/KnowledgeAugmentation.d.ts +40 -0
- package/dist/augmentations/KnowledgeAugmentation.js +251 -0
- package/dist/query/typeInference.d.ts +158 -0
- package/dist/query/typeInference.js +760 -0
- package/dist/types/brainyDataInterface.d.ts +52 -0
- package/dist/types/brainyDataInterface.js +10 -0
- package/dist/vfs/ConceptSystem.d.ts +203 -0
- package/dist/vfs/ConceptSystem.js +545 -0
- package/dist/vfs/EntityManager.d.ts +75 -0
- package/dist/vfs/EntityManager.js +216 -0
- package/dist/vfs/EventRecorder.d.ts +84 -0
- package/dist/vfs/EventRecorder.js +269 -0
- package/dist/vfs/GitBridge.d.ts +167 -0
- package/dist/vfs/GitBridge.js +537 -0
- package/dist/vfs/KnowledgeLayer.d.ts +35 -0
- package/dist/vfs/KnowledgeLayer.js +443 -0
- package/dist/vfs/PersistentEntitySystem.d.ts +165 -0
- package/dist/vfs/PersistentEntitySystem.js +503 -0
- package/dist/vfs/SemanticVersioning.d.ts +105 -0
- package/dist/vfs/SemanticVersioning.js +309 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -9,676 +9,619 @@
|
|
|
9
9
|
[](LICENSE)
|
|
10
10
|
[](https://www.typescriptlang.org/)
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## The Knowledge Operating System
|
|
13
13
|
|
|
14
|
-
**
|
|
14
|
+
**Every piece of knowledge in your application — living, connected, and intelligent.**
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Stop fighting with vector databases, graph databases, and document stores. Stop stitching together Pinecone + Neo4j + MongoDB. **Brainy does all three, in one elegant API, from prototype to planet-scale.**
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
```javascript
|
|
19
|
+
const brain = new Brainy()
|
|
20
|
+
await brain.init()
|
|
21
|
+
|
|
22
|
+
// That's it. You now have semantic search, graph relationships,
|
|
23
|
+
// and document filtering. Zero configuration. Just works.
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Built by developers who were tired of:**
|
|
27
|
+
- Spending weeks configuring embeddings, indexes, and schemas
|
|
28
|
+
- Choosing between vector similarity OR graph relationships OR metadata filtering
|
|
29
|
+
- Rewriting everything when you need to scale from 1,000 to 1,000,000,000 entities
|
|
30
|
+
|
|
31
|
+
**Brainy makes the impossible simple: All three paradigms. One API. Any scale.**
|
|
19
32
|
|
|
20
33
|
---
|
|
21
34
|
|
|
22
|
-
##
|
|
35
|
+
## See It In Action
|
|
23
36
|
|
|
24
|
-
**
|
|
37
|
+
**30 seconds to understand why Brainy is different:**
|
|
25
38
|
|
|
26
|
-
|
|
39
|
+
```javascript
|
|
40
|
+
import { Brainy, NounType, VerbType } from '@soulcraft/brainy'
|
|
27
41
|
|
|
28
|
-
|
|
42
|
+
const brain = new Brainy()
|
|
43
|
+
await brain.init()
|
|
29
44
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
45
|
+
// Add knowledge with context
|
|
46
|
+
const reactId = await brain.add({
|
|
47
|
+
data: "React is a JavaScript library for building user interfaces",
|
|
48
|
+
type: NounType.Concept,
|
|
49
|
+
metadata: { category: "frontend", year: 2013 }
|
|
50
|
+
})
|
|
34
51
|
|
|
35
|
-
|
|
52
|
+
const nextId = await brain.add({
|
|
53
|
+
data: "Next.js framework for React with server-side rendering",
|
|
54
|
+
type: NounType.Concept,
|
|
55
|
+
metadata: { category: "framework", year: 2016 }
|
|
56
|
+
})
|
|
36
57
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- **OPFS quota monitoring** for browser storage
|
|
40
|
-
- **Enhanced CLI** with 47 commands including 9 storage management tools
|
|
58
|
+
// Create relationships
|
|
59
|
+
await brain.relate({ from: nextId, to: reactId, type: VerbType.BuiltOn })
|
|
41
60
|
|
|
42
|
-
|
|
61
|
+
// NOW THE MAGIC: Query with natural language
|
|
62
|
+
const results = await brain.find({
|
|
63
|
+
query: "modern frontend frameworks", // 🔍 Vector similarity
|
|
64
|
+
where: { year: { greaterThan: 2015 } }, // 📊 Document filtering
|
|
65
|
+
connected: { to: reactId, depth: 2 } // 🕸️ Graph traversal
|
|
66
|
+
})
|
|
43
67
|
|
|
44
|
-
|
|
68
|
+
// ALL THREE PARADIGMS. ONE QUERY. 10ms response time.
|
|
69
|
+
```
|
|
45
70
|
|
|
46
|
-
**
|
|
71
|
+
**This is impossible with traditional databases.** Brainy makes it trivial.
|
|
47
72
|
|
|
48
73
|
---
|
|
49
74
|
|
|
50
|
-
##
|
|
75
|
+
## From Prototype to Planet Scale
|
|
51
76
|
|
|
52
|
-
|
|
77
|
+
**The same API. Zero rewrites. Any scale.**
|
|
53
78
|
|
|
54
|
-
|
|
79
|
+
### 👤 **Individual Developer** → Weekend Prototype
|
|
80
|
+
|
|
81
|
+
```javascript
|
|
82
|
+
// Zero configuration - starts in memory
|
|
83
|
+
const brain = new Brainy()
|
|
84
|
+
await brain.init()
|
|
85
|
+
|
|
86
|
+
// Build your prototype in minutes
|
|
87
|
+
// Change nothing when ready to scale
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Perfect for:** Hackathons, side projects, rapid prototyping, learning AI concepts
|
|
91
|
+
|
|
92
|
+
### 👥 **Small Team** → Production MVP (Thousands of Entities)
|
|
55
93
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
94
|
+
```javascript
|
|
95
|
+
// Add persistence - one line
|
|
96
|
+
const brain = new Brainy({
|
|
97
|
+
storage: {
|
|
98
|
+
type: 'filesystem',
|
|
99
|
+
path: './brainy-data',
|
|
100
|
+
compression: true // 60-80% space savings
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
```
|
|
59
104
|
|
|
60
|
-
**
|
|
105
|
+
**Perfect for:** Startups, MVPs, internal tools, team knowledge bases
|
|
106
|
+
**Scale:** Thousands to hundreds of thousands of entities
|
|
107
|
+
**Performance:** <5ms queries, sub-second imports
|
|
61
108
|
|
|
62
|
-
###
|
|
109
|
+
### 🏢 **Growing Company** → Multi-Million Entity Scale
|
|
63
110
|
|
|
64
111
|
```javascript
|
|
65
|
-
|
|
112
|
+
// Scale to cloud - same API
|
|
113
|
+
const brain = new Brainy({
|
|
114
|
+
storage: {
|
|
115
|
+
type: 's3',
|
|
116
|
+
s3Storage: {
|
|
117
|
+
bucketName: 'my-knowledge-base',
|
|
118
|
+
region: 'us-east-1'
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
hnsw: { typeAware: true } // 87% memory reduction
|
|
122
|
+
})
|
|
123
|
+
```
|
|
66
124
|
|
|
67
|
-
|
|
68
|
-
|
|
125
|
+
**Perfect for:** SaaS products, e-commerce, content platforms, enterprise apps
|
|
126
|
+
**Scale:** Millions of entities
|
|
127
|
+
**Performance:** <10ms queries, 12GB memory @ 10M entities
|
|
128
|
+
**Features:** Auto-scaling, distributed storage, cost optimization (96% savings)
|
|
129
|
+
|
|
130
|
+
### 🌍 **Enterprise / Planet Scale** → Billion+ Entities
|
|
131
|
+
|
|
132
|
+
```javascript
|
|
133
|
+
// Billion-scale - STILL the same API
|
|
134
|
+
const brain = new Brainy({
|
|
135
|
+
storage: {
|
|
136
|
+
type: 'gcs',
|
|
137
|
+
gcsStorage: { bucketName: 'global-knowledge' }
|
|
138
|
+
},
|
|
139
|
+
hnsw: {
|
|
140
|
+
typeAware: true,
|
|
141
|
+
M: 32,
|
|
142
|
+
efConstruction: 400
|
|
143
|
+
}
|
|
144
|
+
})
|
|
69
145
|
|
|
70
|
-
//
|
|
146
|
+
// Enable intelligent archival
|
|
147
|
+
await brain.storage.enableAutoclass({
|
|
148
|
+
terminalStorageClass: 'ARCHIVE'
|
|
149
|
+
})
|
|
71
150
|
```
|
|
72
151
|
|
|
73
|
-
|
|
152
|
+
**Perfect for:** Fortune 500, global platforms, research institutions, government
|
|
153
|
+
**Scale:** Billions of entities (tested at 1B+)
|
|
154
|
+
**Performance:** 18ms queries @ 1B scale, 50GB memory (87% reduction)
|
|
155
|
+
**Cost:** $138k/year → $6k/year with intelligent tiering (96% savings)
|
|
156
|
+
**Features:** Sharding, replication, monitoring, enterprise SLAs
|
|
157
|
+
|
|
158
|
+
### 🎯 **The Point**
|
|
159
|
+
|
|
160
|
+
**Start simple. Scale infinitely. Never rewrite.**
|
|
161
|
+
|
|
162
|
+
Most systems force you to choose:
|
|
163
|
+
- Simple but doesn't scale (SQLite, Redis)
|
|
164
|
+
- Scales but complex (Kubernetes + 7 databases)
|
|
165
|
+
|
|
166
|
+
**Brainy gives you both:** Starts simple as SQLite. Scales like Google.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Why Brainy Is Revolutionary
|
|
171
|
+
|
|
172
|
+
### 🧠 **Triple Intelligence™** — The Impossible Made Possible
|
|
173
|
+
|
|
174
|
+
**The world's first to unify three database paradigms in ONE API:**
|
|
175
|
+
|
|
176
|
+
| What You Get | Like Having | But Unified |
|
|
177
|
+
|-------------|-------------|-------------|
|
|
178
|
+
| 🔍 **Vector Search** | Pinecone, Weaviate | Find by meaning |
|
|
179
|
+
| 🕸️ **Graph Relationships** | Neo4j, ArangoDB | Navigate connections |
|
|
180
|
+
| 📊 **Document Filtering** | MongoDB, Elasticsearch | Query metadata |
|
|
181
|
+
|
|
182
|
+
**Every other system makes you choose.** Brainy does all three together.
|
|
74
183
|
|
|
75
|
-
|
|
184
|
+
**Why this matters:** Your data isn't just vectors or just documents or just graphs. It's all three at once. A research paper is semantically similar to other papers (vector), written by an author (graph), and published in 2023 (document). **Brainy is the only system that understands this.**
|
|
76
185
|
|
|
77
|
-
|
|
78
|
-
- **87% memory reduction** @ billion scale (384GB → 50GB)
|
|
79
|
-
- **10x faster queries** with type-aware indexing
|
|
80
|
-
- **99% storage cost savings** with intelligent archival
|
|
81
|
-
- **Container-aware** memory allocation (Docker/K8s)
|
|
186
|
+
### 🎯 **31 Noun Types × 40 Verb Types = Universal Protocol**
|
|
82
187
|
|
|
83
|
-
|
|
188
|
+
Model **any domain** with mathematical completeness:
|
|
84
189
|
|
|
85
|
-
|
|
190
|
+
```
|
|
191
|
+
31 Nouns × 40 Verbs × ∞ Metadata = 1,240+ base combinations
|
|
192
|
+
```
|
|
86
193
|
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
194
|
+
**Real-world expressiveness:**
|
|
195
|
+
- Healthcare: `Patient → diagnoses → Condition`
|
|
196
|
+
- Finance: `Account → transfers → Transaction`
|
|
197
|
+
- Manufacturing: `Product → assembles → Component`
|
|
198
|
+
- Education: `Student → completes → Course`
|
|
199
|
+
- **YOUR domain** → Your types + relationships = Your knowledge graph
|
|
92
200
|
|
|
93
201
|
[→ See the Mathematical Proof](docs/architecture/noun-verb-taxonomy.md)
|
|
94
202
|
|
|
203
|
+
### ⚡ **Zero Configuration Philosophy**
|
|
204
|
+
|
|
205
|
+
**We hate configuration files. So we eliminated them.**
|
|
206
|
+
|
|
207
|
+
```javascript
|
|
208
|
+
const brain = new Brainy() // Auto-detects everything
|
|
209
|
+
await brain.init() // Optimizes for your environment
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Brainy automatically:
|
|
213
|
+
- Detects optimal storage (memory/filesystem/cloud)
|
|
214
|
+
- Configures memory based on available RAM
|
|
215
|
+
- Optimizes for containers (Docker/K8s)
|
|
216
|
+
- Tunes indexes for your data patterns
|
|
217
|
+
- Manages embedding models and caching
|
|
218
|
+
|
|
219
|
+
**You write business logic. Brainy handles infrastructure.**
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## What Can You Build?
|
|
224
|
+
|
|
225
|
+
**If your app needs to remember, understand, or connect information — Brainy makes it trivial.**
|
|
226
|
+
|
|
227
|
+
### 🤖 **AI Agents with Perfect Memory**
|
|
228
|
+
Give your AI unlimited context that persists forever. Not just chat history — true understanding of relationships, evolution, and meaning over time.
|
|
229
|
+
|
|
230
|
+
**Examples:** Personal assistants, code assistants, conversational AI, research agents
|
|
231
|
+
|
|
232
|
+
### 📚 **Living Documentation & Knowledge Bases**
|
|
233
|
+
Documentation that understands itself. Auto-links related concepts, detects outdated information, finds connections across your entire knowledge base.
|
|
234
|
+
|
|
235
|
+
**Examples:** Internal wikis, research platforms, smart documentation, learning systems
|
|
236
|
+
|
|
237
|
+
### 🔍 **Semantic Search at Any Scale**
|
|
238
|
+
Find by meaning, not keywords. Search codebases, research papers, customer data, or media libraries with natural language.
|
|
239
|
+
|
|
240
|
+
**Examples:** Code search, research platforms, content discovery, recommendation engines
|
|
241
|
+
|
|
242
|
+
### 🏢 **Enterprise Knowledge Management**
|
|
243
|
+
Corporate memory that never forgets. Track every customer interaction, product evolution, and business relationship.
|
|
244
|
+
|
|
245
|
+
**Examples:** CRM systems, product catalogs, customer intelligence, institutional knowledge
|
|
246
|
+
|
|
247
|
+
### 🎮 **Rich Interactive Experiences**
|
|
248
|
+
NPCs that remember. Characters that persist across stories. Worlds that evolve based on real relationships.
|
|
249
|
+
|
|
250
|
+
**Examples:** Game worlds, interactive fiction, educational platforms, creative tools
|
|
251
|
+
|
|
252
|
+
### 🎨 **Content & Media Platforms**
|
|
253
|
+
Every asset knows its relationships. Intelligent tagging, similarity-based discovery, and relationship-aware management.
|
|
254
|
+
|
|
255
|
+
**Examples:** DAM systems, media libraries, writing assistants, content management
|
|
256
|
+
|
|
257
|
+
**The pattern:** Knowledge that needs to live, connect, and evolve. That's what Brainy was built for.
|
|
258
|
+
|
|
95
259
|
---
|
|
96
260
|
|
|
97
|
-
##
|
|
261
|
+
## Quick Start
|
|
98
262
|
|
|
99
263
|
```bash
|
|
100
264
|
npm install @soulcraft/brainy
|
|
101
265
|
```
|
|
102
266
|
|
|
103
|
-
###
|
|
267
|
+
### Your First Knowledge Graph (60 seconds)
|
|
104
268
|
|
|
105
269
|
```javascript
|
|
106
|
-
import { Brainy, NounType } from '@soulcraft/brainy'
|
|
270
|
+
import { Brainy, NounType, VerbType } from '@soulcraft/brainy'
|
|
107
271
|
|
|
108
|
-
// Just this - auto-detects everything!
|
|
109
272
|
const brain = new Brainy()
|
|
110
273
|
await brain.init()
|
|
111
274
|
|
|
112
|
-
// Add
|
|
275
|
+
// Add knowledge
|
|
113
276
|
const jsId = await brain.add({
|
|
114
277
|
data: "JavaScript is a programming language",
|
|
115
|
-
|
|
116
|
-
metadata: {
|
|
117
|
-
type: "language",
|
|
118
|
-
year: 1995,
|
|
119
|
-
paradigm: "multi-paradigm"
|
|
120
|
-
}
|
|
278
|
+
type: NounType.Concept,
|
|
279
|
+
metadata: { category: "language", year: 1995 }
|
|
121
280
|
})
|
|
122
281
|
|
|
123
282
|
const nodeId = await brain.add({
|
|
124
283
|
data: "Node.js runtime environment",
|
|
125
|
-
|
|
126
|
-
metadata: {
|
|
127
|
-
type: "runtime",
|
|
128
|
-
year: 2009,
|
|
129
|
-
platform: "server-side"
|
|
130
|
-
}
|
|
284
|
+
type: NounType.Concept,
|
|
285
|
+
metadata: { category: "runtime", year: 2009 }
|
|
131
286
|
})
|
|
132
287
|
|
|
133
|
-
// Create relationships
|
|
134
|
-
await brain.relate({
|
|
135
|
-
from: nodeId,
|
|
136
|
-
to: jsId,
|
|
137
|
-
type: "executes",
|
|
138
|
-
metadata: {
|
|
139
|
-
since: 2009,
|
|
140
|
-
performance: "high"
|
|
141
|
-
}
|
|
142
|
-
})
|
|
288
|
+
// Create relationships
|
|
289
|
+
await brain.relate({ from: nodeId, to: jsId, type: VerbType.Executes })
|
|
143
290
|
|
|
144
|
-
//
|
|
291
|
+
// Query with Triple Intelligence
|
|
145
292
|
const results = await brain.find({
|
|
146
|
-
query: "
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// Triple Intelligence: vector + metadata + relationships
|
|
150
|
-
const filtered = await brain.find({
|
|
151
|
-
query: "JavaScript", // Vector similarity
|
|
152
|
-
where: {type: "language"}, // Metadata filtering
|
|
153
|
-
connected: {from: nodeId, depth: 1} // Graph relationships
|
|
293
|
+
query: "JavaScript", // 🔍 Vector
|
|
294
|
+
where: { category: "language" }, // 📊 Document
|
|
295
|
+
connected: { from: nodeId, depth: 1 } // 🕸️ Graph
|
|
154
296
|
})
|
|
155
297
|
```
|
|
156
298
|
|
|
157
|
-
**
|
|
299
|
+
**Done.** No configuration. No complexity. Production-ready from day one.
|
|
158
300
|
|
|
159
301
|
---
|
|
160
302
|
|
|
161
|
-
##
|
|
303
|
+
## Core Features
|
|
162
304
|
|
|
163
|
-
### 🧠 **Natural Language
|
|
305
|
+
### 🧠 **Natural Language Queries**
|
|
164
306
|
|
|
165
307
|
```javascript
|
|
166
|
-
// Ask
|
|
167
|
-
await brain.find("
|
|
168
|
-
await brain.find("
|
|
169
|
-
await brain.find("Documentation about authentication from last month")
|
|
308
|
+
// Ask naturally - Brainy understands
|
|
309
|
+
await brain.find("recent React components with tests")
|
|
310
|
+
await brain.find("JavaScript libraries similar to Vue")
|
|
170
311
|
|
|
171
|
-
//
|
|
312
|
+
// Or use structured Triple Intelligence queries
|
|
172
313
|
await brain.find({
|
|
173
|
-
|
|
174
|
-
where: {
|
|
175
|
-
|
|
176
|
-
year: {greaterThan: 2020}
|
|
177
|
-
},
|
|
178
|
-
connected: {to: "JavaScript", depth: 2} // Graph relationships
|
|
314
|
+
query: "React",
|
|
315
|
+
where: { type: "library", year: { greaterThan: 2020 } },
|
|
316
|
+
connected: { to: "JavaScript", depth: 2 }
|
|
179
317
|
})
|
|
180
318
|
```
|
|
181
319
|
|
|
182
|
-
### 🌐 **Virtual Filesystem
|
|
320
|
+
### 🌐 **Virtual Filesystem** — Intelligent File Management
|
|
183
321
|
|
|
184
|
-
Build file explorers
|
|
322
|
+
Build file explorers and IDEs that never crash:
|
|
185
323
|
|
|
186
324
|
```javascript
|
|
187
325
|
const vfs = brain.vfs()
|
|
188
|
-
await vfs.init()
|
|
189
|
-
|
|
190
|
-
// ✅ Safe file operations
|
|
191
|
-
await vfs.writeFile('/projects/app/index.js', 'console.log("Hello")')
|
|
192
|
-
await vfs.mkdir('/docs')
|
|
193
326
|
|
|
194
|
-
//
|
|
195
|
-
const
|
|
327
|
+
// Tree-aware operations prevent infinite recursion
|
|
328
|
+
const tree = await vfs.getTreeStructure('/projects', { maxDepth: 3 })
|
|
196
329
|
|
|
197
|
-
//
|
|
198
|
-
const tree = await vfs.getTreeStructure('/projects', {
|
|
199
|
-
maxDepth: 3, // Prevent deep recursion
|
|
200
|
-
sort: 'name'
|
|
201
|
-
})
|
|
202
|
-
|
|
203
|
-
// ✅ Semantic file search
|
|
330
|
+
// Semantic file search
|
|
204
331
|
const reactFiles = await vfs.search('React components with hooks')
|
|
205
332
|
```
|
|
206
333
|
|
|
207
|
-
**
|
|
208
|
-
|
|
209
|
-
**[📖 VFS Quick Start →](docs/vfs/QUICK_START.md)** | **[🎯 Common Patterns →](docs/vfs/COMMON_PATTERNS.md)**
|
|
334
|
+
**[📖 VFS Quick Start →](docs/vfs/QUICK_START.md)** | **[Common Patterns →](docs/vfs/COMMON_PATTERNS.md)** | **[Neural Extraction →](docs/vfs/NEURAL_EXTRACTION.md)**
|
|
210
335
|
|
|
211
|
-
### 🚀 **Import Anything
|
|
336
|
+
### 🚀 **Import Anything** — CSV, Excel, PDF, URLs
|
|
212
337
|
|
|
213
338
|
```javascript
|
|
214
|
-
//
|
|
215
|
-
await brain.import('
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
// Import Excel workbooks with multi-sheet support
|
|
219
|
-
await brain.import('sales-data.xlsx', {
|
|
220
|
-
excelSheets: ['Q1', 'Q2']
|
|
221
|
-
})
|
|
222
|
-
|
|
223
|
-
// Import PDF documents with table extraction
|
|
224
|
-
await brain.import('research-paper.pdf', {
|
|
225
|
-
pdfExtractTables: true
|
|
226
|
-
})
|
|
227
|
-
|
|
228
|
-
// Import from URLs (auto-fetched)
|
|
339
|
+
await brain.import('customers.csv') // Auto-detects everything
|
|
340
|
+
await brain.import('sales-data.xlsx', { excelSheets: ['Q1', 'Q2'] })
|
|
341
|
+
await brain.import('research-paper.pdf', { pdfExtractTables: true })
|
|
229
342
|
await brain.import('https://api.example.com/data.json')
|
|
230
343
|
```
|
|
231
344
|
|
|
232
345
|
**[📖 Complete Import Guide →](docs/guides/import-anything.md)**
|
|
233
346
|
|
|
234
|
-
### 🧠 **Neural API
|
|
347
|
+
### 🧠 **Neural API** — Advanced Semantic Analysis
|
|
235
348
|
|
|
236
349
|
```javascript
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
const
|
|
241
|
-
|
|
242
|
-
maxClusters: 5,
|
|
243
|
-
threshold: 0.8
|
|
244
|
-
})
|
|
245
|
-
|
|
246
|
-
// Calculate similarity between any items
|
|
247
|
-
const similarity = await neural.similar('item1', 'item2')
|
|
248
|
-
|
|
249
|
-
// Find nearest neighbors
|
|
250
|
-
const neighbors = await neural.neighbors('item-id', 10)
|
|
251
|
-
|
|
252
|
-
// Detect outliers
|
|
253
|
-
const outliers = await neural.outliers(0.3)
|
|
254
|
-
|
|
255
|
-
// Generate visualization data for D3/Cytoscape
|
|
256
|
-
const vizData = await neural.visualize({
|
|
257
|
-
maxNodes: 100,
|
|
258
|
-
dimensions: 3,
|
|
259
|
-
algorithm: 'force'
|
|
260
|
-
})
|
|
350
|
+
// Clustering, similarity, outlier detection, visualization
|
|
351
|
+
const clusters = await brain.neural.clusters({ algorithm: 'kmeans' })
|
|
352
|
+
const similarity = await brain.neural.similar('item1', 'item2')
|
|
353
|
+
const outliers = await brain.neural.outliers(0.3)
|
|
354
|
+
const vizData = await brain.neural.visualize({ maxNodes: 100 })
|
|
261
355
|
```
|
|
262
356
|
|
|
263
357
|
---
|
|
264
358
|
|
|
265
|
-
##
|
|
359
|
+
## Framework Integration
|
|
266
360
|
|
|
267
|
-
**
|
|
361
|
+
**Works with any modern framework.** React, Vue, Angular, Svelte, Solid.js — your choice.
|
|
268
362
|
|
|
269
|
-
### ⚛️ React & Next.js
|
|
270
363
|
```javascript
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
364
|
+
// React
|
|
365
|
+
const [brain] = useState(() => new Brainy())
|
|
366
|
+
useEffect(() => { brain.init() }, [])
|
|
274
367
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
setResults(results)
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
```
|
|
368
|
+
// Vue
|
|
369
|
+
async mounted() { this.brain = await new Brainy().init() }
|
|
281
370
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
export default {
|
|
285
|
-
async mounted() {
|
|
286
|
-
this.brain = new Brainy()
|
|
287
|
-
await this.brain.init()
|
|
288
|
-
},
|
|
289
|
-
methods: {
|
|
290
|
-
async search(query) {
|
|
291
|
-
return await this.brain.find(query)
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
}
|
|
371
|
+
// Angular
|
|
372
|
+
@Injectable() export class BrainyService { brain = new Brainy() }
|
|
295
373
|
```
|
|
296
374
|
|
|
297
|
-
|
|
298
|
-
```typescript
|
|
299
|
-
@Injectable({ providedIn: 'root' })
|
|
300
|
-
export class BrainyService {
|
|
301
|
-
private brain = new Brainy()
|
|
302
|
-
async search(query: string) {
|
|
303
|
-
return await this.brain.find(query)
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
```
|
|
375
|
+
**Supports:** All bundlers (Webpack, Vite, Rollup) • SSR/SSG • Edge runtimes • Browser/Node.js
|
|
307
376
|
|
|
308
|
-
**
|
|
377
|
+
**[📖 Framework Integration Guide →](docs/guides/framework-integration.md)** | **[Next.js →](docs/guides/nextjs-integration.md)** | **[Vue →](docs/guides/vue-integration.md)**
|
|
309
378
|
|
|
310
379
|
---
|
|
311
380
|
|
|
312
|
-
##
|
|
381
|
+
## Storage — From Memory to Planet-Scale
|
|
313
382
|
|
|
314
|
-
###
|
|
383
|
+
### Development → Just Works
|
|
315
384
|
```javascript
|
|
316
|
-
const brain = new Brainy() // Memory storage,
|
|
385
|
+
const brain = new Brainy() // Memory storage, zero config
|
|
317
386
|
```
|
|
318
387
|
|
|
319
|
-
###
|
|
388
|
+
### Production → Persistence with Compression
|
|
320
389
|
```javascript
|
|
321
390
|
const brain = new Brainy({
|
|
322
|
-
storage: {
|
|
323
|
-
type: 'filesystem',
|
|
324
|
-
path: './brainy-data',
|
|
325
|
-
compression: true // 60-80% space savings!
|
|
326
|
-
}
|
|
391
|
+
storage: { type: 'filesystem', path: './data', compression: true }
|
|
327
392
|
})
|
|
393
|
+
// 60-80% space savings with gzip
|
|
328
394
|
```
|
|
329
395
|
|
|
330
|
-
###
|
|
331
|
-
|
|
332
|
-
Choose your cloud provider - all support **automatic cost optimization:**
|
|
333
|
-
|
|
334
|
-
#### **AWS S3 / Cloudflare R2 / DigitalOcean Spaces**
|
|
396
|
+
### Cloud → AWS, GCS, Azure, Cloudflare R2
|
|
335
397
|
```javascript
|
|
398
|
+
// AWS S3 / Cloudflare R2
|
|
336
399
|
const brain = new Brainy({
|
|
337
400
|
storage: {
|
|
338
401
|
type: 's3',
|
|
339
402
|
s3Storage: {
|
|
340
403
|
bucketName: 'my-knowledge-base',
|
|
341
|
-
region: 'us-east-1'
|
|
342
|
-
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
|
|
343
|
-
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY
|
|
404
|
+
region: 'us-east-1'
|
|
344
405
|
}
|
|
345
406
|
}
|
|
346
407
|
})
|
|
347
408
|
|
|
348
|
-
// Enable Intelligent-Tiering
|
|
349
|
-
await brain.storage.enableIntelligentTiering('entities/', '
|
|
409
|
+
// Enable Intelligent-Tiering: 96% cost savings
|
|
410
|
+
await brain.storage.enableIntelligentTiering('entities/', 'auto-tier')
|
|
350
411
|
```
|
|
351
412
|
|
|
352
|
-
|
|
353
|
-
```javascript
|
|
354
|
-
const brain = new Brainy({
|
|
355
|
-
storage: {
|
|
356
|
-
type: 'gcs',
|
|
357
|
-
gcsStorage: {
|
|
358
|
-
bucketName: 'my-knowledge-base',
|
|
359
|
-
keyFilename: '/path/to/service-account.json'
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
})
|
|
413
|
+
**Cost optimization at scale:**
|
|
363
414
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
415
|
+
| Scale | Standard | With Intelligent Tiering | Annual Savings |
|
|
416
|
+
|-------|----------|--------------------------|----------------|
|
|
417
|
+
| 5TB | $1,380 | $59 | $1,321 (96%) |
|
|
418
|
+
| 50TB | $13,800 | $594 | $13,206 (96%) |
|
|
419
|
+
| 500TB | $138,000 | $5,940 | $132,060 (96%) |
|
|
367
420
|
|
|
368
|
-
|
|
369
|
-
```javascript
|
|
370
|
-
const brain = new Brainy({
|
|
371
|
-
storage: {
|
|
372
|
-
type: 'azure',
|
|
373
|
-
azureStorage: {
|
|
374
|
-
containerName: 'knowledge-base',
|
|
375
|
-
connectionString: process.env.AZURE_STORAGE_CONNECTION_STRING
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
})
|
|
379
|
-
|
|
380
|
-
// Batch tier changes for 99% cost savings
|
|
381
|
-
await brain.storage.setBlobTierBatch(
|
|
382
|
-
oldBlobs.map(name => ({ blobName: name, tier: 'Archive' }))
|
|
383
|
-
)
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
### 💰 **Cost Optimization Impact**
|
|
387
|
-
|
|
388
|
-
| Scale | Before | After (Archive) | Savings/Year |
|
|
389
|
-
|-------|--------|-----------------|--------------|
|
|
390
|
-
| 5TB | $1,380/year | $59/year | **$1,321 (96%)** |
|
|
391
|
-
| 50TB | $13,800/year | $594/year | **$13,206 (96%)** |
|
|
392
|
-
| 500TB | $138,000/year | $5,940/year | **$132,060 (96%)** |
|
|
393
|
-
|
|
394
|
-
**[📖 AWS S3 Cost Guide →](docs/operations/cost-optimization-aws-s3.md)** | **[GCS →](docs/operations/cost-optimization-gcs.md)** | **[Azure →](docs/operations/cost-optimization-azure.md)** | **[R2 →](docs/operations/cost-optimization-cloudflare-r2.md)**
|
|
421
|
+
**[📖 Cloud Storage Guide →](docs/deployment/CLOUD_DEPLOYMENT_GUIDE.md)** | **[AWS Cost Optimization →](docs/operations/cost-optimization-aws-s3.md)** | **[GCS →](docs/operations/cost-optimization-gcs.md)** | **[Azure →](docs/operations/cost-optimization-azure.md)**
|
|
395
422
|
|
|
396
423
|
---
|
|
397
424
|
|
|
398
|
-
##
|
|
425
|
+
## Production Features
|
|
399
426
|
|
|
400
|
-
### 🎯
|
|
427
|
+
### 🎯 Type-Aware HNSW Indexing — 87% Memory Reduction
|
|
401
428
|
|
|
402
|
-
|
|
429
|
+
Scale to billions affordably:
|
|
403
430
|
|
|
404
|
-
- **
|
|
405
|
-
- **Single-type queries
|
|
406
|
-
- **Multi-type queries
|
|
407
|
-
- **Optimized rebuilds**: 31x faster with type filtering
|
|
431
|
+
- **1B entities:** 384GB → 50GB memory (-87%)
|
|
432
|
+
- **Single-type queries:** 10x faster
|
|
433
|
+
- **Multi-type queries:** 5-8x faster
|
|
408
434
|
|
|
409
435
|
```javascript
|
|
410
|
-
const brain = new Brainy({
|
|
411
|
-
hnsw: {
|
|
412
|
-
typeAware: true // Enable type-aware indexing
|
|
413
|
-
}
|
|
414
|
-
})
|
|
436
|
+
const brain = new Brainy({ hnsw: { typeAware: true } })
|
|
415
437
|
```
|
|
416
438
|
|
|
417
|
-
|
|
439
|
+
**[📖 How Type-Aware Indexing Works →](docs/architecture/data-storage-architecture.md)**
|
|
418
440
|
|
|
419
|
-
|
|
441
|
+
### ⚡ Enterprise-Ready Operations (v4.0.0)
|
|
420
442
|
|
|
421
|
-
-
|
|
422
|
-
-
|
|
423
|
-
-
|
|
424
|
-
-
|
|
425
|
-
-
|
|
443
|
+
- **Batch operations** with retry logic (1000x faster deletes)
|
|
444
|
+
- **Gzip compression** (60-80% space savings)
|
|
445
|
+
- **OPFS quota monitoring** (browser storage)
|
|
446
|
+
- **Metadata/Vector separation** (billion-entity scalability)
|
|
447
|
+
- **Circuit breakers & backpressure** (enterprise reliability)
|
|
426
448
|
|
|
427
449
|
```javascript
|
|
428
|
-
// Batch
|
|
429
|
-
await brain.storage.batchDelete(keys, {
|
|
430
|
-
maxRetries: 3,
|
|
431
|
-
continueOnError: true
|
|
432
|
-
})
|
|
450
|
+
// Batch operations
|
|
451
|
+
await brain.storage.batchDelete(keys, { maxRetries: 3 })
|
|
433
452
|
|
|
434
|
-
//
|
|
453
|
+
// Monitor storage
|
|
435
454
|
const status = await brain.storage.getStorageStatus()
|
|
436
|
-
console.log(`Used: ${status.used}, Quota: ${status.quota}`)
|
|
437
455
|
```
|
|
438
456
|
|
|
439
|
-
### 📊
|
|
457
|
+
### 📊 Adaptive Memory Management
|
|
440
458
|
|
|
441
|
-
|
|
459
|
+
Auto-scales 2GB → 128GB+ based on environment:
|
|
442
460
|
|
|
443
|
-
- Container-aware (Docker/K8s cgroups
|
|
444
|
-
- Environment-
|
|
445
|
-
-
|
|
446
|
-
- Built-in cache monitoring with recommendations
|
|
461
|
+
- Container-aware (Docker/K8s cgroups)
|
|
462
|
+
- Environment-optimized (dev/staging/production)
|
|
463
|
+
- Built-in cache monitoring with tuning recommendations
|
|
447
464
|
|
|
448
465
|
```javascript
|
|
449
|
-
|
|
450
|
-
const stats = brain.getCacheStats()
|
|
451
|
-
console.log(`Hit rate: ${stats.hitRate * 100}%`)
|
|
452
|
-
// Actionable tuning recommendations included
|
|
466
|
+
const stats = brain.getCacheStats() // Performance insights
|
|
453
467
|
```
|
|
454
468
|
|
|
455
469
|
**[📖 Capacity Planning Guide →](docs/operations/capacity-planning.md)**
|
|
456
470
|
|
|
457
471
|
---
|
|
458
472
|
|
|
459
|
-
##
|
|
473
|
+
## Benchmarks
|
|
460
474
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
**No premium tiers. No feature gates. Everyone gets the same powerful system.**
|
|
475
|
+
| Operation | Performance | Memory |
|
|
476
|
+
|-----------|-------------|--------|
|
|
477
|
+
| Initialize | 450ms | 24MB |
|
|
478
|
+
| Add entity | 12ms | +0.1MB |
|
|
479
|
+
| Vector search (1K) | 3ms | - |
|
|
480
|
+
| Metadata filter (10K) | 0.8ms | - |
|
|
481
|
+
| Bulk import (1K) | 2.3s | +8MB |
|
|
482
|
+
| **10M entities** | **5.8ms** | **12GB** |
|
|
483
|
+
| **1B entities** | **18ms** | **50GB** |
|
|
471
484
|
|
|
472
485
|
---
|
|
473
486
|
|
|
474
|
-
##
|
|
475
|
-
|
|
476
|
-
| Operation | Performance | Memory |
|
|
477
|
-
|----------------------------------|-------------|----------|
|
|
478
|
-
| Initialize | 450ms | 24MB |
|
|
479
|
-
| Add Item | 12ms | +0.1MB |
|
|
480
|
-
| Vector Search (1k items) | 3ms | - |
|
|
481
|
-
| Metadata Filter (10k items) | 0.8ms | - |
|
|
482
|
-
| Natural Language Query | 15ms | - |
|
|
483
|
-
| Bulk Import (1000 items) | 2.3s | +8MB |
|
|
484
|
-
| **Production Scale (10M items)** | **5.8ms** | **12GB** |
|
|
485
|
-
| **Billion Scale (1B items)** | **18ms** | **50GB** |
|
|
487
|
+
## 🧠 Deep Dive: How Brainy Actually Works
|
|
486
488
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
## 🎯 Use Cases
|
|
489
|
+
**Want to understand the magic under the hood?**
|
|
490
490
|
|
|
491
|
-
###
|
|
492
|
-
|
|
493
|
-
// Create knowledge graph with relationships
|
|
494
|
-
const apiGuide = await brain.add("REST API Guide", {
|
|
495
|
-
nounType: NounType.Document,
|
|
496
|
-
category: "documentation"
|
|
497
|
-
})
|
|
491
|
+
### 🔍 Triple Intelligence & find() API
|
|
492
|
+
Understand how vector search, graph relationships, and document filtering work together in one unified query:
|
|
498
493
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
})
|
|
494
|
+
**[📖 Triple Intelligence Architecture →](docs/architecture/triple-intelligence.md)**
|
|
495
|
+
**[📖 Natural Language Guide →](docs/guides/natural-language.md)**
|
|
496
|
+
**[📖 API Reference: find() →](docs/api/README.md)**
|
|
503
497
|
|
|
504
|
-
|
|
498
|
+
### 🗂️ Type-Aware Indexing & HNSW
|
|
499
|
+
Learn how we achieve 87% memory reduction and 10x query speedups at billion-scale:
|
|
505
500
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
"documentation authored by tech leads for active projects"
|
|
509
|
-
)
|
|
510
|
-
```
|
|
501
|
+
**[📖 Data Storage Architecture →](docs/architecture/data-storage-architecture.md)**
|
|
502
|
+
**[📖 Architecture Overview →](docs/architecture/overview.md)**
|
|
511
503
|
|
|
512
|
-
###
|
|
513
|
-
|
|
514
|
-
// Store conversation context with relationships
|
|
515
|
-
const userId = await brain.add("User 123", {
|
|
516
|
-
nounType: NounType.User,
|
|
517
|
-
tier: "premium"
|
|
518
|
-
})
|
|
504
|
+
### 📈 Scaling: Individual → Planet
|
|
505
|
+
Understand how the same code scales from prototype to billions of entities:
|
|
519
506
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
timestamp: Date.now()
|
|
523
|
-
})
|
|
507
|
+
**[📖 Capacity Planning →](docs/operations/capacity-planning.md)**
|
|
508
|
+
**[📖 Cloud Deployment Guide →](docs/deployment/CLOUD_DEPLOYMENT_GUIDE.md)**
|
|
524
509
|
|
|
525
|
-
|
|
510
|
+
### 🎯 The Universal Type System
|
|
511
|
+
Explore the mathematical foundation: 31 nouns × 40 verbs = any domain:
|
|
526
512
|
|
|
527
|
-
|
|
528
|
-
const context = await brain.find({
|
|
529
|
-
where: {type: "message"},
|
|
530
|
-
connected: {from: userId, type: "sent"},
|
|
531
|
-
like: "previous product issues"
|
|
532
|
-
})
|
|
533
|
-
```
|
|
534
|
-
|
|
535
|
-
### Semantic Search
|
|
536
|
-
```javascript
|
|
537
|
-
// Find similar content
|
|
538
|
-
const similar = await brain.search(existingContent, {
|
|
539
|
-
limit: 5,
|
|
540
|
-
threshold: 0.8
|
|
541
|
-
})
|
|
542
|
-
```
|
|
513
|
+
**[📖 Noun-Verb Taxonomy →](docs/architecture/noun-verb-taxonomy.md)**
|
|
543
514
|
|
|
544
515
|
---
|
|
545
516
|
|
|
546
|
-
##
|
|
517
|
+
## CLI Tools
|
|
547
518
|
|
|
548
519
|
```bash
|
|
549
520
|
npm install -g brainy
|
|
550
521
|
|
|
551
|
-
# Add data
|
|
552
522
|
brainy add "JavaScript is awesome" --metadata '{"type":"opinion"}'
|
|
553
|
-
|
|
554
|
-
# Search
|
|
555
|
-
brainy search "programming"
|
|
556
|
-
|
|
557
|
-
# Natural language find
|
|
558
523
|
brainy find "awesome programming languages"
|
|
559
|
-
|
|
560
|
-
# Interactive mode
|
|
561
|
-
brainy chat
|
|
524
|
+
brainy search "programming"
|
|
562
525
|
```
|
|
563
526
|
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
## 📖 Documentation
|
|
527
|
+
47 commands available, including storage management, imports, and neural operations.
|
|
567
528
|
|
|
568
|
-
|
|
569
|
-
- [Getting Started Guide](docs/guides/getting-started.md)
|
|
570
|
-
- [v4.0.0 Migration Guide](docs/MIGRATION-V3-TO-V4.md) **← NEW**
|
|
571
|
-
- [AWS S3 Cost Guide](docs/operations/cost-optimization-aws-s3.md) | [GCS](docs/operations/cost-optimization-gcs.md) | [Azure](docs/operations/cost-optimization-azure.md) | [R2](docs/operations/cost-optimization-cloudflare-r2.md) **← NEW**
|
|
529
|
+
---
|
|
572
530
|
|
|
573
|
-
|
|
574
|
-
- [Framework Integration Guide](docs/guides/framework-integration.md)
|
|
575
|
-
- [Next.js Integration](docs/guides/nextjs-integration.md)
|
|
576
|
-
- [Vue.js Integration](docs/guides/vue-integration.md)
|
|
531
|
+
## Documentation
|
|
577
532
|
|
|
578
|
-
###
|
|
579
|
-
- [
|
|
580
|
-
- [
|
|
581
|
-
- [Neural Extraction API](docs/vfs/NEURAL_EXTRACTION.md)
|
|
533
|
+
### 🚀 Getting Started
|
|
534
|
+
- **[Getting Started Guide](docs/guides/getting-started.md)** — Your first steps with Brainy
|
|
535
|
+
- **[v4.0.0 Migration Guide](docs/MIGRATION-V3-TO-V4.md)** — Upgrade from v3 (backward compatible)
|
|
582
536
|
|
|
583
|
-
### Core
|
|
584
|
-
- [
|
|
585
|
-
- [
|
|
586
|
-
- [
|
|
587
|
-
- [
|
|
588
|
-
- [Triple Intelligence](docs/architecture/triple-intelligence.md)
|
|
589
|
-
- [Noun-Verb Taxonomy](docs/architecture/noun-verb-taxonomy.md)
|
|
537
|
+
### 🧠 Core Concepts
|
|
538
|
+
- **[Triple Intelligence Architecture](docs/architecture/triple-intelligence.md)** — How vector + graph + document work together
|
|
539
|
+
- **[Natural Language Queries](docs/guides/natural-language.md)** — Using find() effectively
|
|
540
|
+
- **[API Reference](docs/api/README.md)** — Complete API documentation
|
|
541
|
+
- **[Noun-Verb Taxonomy](docs/architecture/noun-verb-taxonomy.md)** — The universal type system
|
|
590
542
|
|
|
591
|
-
###
|
|
592
|
-
- [
|
|
593
|
-
- [
|
|
594
|
-
- [
|
|
543
|
+
### 🏗️ Architecture & Scaling
|
|
544
|
+
- **[Architecture Overview](docs/architecture/overview.md)** — System design and components
|
|
545
|
+
- **[Data Storage Architecture](docs/architecture/data-storage-architecture.md)** — Type-aware indexing and HNSW
|
|
546
|
+
- **[Capacity Planning](docs/operations/capacity-planning.md)** — Memory, storage, and scaling guidelines
|
|
595
547
|
|
|
596
|
-
|
|
548
|
+
### ☁️ Production & Operations
|
|
549
|
+
- **[Cloud Deployment Guide](docs/deployment/CLOUD_DEPLOYMENT_GUIDE.md)** — Deploy to AWS, GCS, Azure
|
|
550
|
+
- **[AWS Cost Optimization](docs/operations/cost-optimization-aws-s3.md)** | **[GCS](docs/operations/cost-optimization-gcs.md)** | **[Azure](docs/operations/cost-optimization-azure.md)** | **[Cloudflare R2](docs/operations/cost-optimization-cloudflare-r2.md)**
|
|
597
551
|
|
|
598
|
-
|
|
552
|
+
### 🌐 Framework Integration
|
|
553
|
+
- **[Framework Integration Guide](docs/guides/framework-integration.md)** — React, Vue, Angular, Svelte
|
|
554
|
+
- **[Next.js Integration](docs/guides/nextjs-integration.md)**
|
|
555
|
+
- **[Vue.js Integration](docs/guides/vue-integration.md)**
|
|
599
556
|
|
|
600
|
-
|
|
557
|
+
### 🌳 Virtual Filesystem
|
|
558
|
+
- **[VFS Quick Start](docs/vfs/QUICK_START.md)** — Build file explorers that never crash
|
|
559
|
+
- **[VFS Core Documentation](docs/vfs/VFS_CORE.md)**
|
|
560
|
+
- **[Semantic VFS Guide](docs/vfs/SEMANTIC_VFS.md)**
|
|
561
|
+
- **[Neural Extraction API](docs/vfs/NEURAL_EXTRACTION.md)**
|
|
601
562
|
|
|
602
|
-
|
|
603
|
-
-
|
|
604
|
-
- 🐛 **Report issues** and contribute code
|
|
605
|
-
- 📣 **Share** with your team and community
|
|
606
|
-
|
|
607
|
-
Your support keeps Brainy free for everyone and enables continued development of enterprise features at no cost.
|
|
563
|
+
### 📦 Data Import
|
|
564
|
+
- **[Import Anything Guide](docs/guides/import-anything.md)** — CSV, Excel, PDF, URLs
|
|
608
565
|
|
|
609
566
|
---
|
|
610
567
|
|
|
611
|
-
##
|
|
568
|
+
## What's New in v4.0.0
|
|
612
569
|
|
|
613
|
-
**
|
|
570
|
+
**Enterprise-scale cost optimization and performance improvements:**
|
|
614
571
|
|
|
615
|
-
-
|
|
616
|
-
-
|
|
617
|
-
-
|
|
572
|
+
- 🎯 **96% cloud storage cost savings** with intelligent tiering (AWS, GCS, Azure)
|
|
573
|
+
- ⚡ **1000x faster batch deletions** (533 entities/sec vs 0.5/sec)
|
|
574
|
+
- 📦 **60-80% compression** with gzip (FileSystem storage)
|
|
575
|
+
- 🔄 **Enhanced metadata/vector separation** for billion-scale deployments
|
|
618
576
|
|
|
619
|
-
|
|
577
|
+
**[📖 Full v4.0.0 Changelog →](CHANGELOG.md)** | **[Migration Guide →](docs/MIGRATION-V3-TO-V4.md)** (100% backward compatible)
|
|
620
578
|
|
|
621
579
|
---
|
|
622
580
|
|
|
623
|
-
##
|
|
624
|
-
|
|
625
|
-
### How We Achieved The Impossible
|
|
626
|
-
|
|
627
|
-
**Triple Intelligence™** unifies three database paradigms that were previously incompatible:
|
|
581
|
+
## Requirements
|
|
628
582
|
|
|
629
|
-
|
|
630
|
-
2. **Graph databases** (Neo4j, ArangoDB) - relationships
|
|
631
|
-
3. **Document databases** (MongoDB, Elasticsearch) - metadata filtering
|
|
583
|
+
**Node.js 22 LTS** (recommended) or **Node.js 20 LTS**
|
|
632
584
|
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
### The Math of Infinite Expressiveness
|
|
636
|
-
|
|
637
|
-
```
|
|
638
|
-
31 Nouns × 40 Verbs × ∞ Metadata × Triple Intelligence = Universal Protocol
|
|
585
|
+
```bash
|
|
586
|
+
nvm use # We provide .nvmrc
|
|
639
587
|
```
|
|
640
588
|
|
|
641
|
-
|
|
642
|
-
- **∞ domain specificity** via unlimited metadata
|
|
643
|
-
- **∞ relationship depth** via graph traversal
|
|
644
|
-
- **= Model ANYTHING**: From quantum physics to social networks
|
|
645
|
-
|
|
646
|
-
### Why This Changes Everything
|
|
589
|
+
---
|
|
647
590
|
|
|
648
|
-
|
|
591
|
+
## Why Brainy Exists
|
|
649
592
|
|
|
650
|
-
|
|
651
|
-
- All AI models share knowledge - GPT, Claude, Llama all understand
|
|
652
|
-
- All tools integrate seamlessly - no translation layers
|
|
653
|
-
- All data flows freely - perfect portability
|
|
593
|
+
**The Vision:** Traditional systems force you to choose between vector databases, graph databases, and document stores. You need all three, but combining them is complex and fragile.
|
|
654
594
|
|
|
655
|
-
**
|
|
595
|
+
**Brainy solved the impossible:** One API. All three paradigms. Any scale.
|
|
656
596
|
|
|
657
|
-
|
|
597
|
+
Like HTTP standardized web communication, **Brainy standardizes knowledge representation.** One protocol that any AI model understands. One system that scales from prototype to planet.
|
|
658
598
|
|
|
659
|
-
[
|
|
599
|
+
**[📖 Read the Mathematical Proof →](docs/architecture/noun-verb-taxonomy.md)**
|
|
660
600
|
|
|
661
601
|
---
|
|
662
602
|
|
|
663
|
-
##
|
|
603
|
+
## Enterprise & Support
|
|
664
604
|
|
|
665
|
-
|
|
605
|
+
**🏢 Brain Cloud** — Managed Brainy with team sync, persistent memory, and enterprise connectors.
|
|
606
|
+
Visit **[soulcraft.com](https://soulcraft.com)** for more information.
|
|
666
607
|
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
608
|
+
**💖 Support Development:**
|
|
609
|
+
- ⭐ Star us on **[GitHub](https://github.com/soulcraftlabs/brainy)**
|
|
610
|
+
- 💝 Sponsor via **[GitHub Sponsors](https://github.com/sponsors/soulcraftlabs)**
|
|
611
|
+
- 🐛 Report issues and contribute code
|
|
612
|
+
- 📣 Share with your team and community
|
|
670
613
|
|
|
671
|
-
|
|
614
|
+
**Brainy is 100% free and open source.** No paywalls, no premium tiers, no feature gates.
|
|
672
615
|
|
|
673
616
|
---
|
|
674
617
|
|
|
675
|
-
##
|
|
618
|
+
## Contributing
|
|
676
619
|
|
|
677
|
-
We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
620
|
+
We welcome contributions! See **[CONTRIBUTING.md](CONTRIBUTING.md)** for guidelines.
|
|
678
621
|
|
|
679
622
|
---
|
|
680
623
|
|
|
681
|
-
##
|
|
624
|
+
## License
|
|
682
625
|
|
|
683
626
|
MIT © Brainy Contributors
|
|
684
627
|
|
|
@@ -686,6 +629,6 @@ MIT © Brainy Contributors
|
|
|
686
629
|
|
|
687
630
|
<p align="center">
|
|
688
631
|
<strong>Built with ❤️ by the Brainy community</strong><br>
|
|
689
|
-
<em>
|
|
690
|
-
<em>
|
|
632
|
+
<em>The Knowledge Operating System</em><br>
|
|
633
|
+
<em>From prototype to planet-scale • Zero configuration • Triple Intelligence™</em>
|
|
691
634
|
</p>
|