@soulcraft/brainy 4.0.1 → 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 +380 -475
- 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,714 +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
|
|
55
91
|
|
|
56
|
-
|
|
57
|
-
- **Graph Relationships** 🕸️ Navigate connections like Neo4j/ArangoDB
|
|
58
|
-
- **Document Filtering** 📊 MongoDB-style queries with O(log n) performance
|
|
92
|
+
### 👥 **Small Team** → Production MVP (Thousands of Entities)
|
|
59
93
|
|
|
60
|
-
|
|
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
|
+
```
|
|
104
|
+
|
|
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**
|
|
74
159
|
|
|
75
|
-
|
|
160
|
+
**Start simple. Scale infinitely. Never rewrite.**
|
|
76
161
|
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
- **99% storage cost savings** with intelligent archival
|
|
81
|
-
- **Container-aware** memory allocation (Docker/K8s)
|
|
162
|
+
Most systems force you to choose:
|
|
163
|
+
- Simple but doesn't scale (SQLite, Redis)
|
|
164
|
+
- Scales but complex (Kubernetes + 7 databases)
|
|
82
165
|
|
|
83
|
-
|
|
166
|
+
**Brainy gives you both:** Starts simple as SQLite. Scales like Google.
|
|
84
167
|
|
|
85
|
-
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Why Brainy Is Revolutionary
|
|
86
171
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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.
|
|
183
|
+
|
|
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.**
|
|
185
|
+
|
|
186
|
+
### 🎯 **31 Noun Types × 40 Verb Types = Universal Protocol**
|
|
187
|
+
|
|
188
|
+
Model **any domain** with mathematical completeness:
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
31 Nouns × 40 Verbs × ∞ Metadata = 1,240+ base combinations
|
|
192
|
+
```
|
|
193
|
+
|
|
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
|
|
|
95
|
-
|
|
203
|
+
### ⚡ **Zero Configuration Philosophy**
|
|
96
204
|
|
|
97
|
-
|
|
205
|
+
**We hate configuration files. So we eliminated them.**
|
|
98
206
|
|
|
99
|
-
|
|
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
|
+
---
|
|
100
222
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
- **Research assistants** that remember every paper you've read and find connections
|
|
223
|
+
## What Can You Build?
|
|
224
|
+
|
|
225
|
+
**If your app needs to remember, understand, or connect information — Brainy makes it trivial.**
|
|
105
226
|
|
|
106
227
|
### 🤖 **AI Agents with Perfect Memory**
|
|
107
|
-
|
|
108
|
-
- **Code assistants** that understand your entire codebase as a knowledge graph
|
|
109
|
-
- **Personal assistants** with unlimited memory that never forgets important details
|
|
228
|
+
Give your AI unlimited context that persists forever. Not just chat history — true understanding of relationships, evolution, and meaning over time.
|
|
110
229
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
-
|
|
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.
|
|
115
234
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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
|
|
120
241
|
|
|
121
242
|
### 🏢 **Enterprise Knowledge Management**
|
|
122
|
-
|
|
123
|
-
- **Customer intelligence** platforms that understand every interaction
|
|
124
|
-
- **Product catalogs** with semantic search and relationship-based recommendations
|
|
243
|
+
Corporate memory that never forgets. Track every customer interaction, product evolution, and business relationship.
|
|
125
244
|
|
|
126
|
-
|
|
127
|
-
- **Writing assistants** that track characters, plotlines, and themes across stories
|
|
128
|
-
- **Content management** where every asset knows its relationships and history
|
|
129
|
-
- **Media libraries** with intelligent tagging and similarity-based discovery
|
|
245
|
+
**Examples:** CRM systems, product catalogs, customer intelligence, institutional knowledge
|
|
130
246
|
|
|
131
|
-
|
|
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.
|
|
132
258
|
|
|
133
259
|
---
|
|
134
260
|
|
|
135
|
-
##
|
|
261
|
+
## Quick Start
|
|
136
262
|
|
|
137
263
|
```bash
|
|
138
264
|
npm install @soulcraft/brainy
|
|
139
265
|
```
|
|
140
266
|
|
|
141
|
-
###
|
|
267
|
+
### Your First Knowledge Graph (60 seconds)
|
|
142
268
|
|
|
143
269
|
```javascript
|
|
144
|
-
import { Brainy, NounType } from '@soulcraft/brainy'
|
|
270
|
+
import { Brainy, NounType, VerbType } from '@soulcraft/brainy'
|
|
145
271
|
|
|
146
|
-
// Just this - auto-detects everything!
|
|
147
272
|
const brain = new Brainy()
|
|
148
273
|
await brain.init()
|
|
149
274
|
|
|
150
|
-
// Add
|
|
275
|
+
// Add knowledge
|
|
151
276
|
const jsId = await brain.add({
|
|
152
277
|
data: "JavaScript is a programming language",
|
|
153
|
-
|
|
154
|
-
metadata: {
|
|
155
|
-
type: "language",
|
|
156
|
-
year: 1995,
|
|
157
|
-
paradigm: "multi-paradigm"
|
|
158
|
-
}
|
|
278
|
+
type: NounType.Concept,
|
|
279
|
+
metadata: { category: "language", year: 1995 }
|
|
159
280
|
})
|
|
160
281
|
|
|
161
282
|
const nodeId = await brain.add({
|
|
162
283
|
data: "Node.js runtime environment",
|
|
163
|
-
|
|
164
|
-
metadata: {
|
|
165
|
-
type: "runtime",
|
|
166
|
-
year: 2009,
|
|
167
|
-
platform: "server-side"
|
|
168
|
-
}
|
|
284
|
+
type: NounType.Concept,
|
|
285
|
+
metadata: { category: "runtime", year: 2009 }
|
|
169
286
|
})
|
|
170
287
|
|
|
171
|
-
// Create relationships
|
|
172
|
-
await brain.relate({
|
|
173
|
-
from: nodeId,
|
|
174
|
-
to: jsId,
|
|
175
|
-
type: "executes",
|
|
176
|
-
metadata: {
|
|
177
|
-
since: 2009,
|
|
178
|
-
performance: "high"
|
|
179
|
-
}
|
|
180
|
-
})
|
|
288
|
+
// Create relationships
|
|
289
|
+
await brain.relate({ from: nodeId, to: jsId, type: VerbType.Executes })
|
|
181
290
|
|
|
182
|
-
//
|
|
291
|
+
// Query with Triple Intelligence
|
|
183
292
|
const results = await brain.find({
|
|
184
|
-
query: "
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
// Triple Intelligence: vector + metadata + relationships
|
|
188
|
-
const filtered = await brain.find({
|
|
189
|
-
query: "JavaScript", // Vector similarity
|
|
190
|
-
where: {type: "language"}, // Metadata filtering
|
|
191
|
-
connected: {from: nodeId, depth: 1} // Graph relationships
|
|
293
|
+
query: "JavaScript", // 🔍 Vector
|
|
294
|
+
where: { category: "language" }, // 📊 Document
|
|
295
|
+
connected: { from: nodeId, depth: 1 } // 🕸️ Graph
|
|
192
296
|
})
|
|
193
297
|
```
|
|
194
298
|
|
|
195
|
-
**
|
|
299
|
+
**Done.** No configuration. No complexity. Production-ready from day one.
|
|
196
300
|
|
|
197
301
|
---
|
|
198
302
|
|
|
199
|
-
##
|
|
303
|
+
## Core Features
|
|
200
304
|
|
|
201
|
-
### 🧠 **Natural Language
|
|
305
|
+
### 🧠 **Natural Language Queries**
|
|
202
306
|
|
|
203
307
|
```javascript
|
|
204
|
-
// Ask
|
|
205
|
-
await brain.find("
|
|
206
|
-
await brain.find("
|
|
207
|
-
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")
|
|
208
311
|
|
|
209
|
-
//
|
|
312
|
+
// Or use structured Triple Intelligence queries
|
|
210
313
|
await brain.find({
|
|
211
|
-
|
|
212
|
-
where: {
|
|
213
|
-
|
|
214
|
-
year: {greaterThan: 2020}
|
|
215
|
-
},
|
|
216
|
-
connected: {to: "JavaScript", depth: 2} // Graph relationships
|
|
314
|
+
query: "React",
|
|
315
|
+
where: { type: "library", year: { greaterThan: 2020 } },
|
|
316
|
+
connected: { to: "JavaScript", depth: 2 }
|
|
217
317
|
})
|
|
218
318
|
```
|
|
219
319
|
|
|
220
|
-
### 🌐 **Virtual Filesystem
|
|
320
|
+
### 🌐 **Virtual Filesystem** — Intelligent File Management
|
|
221
321
|
|
|
222
|
-
Build file explorers
|
|
322
|
+
Build file explorers and IDEs that never crash:
|
|
223
323
|
|
|
224
324
|
```javascript
|
|
225
325
|
const vfs = brain.vfs()
|
|
226
|
-
await vfs.init()
|
|
227
|
-
|
|
228
|
-
// ✅ Safe file operations
|
|
229
|
-
await vfs.writeFile('/projects/app/index.js', 'console.log("Hello")')
|
|
230
|
-
await vfs.mkdir('/docs')
|
|
231
326
|
|
|
232
|
-
//
|
|
233
|
-
const
|
|
327
|
+
// Tree-aware operations prevent infinite recursion
|
|
328
|
+
const tree = await vfs.getTreeStructure('/projects', { maxDepth: 3 })
|
|
234
329
|
|
|
235
|
-
//
|
|
236
|
-
const tree = await vfs.getTreeStructure('/projects', {
|
|
237
|
-
maxDepth: 3, // Prevent deep recursion
|
|
238
|
-
sort: 'name'
|
|
239
|
-
})
|
|
240
|
-
|
|
241
|
-
// ✅ Semantic file search
|
|
330
|
+
// Semantic file search
|
|
242
331
|
const reactFiles = await vfs.search('React components with hooks')
|
|
243
332
|
```
|
|
244
333
|
|
|
245
|
-
**
|
|
246
|
-
|
|
247
|
-
**[📖 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)**
|
|
248
335
|
|
|
249
|
-
### 🚀 **Import Anything
|
|
336
|
+
### 🚀 **Import Anything** — CSV, Excel, PDF, URLs
|
|
250
337
|
|
|
251
338
|
```javascript
|
|
252
|
-
//
|
|
253
|
-
await brain.import('
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
// Import Excel workbooks with multi-sheet support
|
|
257
|
-
await brain.import('sales-data.xlsx', {
|
|
258
|
-
excelSheets: ['Q1', 'Q2']
|
|
259
|
-
})
|
|
260
|
-
|
|
261
|
-
// Import PDF documents with table extraction
|
|
262
|
-
await brain.import('research-paper.pdf', {
|
|
263
|
-
pdfExtractTables: true
|
|
264
|
-
})
|
|
265
|
-
|
|
266
|
-
// 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 })
|
|
267
342
|
await brain.import('https://api.example.com/data.json')
|
|
268
343
|
```
|
|
269
344
|
|
|
270
345
|
**[📖 Complete Import Guide →](docs/guides/import-anything.md)**
|
|
271
346
|
|
|
272
|
-
### 🧠 **Neural API
|
|
347
|
+
### 🧠 **Neural API** — Advanced Semantic Analysis
|
|
273
348
|
|
|
274
349
|
```javascript
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
const
|
|
279
|
-
|
|
280
|
-
maxClusters: 5,
|
|
281
|
-
threshold: 0.8
|
|
282
|
-
})
|
|
283
|
-
|
|
284
|
-
// Calculate similarity between any items
|
|
285
|
-
const similarity = await neural.similar('item1', 'item2')
|
|
286
|
-
|
|
287
|
-
// Find nearest neighbors
|
|
288
|
-
const neighbors = await neural.neighbors('item-id', 10)
|
|
289
|
-
|
|
290
|
-
// Detect outliers
|
|
291
|
-
const outliers = await neural.outliers(0.3)
|
|
292
|
-
|
|
293
|
-
// Generate visualization data for D3/Cytoscape
|
|
294
|
-
const vizData = await neural.visualize({
|
|
295
|
-
maxNodes: 100,
|
|
296
|
-
dimensions: 3,
|
|
297
|
-
algorithm: 'force'
|
|
298
|
-
})
|
|
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 })
|
|
299
355
|
```
|
|
300
356
|
|
|
301
357
|
---
|
|
302
358
|
|
|
303
|
-
##
|
|
359
|
+
## Framework Integration
|
|
304
360
|
|
|
305
|
-
**
|
|
361
|
+
**Works with any modern framework.** React, Vue, Angular, Svelte, Solid.js — your choice.
|
|
306
362
|
|
|
307
|
-
### ⚛️ React & Next.js
|
|
308
363
|
```javascript
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
364
|
+
// React
|
|
365
|
+
const [brain] = useState(() => new Brainy())
|
|
366
|
+
useEffect(() => { brain.init() }, [])
|
|
312
367
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
setResults(results)
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
```
|
|
368
|
+
// Vue
|
|
369
|
+
async mounted() { this.brain = await new Brainy().init() }
|
|
319
370
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
export default {
|
|
323
|
-
async mounted() {
|
|
324
|
-
this.brain = new Brainy()
|
|
325
|
-
await this.brain.init()
|
|
326
|
-
},
|
|
327
|
-
methods: {
|
|
328
|
-
async search(query) {
|
|
329
|
-
return await this.brain.find(query)
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
}
|
|
371
|
+
// Angular
|
|
372
|
+
@Injectable() export class BrainyService { brain = new Brainy() }
|
|
333
373
|
```
|
|
334
374
|
|
|
335
|
-
|
|
336
|
-
```typescript
|
|
337
|
-
@Injectable({ providedIn: 'root' })
|
|
338
|
-
export class BrainyService {
|
|
339
|
-
private brain = new Brainy()
|
|
340
|
-
async search(query: string) {
|
|
341
|
-
return await this.brain.find(query)
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
```
|
|
375
|
+
**Supports:** All bundlers (Webpack, Vite, Rollup) • SSR/SSG • Edge runtimes • Browser/Node.js
|
|
345
376
|
|
|
346
|
-
**
|
|
377
|
+
**[📖 Framework Integration Guide →](docs/guides/framework-integration.md)** | **[Next.js →](docs/guides/nextjs-integration.md)** | **[Vue →](docs/guides/vue-integration.md)**
|
|
347
378
|
|
|
348
379
|
---
|
|
349
380
|
|
|
350
|
-
##
|
|
381
|
+
## Storage — From Memory to Planet-Scale
|
|
351
382
|
|
|
352
|
-
###
|
|
383
|
+
### Development → Just Works
|
|
353
384
|
```javascript
|
|
354
|
-
const brain = new Brainy() // Memory storage,
|
|
385
|
+
const brain = new Brainy() // Memory storage, zero config
|
|
355
386
|
```
|
|
356
387
|
|
|
357
|
-
###
|
|
388
|
+
### Production → Persistence with Compression
|
|
358
389
|
```javascript
|
|
359
390
|
const brain = new Brainy({
|
|
360
|
-
storage: {
|
|
361
|
-
type: 'filesystem',
|
|
362
|
-
path: './brainy-data',
|
|
363
|
-
compression: true // 60-80% space savings!
|
|
364
|
-
}
|
|
391
|
+
storage: { type: 'filesystem', path: './data', compression: true }
|
|
365
392
|
})
|
|
393
|
+
// 60-80% space savings with gzip
|
|
366
394
|
```
|
|
367
395
|
|
|
368
|
-
###
|
|
369
|
-
|
|
370
|
-
Choose your cloud provider - all support **automatic cost optimization:**
|
|
371
|
-
|
|
372
|
-
#### **AWS S3 / Cloudflare R2 / DigitalOcean Spaces**
|
|
396
|
+
### Cloud → AWS, GCS, Azure, Cloudflare R2
|
|
373
397
|
```javascript
|
|
398
|
+
// AWS S3 / Cloudflare R2
|
|
374
399
|
const brain = new Brainy({
|
|
375
400
|
storage: {
|
|
376
401
|
type: 's3',
|
|
377
402
|
s3Storage: {
|
|
378
403
|
bucketName: 'my-knowledge-base',
|
|
379
|
-
region: 'us-east-1'
|
|
380
|
-
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
|
|
381
|
-
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
})
|
|
385
|
-
|
|
386
|
-
// Enable Intelligent-Tiering for automatic 96% cost savings
|
|
387
|
-
await brain.storage.enableIntelligentTiering('entities/', 'brainy-auto-tier')
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
#### **Google Cloud Storage**
|
|
391
|
-
```javascript
|
|
392
|
-
const brain = new Brainy({
|
|
393
|
-
storage: {
|
|
394
|
-
type: 'gcs',
|
|
395
|
-
gcsStorage: {
|
|
396
|
-
bucketName: 'my-knowledge-base',
|
|
397
|
-
keyFilename: '/path/to/service-account.json'
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
})
|
|
401
|
-
|
|
402
|
-
// Enable Autoclass for automatic 94% cost savings
|
|
403
|
-
await brain.storage.enableAutoclass({ terminalStorageClass: 'ARCHIVE' })
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
#### **Azure Blob Storage**
|
|
407
|
-
```javascript
|
|
408
|
-
const brain = new Brainy({
|
|
409
|
-
storage: {
|
|
410
|
-
type: 'azure',
|
|
411
|
-
azureStorage: {
|
|
412
|
-
containerName: 'knowledge-base',
|
|
413
|
-
connectionString: process.env.AZURE_STORAGE_CONNECTION_STRING
|
|
404
|
+
region: 'us-east-1'
|
|
414
405
|
}
|
|
415
406
|
}
|
|
416
407
|
})
|
|
417
408
|
|
|
418
|
-
//
|
|
419
|
-
await brain.storage.
|
|
420
|
-
oldBlobs.map(name => ({ blobName: name, tier: 'Archive' }))
|
|
421
|
-
)
|
|
409
|
+
// Enable Intelligent-Tiering: 96% cost savings
|
|
410
|
+
await brain.storage.enableIntelligentTiering('entities/', 'auto-tier')
|
|
422
411
|
```
|
|
423
412
|
|
|
424
|
-
|
|
413
|
+
**Cost optimization at scale:**
|
|
425
414
|
|
|
426
|
-
| Scale |
|
|
427
|
-
|
|
428
|
-
| 5TB | $1,380
|
|
429
|
-
| 50TB | $13,800
|
|
430
|
-
| 500TB | $138,000
|
|
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%) |
|
|
431
420
|
|
|
432
|
-
**[📖
|
|
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)**
|
|
433
422
|
|
|
434
423
|
---
|
|
435
424
|
|
|
436
|
-
##
|
|
425
|
+
## Production Features
|
|
437
426
|
|
|
438
|
-
### 🎯
|
|
427
|
+
### 🎯 Type-Aware HNSW Indexing — 87% Memory Reduction
|
|
439
428
|
|
|
440
|
-
|
|
429
|
+
Scale to billions affordably:
|
|
441
430
|
|
|
442
|
-
- **
|
|
443
|
-
- **Single-type queries
|
|
444
|
-
- **Multi-type queries
|
|
445
|
-
- **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
|
|
446
434
|
|
|
447
435
|
```javascript
|
|
448
|
-
const brain = new Brainy({
|
|
449
|
-
hnsw: {
|
|
450
|
-
typeAware: true // Enable type-aware indexing
|
|
451
|
-
}
|
|
452
|
-
})
|
|
436
|
+
const brain = new Brainy({ hnsw: { typeAware: true } })
|
|
453
437
|
```
|
|
454
438
|
|
|
455
|
-
|
|
439
|
+
**[📖 How Type-Aware Indexing Works →](docs/architecture/data-storage-architecture.md)**
|
|
456
440
|
|
|
457
|
-
|
|
441
|
+
### ⚡ Enterprise-Ready Operations (v4.0.0)
|
|
458
442
|
|
|
459
|
-
-
|
|
460
|
-
-
|
|
461
|
-
-
|
|
462
|
-
-
|
|
463
|
-
-
|
|
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)
|
|
464
448
|
|
|
465
449
|
```javascript
|
|
466
|
-
// Batch
|
|
467
|
-
await brain.storage.batchDelete(keys, {
|
|
468
|
-
maxRetries: 3,
|
|
469
|
-
continueOnError: true
|
|
470
|
-
})
|
|
450
|
+
// Batch operations
|
|
451
|
+
await brain.storage.batchDelete(keys, { maxRetries: 3 })
|
|
471
452
|
|
|
472
|
-
//
|
|
453
|
+
// Monitor storage
|
|
473
454
|
const status = await brain.storage.getStorageStatus()
|
|
474
|
-
console.log(`Used: ${status.used}, Quota: ${status.quota}`)
|
|
475
455
|
```
|
|
476
456
|
|
|
477
|
-
### 📊
|
|
457
|
+
### 📊 Adaptive Memory Management
|
|
478
458
|
|
|
479
|
-
|
|
459
|
+
Auto-scales 2GB → 128GB+ based on environment:
|
|
480
460
|
|
|
481
|
-
- Container-aware (Docker/K8s cgroups
|
|
482
|
-
- Environment-
|
|
483
|
-
-
|
|
484
|
-
- 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
|
|
485
464
|
|
|
486
465
|
```javascript
|
|
487
|
-
|
|
488
|
-
const stats = brain.getCacheStats()
|
|
489
|
-
console.log(`Hit rate: ${stats.hitRate * 100}%`)
|
|
490
|
-
// Actionable tuning recommendations included
|
|
466
|
+
const stats = brain.getCacheStats() // Performance insights
|
|
491
467
|
```
|
|
492
468
|
|
|
493
469
|
**[📖 Capacity Planning Guide →](docs/operations/capacity-planning.md)**
|
|
494
470
|
|
|
495
471
|
---
|
|
496
472
|
|
|
497
|
-
##
|
|
498
|
-
|
|
499
|
-
Brainy includes **enterprise-grade capabilities at no extra cost**:
|
|
473
|
+
## Benchmarks
|
|
500
474
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
**
|
|
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** |
|
|
509
484
|
|
|
510
485
|
---
|
|
511
486
|
|
|
512
|
-
##
|
|
487
|
+
## 🧠 Deep Dive: How Brainy Actually Works
|
|
513
488
|
|
|
514
|
-
|
|
515
|
-
|----------------------------------|-------------|----------|
|
|
516
|
-
| Initialize | 450ms | 24MB |
|
|
517
|
-
| Add Item | 12ms | +0.1MB |
|
|
518
|
-
| Vector Search (1k items) | 3ms | - |
|
|
519
|
-
| Metadata Filter (10k items) | 0.8ms | - |
|
|
520
|
-
| Natural Language Query | 15ms | - |
|
|
521
|
-
| Bulk Import (1000 items) | 2.3s | +8MB |
|
|
522
|
-
| **Production Scale (10M items)** | **5.8ms** | **12GB** |
|
|
523
|
-
| **Billion Scale (1B items)** | **18ms** | **50GB** |
|
|
489
|
+
**Want to understand the magic under the hood?**
|
|
524
490
|
|
|
525
|
-
|
|
491
|
+
### 🔍 Triple Intelligence & find() API
|
|
492
|
+
Understand how vector search, graph relationships, and document filtering work together in one unified query:
|
|
526
493
|
|
|
527
|
-
|
|
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)**
|
|
528
497
|
|
|
529
|
-
###
|
|
530
|
-
|
|
531
|
-
// Create knowledge graph with relationships
|
|
532
|
-
const apiGuide = await brain.add("REST API Guide", {
|
|
533
|
-
nounType: NounType.Document,
|
|
534
|
-
category: "documentation"
|
|
535
|
-
})
|
|
536
|
-
|
|
537
|
-
const author = await brain.add("Jane Developer", {
|
|
538
|
-
nounType: NounType.Person,
|
|
539
|
-
role: "tech-lead"
|
|
540
|
-
})
|
|
498
|
+
### 🗂️ Type-Aware Indexing & HNSW
|
|
499
|
+
Learn how we achieve 87% memory reduction and 10x query speedups at billion-scale:
|
|
541
500
|
|
|
542
|
-
|
|
501
|
+
**[📖 Data Storage Architecture →](docs/architecture/data-storage-architecture.md)**
|
|
502
|
+
**[📖 Architecture Overview →](docs/architecture/overview.md)**
|
|
543
503
|
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
"documentation authored by tech leads for active projects"
|
|
547
|
-
)
|
|
548
|
-
```
|
|
504
|
+
### 📈 Scaling: Individual → Planet
|
|
505
|
+
Understand how the same code scales from prototype to billions of entities:
|
|
549
506
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
// Store conversation context with relationships
|
|
553
|
-
const userId = await brain.add("User 123", {
|
|
554
|
-
nounType: NounType.User,
|
|
555
|
-
tier: "premium"
|
|
556
|
-
})
|
|
507
|
+
**[📖 Capacity Planning →](docs/operations/capacity-planning.md)**
|
|
508
|
+
**[📖 Cloud Deployment Guide →](docs/deployment/CLOUD_DEPLOYMENT_GUIDE.md)**
|
|
557
509
|
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
timestamp: Date.now()
|
|
561
|
-
})
|
|
562
|
-
|
|
563
|
-
await brain.relate(userId, messageId, "sent")
|
|
564
|
-
|
|
565
|
-
// Retrieve context
|
|
566
|
-
const context = await brain.find({
|
|
567
|
-
where: {type: "message"},
|
|
568
|
-
connected: {from: userId, type: "sent"},
|
|
569
|
-
like: "previous product issues"
|
|
570
|
-
})
|
|
571
|
-
```
|
|
510
|
+
### 🎯 The Universal Type System
|
|
511
|
+
Explore the mathematical foundation: 31 nouns × 40 verbs = any domain:
|
|
572
512
|
|
|
573
|
-
|
|
574
|
-
```javascript
|
|
575
|
-
// Find similar content
|
|
576
|
-
const similar = await brain.search(existingContent, {
|
|
577
|
-
limit: 5,
|
|
578
|
-
threshold: 0.8
|
|
579
|
-
})
|
|
580
|
-
```
|
|
513
|
+
**[📖 Noun-Verb Taxonomy →](docs/architecture/noun-verb-taxonomy.md)**
|
|
581
514
|
|
|
582
515
|
---
|
|
583
516
|
|
|
584
|
-
##
|
|
517
|
+
## CLI Tools
|
|
585
518
|
|
|
586
519
|
```bash
|
|
587
520
|
npm install -g brainy
|
|
588
521
|
|
|
589
|
-
# Add data
|
|
590
522
|
brainy add "JavaScript is awesome" --metadata '{"type":"opinion"}'
|
|
591
|
-
|
|
592
|
-
# Search
|
|
593
|
-
brainy search "programming"
|
|
594
|
-
|
|
595
|
-
# Natural language find
|
|
596
523
|
brainy find "awesome programming languages"
|
|
597
|
-
|
|
598
|
-
# Interactive mode
|
|
599
|
-
brainy chat
|
|
524
|
+
brainy search "programming"
|
|
600
525
|
```
|
|
601
526
|
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
## 📖 Documentation
|
|
527
|
+
47 commands available, including storage management, imports, and neural operations.
|
|
605
528
|
|
|
606
|
-
|
|
607
|
-
- [Getting Started Guide](docs/guides/getting-started.md)
|
|
608
|
-
- [v4.0.0 Migration Guide](docs/MIGRATION-V3-TO-V4.md) **← NEW**
|
|
609
|
-
- [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
|
+
---
|
|
610
530
|
|
|
611
|
-
|
|
612
|
-
- [Framework Integration Guide](docs/guides/framework-integration.md)
|
|
613
|
-
- [Next.js Integration](docs/guides/nextjs-integration.md)
|
|
614
|
-
- [Vue.js Integration](docs/guides/vue-integration.md)
|
|
531
|
+
## Documentation
|
|
615
532
|
|
|
616
|
-
###
|
|
617
|
-
- [
|
|
618
|
-
- [
|
|
619
|
-
- [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)
|
|
620
536
|
|
|
621
|
-
### Core
|
|
622
|
-
- [
|
|
623
|
-
- [
|
|
624
|
-
- [
|
|
625
|
-
- [
|
|
626
|
-
- [Triple Intelligence](docs/architecture/triple-intelligence.md)
|
|
627
|
-
- [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
|
|
628
542
|
|
|
629
|
-
###
|
|
630
|
-
- [
|
|
631
|
-
- [
|
|
632
|
-
- [
|
|
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
|
|
633
547
|
|
|
634
|
-
|
|
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)**
|
|
635
551
|
|
|
636
|
-
|
|
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)**
|
|
637
556
|
|
|
638
|
-
|
|
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)**
|
|
639
562
|
|
|
640
|
-
|
|
641
|
-
-
|
|
642
|
-
- 🐛 **Report issues** and contribute code
|
|
643
|
-
- 📣 **Share** with your team and community
|
|
644
|
-
|
|
645
|
-
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
|
|
646
565
|
|
|
647
566
|
---
|
|
648
567
|
|
|
649
|
-
##
|
|
568
|
+
## What's New in v4.0.0
|
|
650
569
|
|
|
651
|
-
**
|
|
570
|
+
**Enterprise-scale cost optimization and performance improvements:**
|
|
652
571
|
|
|
653
|
-
-
|
|
654
|
-
-
|
|
655
|
-
-
|
|
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
|
|
656
576
|
|
|
657
|
-
|
|
577
|
+
**[📖 Full v4.0.0 Changelog →](CHANGELOG.md)** | **[Migration Guide →](docs/MIGRATION-V3-TO-V4.md)** (100% backward compatible)
|
|
658
578
|
|
|
659
579
|
---
|
|
660
580
|
|
|
661
|
-
##
|
|
662
|
-
|
|
663
|
-
### How We Achieved The Impossible
|
|
664
|
-
|
|
665
|
-
**Triple Intelligence™** unifies three database paradigms that were previously incompatible:
|
|
581
|
+
## Requirements
|
|
666
582
|
|
|
667
|
-
|
|
668
|
-
2. **Graph databases** (Neo4j, ArangoDB) - relationships
|
|
669
|
-
3. **Document databases** (MongoDB, Elasticsearch) - metadata filtering
|
|
583
|
+
**Node.js 22 LTS** (recommended) or **Node.js 20 LTS**
|
|
670
584
|
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
### The Math of Infinite Expressiveness
|
|
674
|
-
|
|
675
|
-
```
|
|
676
|
-
31 Nouns × 40 Verbs × ∞ Metadata × Triple Intelligence = Universal Protocol
|
|
585
|
+
```bash
|
|
586
|
+
nvm use # We provide .nvmrc
|
|
677
587
|
```
|
|
678
588
|
|
|
679
|
-
|
|
680
|
-
- **∞ domain specificity** via unlimited metadata
|
|
681
|
-
- **∞ relationship depth** via graph traversal
|
|
682
|
-
- **= Model ANYTHING**: From quantum physics to social networks
|
|
683
|
-
|
|
684
|
-
### Why This Changes Everything
|
|
589
|
+
---
|
|
685
590
|
|
|
686
|
-
|
|
591
|
+
## Why Brainy Exists
|
|
687
592
|
|
|
688
|
-
|
|
689
|
-
- All AI models share knowledge - GPT, Claude, Llama all understand
|
|
690
|
-
- All tools integrate seamlessly - no translation layers
|
|
691
|
-
- 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.
|
|
692
594
|
|
|
693
|
-
**
|
|
595
|
+
**Brainy solved the impossible:** One API. All three paradigms. Any scale.
|
|
694
596
|
|
|
695
|
-
|
|
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.
|
|
696
598
|
|
|
697
|
-
[
|
|
599
|
+
**[📖 Read the Mathematical Proof →](docs/architecture/noun-verb-taxonomy.md)**
|
|
698
600
|
|
|
699
601
|
---
|
|
700
602
|
|
|
701
|
-
##
|
|
603
|
+
## Enterprise & Support
|
|
702
604
|
|
|
703
|
-
|
|
605
|
+
**🏢 Brain Cloud** — Managed Brainy with team sync, persistent memory, and enterprise connectors.
|
|
606
|
+
Visit **[soulcraft.com](https://soulcraft.com)** for more information.
|
|
704
607
|
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
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
|
|
708
613
|
|
|
709
|
-
|
|
614
|
+
**Brainy is 100% free and open source.** No paywalls, no premium tiers, no feature gates.
|
|
710
615
|
|
|
711
616
|
---
|
|
712
617
|
|
|
713
|
-
##
|
|
618
|
+
## Contributing
|
|
714
619
|
|
|
715
|
-
We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
620
|
+
We welcome contributions! See **[CONTRIBUTING.md](CONTRIBUTING.md)** for guidelines.
|
|
716
621
|
|
|
717
622
|
---
|
|
718
623
|
|
|
719
|
-
##
|
|
624
|
+
## License
|
|
720
625
|
|
|
721
626
|
MIT © Brainy Contributors
|
|
722
627
|
|
|
@@ -724,6 +629,6 @@ MIT © Brainy Contributors
|
|
|
724
629
|
|
|
725
630
|
<p align="center">
|
|
726
631
|
<strong>Built with ❤️ by the Brainy community</strong><br>
|
|
727
|
-
<em>
|
|
728
|
-
<em>
|
|
632
|
+
<em>The Knowledge Operating System</em><br>
|
|
633
|
+
<em>From prototype to planet-scale • Zero configuration • Triple Intelligence™</em>
|
|
729
634
|
</p>
|