
[](https://badge.fury.io/js/%40soulcraft%2Fbrainy)
[](https://opensource.org/licenses/MIT)
[](https://soulcraft.com)
[](https://soulcraft.com/brain-cloud)
[](https://nodejs.org/)
[](https://www.typescriptlang.org/)
# ๐ง BRAINY: Your AI-Powered Second Brain
**The World's First Multi-Dimensional AI Databaseโข**
*Vector similarity โข Graph relationships โข Metadata facets โข Neural understanding*
**Build AI apps that actually understand your data - in minutes, not months**
---
## ๐ What Can You Build?
### ๐ฌ **AI Chat Apps** - That Actually Remember
```javascript
// Your users' conversations persist across sessions
const brain = new BrainyData()
await brain.add("User prefers dark mode")
await brain.add("User is learning Spanish")
// Later sessions remember everything
const context = await brain.search("user preferences")
// AI knows: dark mode + Spanish learning preference
```
### ๐ค **Smart Assistants** - With Real Knowledge Graphs
```javascript
// Build assistants that understand relationships
await brain.add("Sarah manages the design team")
await brain.addVerb("Sarah", "reports_to", "John")
await brain.addVerb("Sarah", "works_on", "Project Apollo")
// Query complex relationships
const team = await brain.getRelated("Project Apollo", {
verb: "works_on",
depth: 2
})
// Returns: entire team structure with relationships
```
### ๐ **RAG Applications** - Without the Complexity
```javascript
// Retrieval-Augmented Generation in 3 lines
await brain.add(companyDocs) // Add your knowledge base
const relevant = await brain.search(userQuery, 10) // Find relevant context
const answer = await llm.generate(relevant + userQuery) // Generate with context
```
### ๐ **Semantic Search** - That Just Works
```javascript
// No embeddings API needed - it's built in!
await brain.add("The iPhone 15 Pro has a titanium design")
await brain.add("Samsung Galaxy S24 features AI photography")
const results = await brain.search("premium smartphones with metal build")
// Returns: iPhone (titanium matches "metal build" semantically)
```
### ๐ฏ **Recommendation Engines** - With Graph Intelligence
```javascript
// Netflix-style recommendations with relationships
await brain.addVerb("User123", "watched", "Inception")
await brain.addVerb("User123", "liked", "Inception")
await brain.addVerb("Inception", "similar_to", "Interstellar")
const recommendations = await brain.getRelated("User123", {
verb: ["liked", "watched"],
depth: 2
})
// Returns: Interstellar and other related content
```
## ๐ซ Why Brainy? The Problem We Solve
### โ **The Old Way: Database Frankenstein**
```
Pinecone ($750/mo) + Neo4j ($500/mo) + Elasticsearch ($300/mo) +
Sync nightmares + 3 different APIs + Vendor lock-in = ๐ฑ๐ธ
```
### โ
**The Brainy Way: One Brain, All Dimensions**
```
Vector + Graph + Search + AI = Brainy (Free & Open Source) = ๐ง โจ
```
**Your data gets superpowers. Your wallet stays happy.**
## ๐ฎ Try It Now - No Install Required!
### [**โ Live Demo at soulcraft.com/console โ**](https://soulcraft.com/console)
Try Brainy instantly in your browser. No signup. No credit card.
## โก Quick Start (60 Seconds)
### Open Source (Local Storage)
```bash
npm install @soulcraft/brainy
```
```javascript
import { BrainyData } from '@soulcraft/brainy'
// Zero configuration - it just works!
const brain = new BrainyData()
await brain.init()
// Add any data - text, objects, relationships
await brain.add("Elon Musk founded SpaceX in 2002")
await brain.add({ company: "Tesla", ceo: "Elon Musk", founded: 2003 })
await brain.addVerb("Elon Musk", "founded", "Tesla")
// Search naturally
const results = await brain.search("companies founded by Elon")
```
### โ๏ธ Brain Cloud (AI Memory + Agent Coordination)
```bash
# Auto-setup with cloud instance provisioning (RECOMMENDED)
brainy cloud setup --email your@email.com
# Or install manually
npm install @soulcraft/brainy @soulcraft/brain-cloud
```
```javascript
import { BrainyData, Cortex } from '@soulcraft/brainy'
import { AIMemory, AgentCoordinator } from '@soulcraft/brain-cloud'
const brain = new BrainyData()
const cortex = new Cortex()
// Add premium augmentations (requires Early Access license)
cortex.register(new AIMemory())
cortex.register(new AgentCoordinator())
// Now your AI remembers everything across all sessions!
await brain.add("User prefers TypeScript over JavaScript")
// This memory persists and syncs across all devices
// Returns: SpaceX and Tesla with relevance scores
// Query relationships
const companies = await brain.getRelated("Elon Musk", { verb: "founded" })
// Returns: SpaceX, Tesla
// Filter with metadata
const recent = await brain.search("companies", 10, {
filter: { founded: { $gte: 2000 } }
})
```
## ๐งฉ Augmentation System - Extend Your Brain
Brainy is **100% open source** with a powerful augmentation system. Choose what you need:
### ๐ **Built-in Augmentations** (Always Free)
```javascript
import { NeuralImport } from '@soulcraft/brainy'
// AI-powered data understanding - included in every install
const neural = new NeuralImport(brain)
await neural.neuralImport('data.csv') // Automatically extracts entities & relationships
```
**Included augmentations:**
- โ
**Neural Import** - AI understands your data structure
- โ
**Basic Memory** - Persistent storage
- โ
**Simple Search** - Text and vector search
- โ
**Graph Traversal** - Relationship queries
### ๐ **Community Augmentations** (Free, Open Source)
```bash
npm install brainy-sentiment # Community created
npm install brainy-translate # Community maintained
```
```javascript
import { SentimentAnalyzer } from 'brainy-sentiment'
import { Translator } from 'brainy-translate'
cortex.register(new SentimentAnalyzer()) // Analyze emotions
cortex.register(new Translator()) // Multi-language support
```
**Popular community augmentations:**
- ๐ญ Sentiment Analysis
- ๐ Translation (50+ languages)
- ๐ง Email Parser
- ๐ URL Extractor
- ๐ Data Visualizer
- ๐จ Image Understanding
### ๐ผ **Premium Augmentations** (@soulcraft/brain-cloud)
For teams that need AI memory and enterprise features:
```javascript
import {
AIMemory, // Persistent AI memory
AgentCoordinator, // Multi-agent handoffs
NotionSync, // Notion integration
SalesforceConnect // CRM integration
} from '@soulcraft/brain-cloud'
// Requires license key - get one at soulcraft.com
const aiMemory = new AIMemory({
licenseKey: process.env.BRAINY_LICENSE_KEY
})
cortex.register(aiMemory) // AI remembers everything
```
**AI Memory & Coordination:**
- ๐ง **AI Memory** - Persistent across sessions
- ๐ค **Agent Coordinator** - Multi-agent handoffs
- ๐ฅ **Team Sync** - Real-time collaboration
- ๐พ **Cloud Backup** - Automatic backups
**Enterprise Connectors:**
- ๐ **Notion Sync** - Bidirectional sync
- ๐ผ **Salesforce** - CRM integration
- ๐ **Airtable** - Database sync
- ๐ **Postgres** - Real-time replication
- ๐ข **Slack** - Team knowledge base
### ๐ฎ **Try Online** (Free Playground)
Test Brainy instantly without installing:
```javascript
// Visit soulcraft.com/console
// No signup required - just start coding!
// Perfect for:
// - Testing Brainy before installing
// - Prototyping ideas quickly
// - Learning the API
// - Sharing examples with others
```
**[โ Open Console](https://soulcraft.com/console)** - Your code runs locally, data stays private
### โ๏ธ **Brain Cloud** (Managed Service)
For teams that want zero-ops:
```javascript
// Connect to Brain Cloud - your brain in the cloud
await brain.connect('brain-cloud.soulcraft.com', {
instance: 'my-team-brain',
apiKey: process.env.BRAIN_CLOUD_KEY
})
// Now your brain persists across:
// - Multiple developers
// - Different environments
// - AI agents
// - Sessions
```
**Brain Cloud features:**
- ๐ Auto-sync across team
- ๐พ Managed backups
- ๐ Auto-scaling
- ๐ Enterprise security
- ๐ Analytics dashboard
- ๐ค Multi-agent coordination
## ๐ Create Your Own Augmentation
### We โค๏ธ Open Source
**Brainy will ALWAYS be open source.** We believe in:
- ๐ Community first
- ๐ No vendor lock-in
- ๐ Free forever core
- ๐ค Sustainable open source
### Build & Share Your Augmentation
```typescript
import { ISenseAugmentation } from '@soulcraft/brainy'
export class MovieRecommender implements ISenseAugmentation {
name = 'movie-recommender'
description = 'AI-powered movie recommendations'
enabled = true
async processRawData(data: string) {
// Your recommendation logic
const movies = await this.analyzePreferences(data)
return {
success: true,
data: {
nouns: movies.map(m => m.title),
verbs: movies.map(m => `similar_to:${m.genre}`),
metadata: { genres: movies.map(m => m.genre) }
}
}
}
}
```
**Share with the community:**
```bash
npm publish brainy-movie-recommender
```
**Earn from your creation:**
- ๐ Keep it free (we'll promote it!)
- ๐ฐ Sell licenses (we'll help distribute!)
- ๐ค Join our partner program
## ๐ฏ Real-World Examples
### Customer Support Bot with Memory
```javascript
// Your bot remembers every interaction
await brain.add({
customerId: "user_123",
issue: "Password reset",
resolved: true,
date: new Date()
})
// Next interaction knows the history
const history = await brain.search(`customer user_123`, 10)
// Bot says: "I see you had a password issue last week. All working now?"
```
### Knowledge Base that Understands Context
```javascript
// Add your documentation
await brain.add("To deploy Brainy, run npm install @soulcraft/brainy")
await brain.add("Brainy requires Node.js 24.4.1 or higher")
await brain.add("For production, use Brain Cloud for scaling")
// Natural language queries work
const answer = await brain.search("how do I deploy to production?")
// Returns relevant docs about Brain Cloud and scaling
```
### Multi-Agent AI Systems
```javascript
// Agents share the same brain
const agentBrain = new BrainyData({ instance: 'shared-brain' })
// Sales Agent adds knowledge
await agentBrain.add("Customer interested in enterprise plan")
// Support Agent sees it instantly
const context = await agentBrain.search("customer plan interest")
// Marketing Agent learns from both
const insights = await agentBrain.getRelated("enterprise plan")
```
## ๐๏ธ Architecture
```
Your App
โ
BrainyData (The Brain)
โ
Cortex (Orchestrator)
โ
Augmentations (Capabilities)
โโโ Built-in (Free)
โโโ Community (Free)
โโโ Premium (Paid)
โโโ Custom (Yours)
```
## ๐ก Core Features
### ๐ Multi-Dimensional Search
- **Vector**: Semantic similarity (meaning-based)
- **Graph**: Relationship traversal (connection-based)
- **Faceted**: Metadata filtering (property-based)
- **Hybrid**: All combined (maximum power)
### โก Performance
- **Speed**: 100,000+ ops/second
- **Scale**: Millions of embeddings
- **Memory**: ~100MB for 1M vectors
- **Latency**: <10ms searches
### ๐ Production Ready
- **Encryption**: End-to-end available
- **Persistence**: Multiple storage backends
- **Reliability**: 99.9% uptime in production
- **Security**: SOC2 compliant architecture
## ๐ Documentation
### Getting Started
- [**Quick Start Guide**](docs/getting-started/quick-start.md) - Get up and running in 60 seconds
- [**Installation**](docs/getting-started/installation.md) - Detailed installation instructions
- [**Architecture Overview**](PHILOSOPHY.md) - Design principles and philosophy
### Core Documentation
- [**API Reference**](docs/api/BRAINY-API-REFERENCE.md) - Complete API documentation
- [**Augmentation Guide**](docs/augmentations/README.md) - Build your own augmentations
- [**CLI Reference**](docs/brainy-cli.md) - Command-line interface
- [**All Documentation**](docs/README.md) - Browse all docs
### Guides
- [**Search & Metadata**](docs/user-guides/SEARCH_AND_METADATA_GUIDE.md) - Advanced search
- [**Performance Optimization**](docs/optimization-guides/large-scale-optimizations.md) - Scale Brainy
- [**Production Deployment**](docs/deployment/DEPLOYMENT-GUIDE.md) - Deploy to production
- [**Contributing Guidelines**](CONTRIBUTING.md) - Join the community
## ๐ค Our Promise to the Community
1. **Brainy core will ALWAYS be open source** (MIT License)
2. **No feature will ever move from free to paid**
3. **Community augmentations always welcome**
4. **We'll actively promote community creators**
5. **Commercial success funds open source development**
## ๐ Join the Movement
### Ways to Contribute
- ๐ Report bugs
- ๐ก Suggest features
- ๐ง Submit PRs
- ๐ฆ Create augmentations
- ๐ Improve docs
- โญ Star the repo
- ๐ข Spread the word
### Get Help & Connect
- ๐ฌ [Discord Community](https://discord.gg/brainy)
- ๐ฆ [Twitter Updates](https://twitter.com/soulcraftlabs)
- ๐ง [Email Support](mailto:support@soulcraft.com)
- ๐ [Video Tutorials](https://youtube.com/@soulcraft)
## ๐ Who's Using Brainy?
- ๐ **Startups**: Building AI-first products
- ๐ข **Enterprises**: Replacing expensive databases
- ๐ **Researchers**: Exploring knowledge graphs
- ๐จโ๐ป **Developers**: Creating smart applications
- ๐ค **AI Engineers**: Building RAG systems
## ๐ License
**MIT License** - Use it anywhere, build anything!
Premium augmentations available at [soulcraft.com](https://soulcraft.com)
---
### ๐ง โ๏ธ **Give Your Data a Brain Upgrade**
**[Get Started](docs/getting-started/quick-start.md)** โข
**[Examples](examples/)** โข
**[API Docs](docs/api/BRAINY-API-REFERENCE.md)** โข
**[Discord](https://discord.gg/brainy)**
โญ **Star us on GitHub to support open source AI!** โญ
*Created and maintained by [SoulCraft](https://soulcraft.com) โข Powered by our amazing open source community*
**SoulCraft** builds and maintains Brainy as open source (MIT License) because we believe AI infrastructure should be accessible to everyone.