Brainy Logo

Brainy Interactive Demo

A lightweight but powerful graph & vector data platform for AI applications across any environment

🚀 Key Features

Explore all of Brainy's powerful capabilities in this interactive demo:

🏃‍♂️ Run Everywhere

Run Brainy in a browser, container, serverless cloud service or the terminal!

🔍 Vector Search

Find semantically similar content using embeddings (like having ESP for your data!)

🌐 Graph Database

Connect data with meaningful relationships (your data's social network)

🌊 Streaming Pipeline

Process data in real-time as it flows through the system (like a data waterslide!)

🧩 Extensible Augmentations

Customize and extend functionality with pluggable components (LEGO blocks for your data!)

🔌 Built-in Conduits

Sync and scale across instances with WebSocket and WebRTC (your data's teleportation system!)

🤖 TensorFlow Integration

Use TensorFlow.js for high-quality embeddings (included as a required dependency)

🧠 Adaptive Intelligence

Automatically optimizes for your environment and usage patterns

🌍 Cross-Platform

Works everywhere you do: browsers, Node.js, and server environments

💾 Persistent Storage

Data persists across sessions and scales to any size (no memory loss here!)

🔧 TypeScript Support

Fully typed API with generics (for those who like their code tidy)

📱 CLI Tools

Powerful command-line interface for data management (command line wizardry)

📊 Data Visualization

Interactive graph and vector space visualizations

☁️ Cloud Ready

Easy deployment to Google, AWS, Azure, and other cloud platforms

🏁 Quick Start

Node.js Environment

import {BrainyData, NounType, VerbType} from '@soulcraft/brainy'

// Create and initialize the database
const db = new BrainyData()
await db.init()

// Add data (automatically converted to vectors)
const catId = await db.add("Cats are independent pets", {
    noun: NounType.Thing,
    category: 'animal'
})

const dogId = await db.add("Dogs are loyal companions", {
    noun: NounType.Thing,
    category: 'animal'
})

// Search for similar items
const results = await db.searchText("feline pets", 2)
console.log(results)
// Returns items similar to "feline pets" with similarity scores

// Add a relationship between items
await db.addVerb(catId, dogId, {
    verb: VerbType.RelatedTo,
    description: 'Both are common household pets'
})
        

Browser Environment

You can import the browser-optimized version in two ways:

Option 1: Using the browser-specific import

// Import the browser-optimized version
import {BrainyData, NounType, VerbType} from '@soulcraft/brainy/browser'

// Use the same API as in Node.js
const db = new BrainyData()
await db.init()
// ...
        

Option 2: Using a script tag in HTML

<script type="module">
  // Import Brainy library directly as a module
  import {BrainyData, NounType, VerbType} from '../node_modules/@soulcraft/brainy/dist/brainy.js'

  // Use the same API as in Node.js
  const db = new BrainyData()
  await db.init()
  // ...
</script>
        

Modern bundlers like Webpack, Rollup, and Vite will automatically select the browser-optimized version when targeting browser environments.

Interactive Brainy Explorer

This interactive demo allows you to experiment with all of Brainy's features. Initialize the database, add data, create relationships, and perform searches - all with real-time visualizations.

Database Operations

Initialize the database, add sample data, or clear all data.

Database not initialized. Click "Initialize Database" to start.
Database visualization will appear here after initialization

Data Model Management

Create entities (nouns), define relationships (verbs), and manage your data schema.

Entity operations will appear here...

Vector Search & Semantic Queries

Perform semantic searches using vector embeddings and similarity matching.

Search results will appear here...
Search results visualization

Data Visualization

Interactive visualizations of your graph data and vector spaces.

Select a visualization type above

CLI Command Interface

Simulate CLI commands and explore Brainy's command-line interface.

brainy$
Available Commands:
brainy init - Initialize a new database
brainy add <data> - Add data to the database
brainy search <query> - Search for entities
brainy relate <from> <to> - Create relationships
brainy export - Export database
brainy status - Show database status
brainy help - Show all commands

Feature Demonstrations

Explore specific features and capabilities of Brainy with guided demonstrations.

🔍 HNSW Vector Search

Demonstrate fast approximate nearest neighbor search with hierarchical navigable small world graphs.

🌐 Graph Traversal

Show graph traversal algorithms and relationship queries.

🧠 Embedding Pipeline

Demonstrate automatic text-to-vector conversion and similarity computation.

📊 Real-time Updates

Show live data synchronization and event streaming capabilities.

💾 Storage Backends

Compare different storage options: memory, filesystem, and cloud.

🔧 TypeScript Integration

Show type-safe operations and schema validation.

Select a feature above to see a detailed demonstration...