@soulcraft/brainy 2.0.0 → 2.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.
Files changed (2) hide show
  1. package/README.md +145 -32
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,32 +1,38 @@
1
1
  # Brainy
2
2
 
3
3
  <p align="center">
4
- <img src="brainy.png" alt="Brainy Logo" width="200">
4
+ <img src="https://raw.githubusercontent.com/soulcraftlabs/brainy/main/brainy.png" alt="Brainy Logo" width="200">
5
5
  </p>
6
6
 
7
- [![npm version](https://badge.fury.io/js/brainy.svg)](https://www.npmjs.com/package/brainy)
8
- [![npm downloads](https://img.shields.io/npm/dm/brainy.svg)](https://www.npmjs.com/package/brainy)
7
+ [![npm version](https://badge.fury.io/js/%40soulcraft%2Fbrainy.svg)](https://www.npmjs.com/package/@soulcraft/brainy)
8
+ [![npm downloads](https://img.shields.io/npm/dm/@soulcraft/brainy.svg)](https://www.npmjs.com/package/@soulcraft/brainy)
9
9
  [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
10
10
  [![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](https://www.typescriptlang.org/)
11
11
 
12
- **🧠 Brainy 2.0 - Zero-Configuration AI Database with Triple Intelligence™**
12
+ **🧠 Brainy 2.0 - The Universal Knowledge Protocol™**
13
13
 
14
- The industry's first truly zero-configuration AI database that combines vector similarity, metadata filtering, and graph relationships with O(log n) performance. Production-ready with 3ms search latency, 220 pre-computed NLP patterns, and only 24MB memory footprint.
14
+ **World's first Triple Intelligence™ database**—unifying vector similarity, graph relationships, and document filtering in one magical API. Model ANY data from ANY domain using 24 standardized noun types × 40 verb types.
15
+
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
+
18
+ **Build once, integrate everywhere.** O(log n) performance, 3ms search latency, 24MB memory footprint.
15
19
 
16
20
  ## 🎉 What's New in 2.0
17
21
 
18
- - **Triple Intelligence™**: Unified Vector + Metadata + Graph queries in one API
22
+ - **World's First Triple Intelligence™**: Unified vector + graph + document in ONE query
23
+ - **Universal Knowledge Protocol**: 24 nouns × 40 verbs standardize all knowledge
24
+ - **Infinite Expressiveness**: Model ANY data with unlimited metadata
19
25
  - **API Consolidation**: 15+ methods → 2 clean APIs (`search()` and `find()`)
20
26
  - **Natural Language**: Ask questions in plain English
21
27
  - **Zero Configuration**: Works instantly, no setup required
22
28
  - **O(log n) Performance**: Binary search on sorted indices
23
- - **220+ NLP Patterns**: Pre-computed for instant understanding
29
+ - **Perfect Interoperability**: All tools and AI models speak the same language
24
30
  - **Universal Compatibility**: Node.js, Browser, Edge, Workers
25
31
 
26
32
  ## ⚡ Quick Start
27
33
 
28
34
  ```bash
29
- npm install brainy
35
+ npm install @soulcraft/brainy
30
36
  ```
31
37
 
32
38
  ```javascript
@@ -35,29 +41,53 @@ import { BrainyData } from 'brainy'
35
41
  const brain = new BrainyData()
36
42
  await brain.init()
37
43
 
38
- // Add data with automatic embedding
39
- await brain.addNoun("JavaScript is a programming language", {
44
+ // Add entities (nouns) with automatic embedding
45
+ const jsId = await brain.addNoun("JavaScript is a programming language", {
40
46
  type: "language",
41
- year: 1995
47
+ year: 1995,
48
+ paradigm: "multi-paradigm"
42
49
  })
43
50
 
44
- // Natural language search
45
- const results = await brain.find("programming languages from the 90s")
51
+ const nodeId = await brain.addNoun("Node.js runtime environment", {
52
+ type: "runtime",
53
+ year: 2009,
54
+ platform: "server-side"
55
+ })
46
56
 
47
- // Vector similarity with metadata filtering
48
- const filtered = await brain.search("JavaScript", {
49
- metadata: { type: "language" },
50
- limit: 5
57
+ // Create relationships (verbs) between entities
58
+ await brain.addVerb(nodeId, jsId, "executes", {
59
+ since: 2009,
60
+ performance: "high"
61
+ })
62
+
63
+ // Natural language search with graph relationships
64
+ const results = await brain.find("programming languages used by server runtimes")
65
+
66
+ // Triple Intelligence: vector + metadata + relationships
67
+ const filtered = await brain.find({
68
+ like: "JavaScript", // Vector similarity
69
+ where: { type: "language" }, // Metadata filtering
70
+ connected: { from: nodeId, depth: 1 } // Graph relationships
51
71
  })
52
72
  ```
53
73
 
54
74
  ## 🚀 Key Features
55
75
 
56
- ### Triple Intelligence Engine
57
- Combines three search paradigms in one unified API:
76
+ ### World's First Triple Intelligence Engine
77
+ **The breakthrough that enables the Universal Knowledge Protocol:**
58
78
  - **Vector Search**: Semantic similarity with HNSW indexing
59
- - **Metadata Filtering**: O(log n) field lookups with binary search
60
- - **Graph Relationships**: Navigate connected knowledge
79
+ - **Graph Relationships**: Navigate connected knowledge like Neo4j
80
+ - **Document Filtering**: MongoDB-style queries with O(log n) performance
81
+ - **Unified in ONE API**: No separate queries, no complex joins
82
+ - **First to solve this**: Others do vector OR graph OR document—we do ALL
83
+
84
+ ### Universal Knowledge Protocol with Infinite Expressiveness
85
+ **Enabled by Triple Intelligence, standardized for everyone:**
86
+ - **24 Noun Types × 40 Verb Types**: 960 base combinations
87
+ - **∞ Expressiveness**: Unlimited metadata = model ANY data
88
+ - **One Language**: All tools, augmentations, AI models speak the same types
89
+ - **Perfect Interoperability**: Move data between any Brainy instance
90
+ - **No Schema Lock-in**: Evolve without migrations
61
91
 
62
92
  ### Natural Language Understanding
63
93
  ```javascript
@@ -108,17 +138,26 @@ const results = await brain.find({
108
138
 
109
139
  ### CRUD Operations
110
140
  ```javascript
111
- // Create
141
+ // Create entities (nouns)
112
142
  const id = await brain.addNoun(data, metadata)
113
143
 
144
+ // Create relationships (verbs)
145
+ const verbId = await brain.addVerb(sourceId, targetId, "relationType", {
146
+ strength: 0.9,
147
+ bidirectional: false
148
+ })
149
+
114
150
  // Read
115
151
  const item = await brain.getNoun(id)
152
+ const verb = await brain.getVerb(verbId)
116
153
 
117
154
  // Update
118
155
  await brain.updateNoun(id, newData, newMetadata)
156
+ await brain.updateVerb(verbId, newMetadata)
119
157
 
120
158
  // Delete
121
159
  await brain.deleteNoun(id)
160
+ await brain.deleteVerb(verbId)
122
161
 
123
162
  // Bulk operations
124
163
  await brain.import(arrayOfData)
@@ -127,16 +166,35 @@ const exported = await brain.export({ format: 'json' })
127
166
 
128
167
  ## 🎯 Use Cases
129
168
 
130
- ### Knowledge Management
169
+ ### Knowledge Management with Relationships
131
170
  ```javascript
132
- // Store and search documentation
133
- await brain.addNoun(documentContent, {
171
+ // Store documentation with rich relationships
172
+ const apiGuide = await brain.addNoun("REST API Guide", {
134
173
  title: "API Guide",
135
174
  category: "documentation",
136
175
  version: "2.0"
137
176
  })
138
177
 
139
- const docs = await brain.find("API documentation for version 2")
178
+ const author = await brain.addNoun("Jane Developer", {
179
+ type: "person",
180
+ role: "tech-lead"
181
+ })
182
+
183
+ const project = await brain.addNoun("E-commerce Platform", {
184
+ type: "project",
185
+ status: "active"
186
+ })
187
+
188
+ // Create knowledge graph
189
+ await brain.addVerb(author, apiGuide, "authored", {
190
+ date: "2024-03-15"
191
+ })
192
+ await brain.addVerb(apiGuide, project, "documents", {
193
+ coverage: "complete"
194
+ })
195
+
196
+ // Query the knowledge graph naturally
197
+ const docs = await brain.find("documentation authored by tech leads for active projects")
140
198
  ```
141
199
 
142
200
  ### Semantic Search
@@ -148,17 +206,35 @@ const similar = await brain.search(existingContent, {
148
206
  })
149
207
  ```
150
208
 
151
- ### AI Memory Layer
209
+ ### AI Memory Layer with Context
152
210
  ```javascript
153
- // Store conversation context
154
- await brain.addNoun(userMessage, {
155
- userId: "123",
211
+ // Store conversation with relationships
212
+ const userId = await brain.addNoun("User 123", {
213
+ type: "user",
214
+ tier: "premium"
215
+ })
216
+
217
+ const messageId = await brain.addNoun(userMessage, {
218
+ type: "message",
156
219
  timestamp: Date.now(),
157
220
  session: "abc"
158
221
  })
159
222
 
160
- // Retrieve relevant context
161
- const context = await brain.find(`previous conversations with user 123`)
223
+ const topicId = await brain.addNoun("Product Support", {
224
+ type: "topic",
225
+ category: "support"
226
+ })
227
+
228
+ // Link conversation elements
229
+ await brain.addVerb(userId, messageId, "sent")
230
+ await brain.addVerb(messageId, topicId, "about")
231
+
232
+ // Retrieve context with relationships
233
+ const context = await brain.find({
234
+ where: { type: "message" },
235
+ connected: { from: userId, type: "sent" },
236
+ like: "previous product issues"
237
+ })
162
238
  ```
163
239
 
164
240
  ## 💾 Storage Options
@@ -272,6 +348,42 @@ Key changes:
272
348
 
273
349
  We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
274
350
 
351
+ ## 🧠 The Universal Knowledge Protocol Explained
352
+
353
+ ### How We Achieved The Impossible
354
+
355
+ **Triple Intelligence™** makes us the **world's first** to unify three database paradigms:
356
+ 1. **Vector databases** (Pinecone, Weaviate) - semantic similarity
357
+ 2. **Graph databases** (Neo4j, ArangoDB) - relationships
358
+ 3. **Document databases** (MongoDB, Elasticsearch) - metadata filtering
359
+
360
+ **One API to rule them all.** Others make you choose. We unified them.
361
+
362
+ ### The Math of Infinite Expressiveness
363
+
364
+ ```
365
+ 24 Nouns × 40 Verbs × ∞ Metadata × Triple Intelligence = Universal Protocol
366
+ ```
367
+
368
+ - **960 base combinations** from standardized types
369
+ - **∞ domain specificity** via unlimited metadata
370
+ - **∞ relationship depth** via graph traversal
371
+ - **= Model ANYTHING**: From quantum physics to social networks
372
+
373
+ ### Why This Changes Everything
374
+
375
+ **Like HTTP for the web, Brainy for knowledge:**
376
+ - All augmentations compose perfectly - same noun-verb language
377
+ - All AI models share knowledge - GPT, Claude, Llama all understand
378
+ - All tools integrate seamlessly - no translation layers
379
+ - All data flows freely - perfect portability
380
+
381
+ **The Vision**: One protocol. All knowledge. Every tool. Any AI.
382
+
383
+ **Proven across industries**: Healthcare, Finance, Manufacturing, Education, Legal, Retail, Government, and beyond.
384
+
385
+ [→ See the Mathematical Proof & Full Taxonomy](docs/architecture/noun-verb-taxonomy.md)
386
+
275
387
  ## 📖 Documentation
276
388
 
277
389
  - [Getting Started Guide](docs/guides/getting-started.md)
@@ -279,6 +391,7 @@ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
279
391
  - [Architecture Overview](docs/architecture/overview.md)
280
392
  - [Natural Language Guide](docs/guides/natural-language.md)
281
393
  - [Triple Intelligence](docs/architecture/triple-intelligence.md)
394
+ - [Noun-Verb Taxonomy](docs/architecture/noun-verb-taxonomy.md)
282
395
 
283
396
  ## 🏢 Enterprise & Cloud
284
397
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@soulcraft/brainy",
3
- "version": "2.0.0",
4
- "description": "Multi-Dimensional AI Database - Vector search, graph relationships, field filtering with Triple Intelligence Engine, HNSW indexing and universal storage",
3
+ "version": "2.0.2",
4
+ "description": "Universal Knowledge Protocol™ - World's first Triple Intelligence database unifying vector, graph, and document search in one API. 24 nouns × 40 verbs for infinite expressiveness.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -98,13 +98,13 @@
98
98
  "publishConfig": {
99
99
  "access": "public"
100
100
  },
101
- "homepage": "https://github.com/brainy-org/brainy",
101
+ "homepage": "https://github.com/soulcraftlabs/brainy",
102
102
  "bugs": {
103
- "url": "https://github.com/brainy-org/brainy/issues"
103
+ "url": "https://github.com/soulcraftlabs/brainy/issues"
104
104
  },
105
105
  "repository": {
106
106
  "type": "git",
107
- "url": "git+https://github.com/brainy-org/brainy.git"
107
+ "url": "git+https://github.com/soulcraftlabs/brainy.git"
108
108
  },
109
109
  "files": [
110
110
  "dist/**/*.js",