StreamBrain is a modern, high-fidelity personal knowledge-management platform that acts as a secure, local, and semantic second brain. It integrates note-taking, task management, relationship mapping, voice recording, handwriting OCR, and advanced AI agent capabilities into a cohesive, premium interface.
- Thoughts Workspace: View notes, tasks, and speculative ideas as premium, light-mode surface-raised cards.
- Drag-and-Drop Juggling: Freely arrange thought cards on a two-dimensional grid to reflect your mental associations.
- Cohesive Merging: Drag one card onto another to prompt a Merge. StreamBrain automatically invokes the
streambrain-synthesizeragent to synthesize both cards into a single, rich summary card. - Inline Editing: Double-click titles or content to edit thoughts instantly.
- Export/Import: Batch-export selected cards as formatted JSON or import external files.
- Natural Language Q&A: Chat directly with your second brain using a dedicated interface.
- Citations Mapped to Sources: AI replies feature inline numerical citations (e.g.,
[1],[2]). Hovering over a citation reveals a rich tooltip displaying the card title, content excerpt, and type (knowledge, idea, task). - Persistent Histories: Conversations are persisted in
localStorageso you can continue your chats after reloading the page.
- Dynamic Relationship Map: Visualize links and nodes connecting thoughts, tasks, and documents in real time.
- Premium Dotted Background: An SVG
<pattern>grid with circles at 28px intervals styled with HSL custom themes. - Clickable Mappings: Click on graph nodes to open and zoom directly to the respective card on the spatial grid.
- Theme Syncing: Full sync with light and dark mode switches.
- Slide-Out Side Panel: A collapsible left-hand sidebar containing pending tasks and AI-generated insights.
- Proactive Prompts: Run the
streambrain-insightagent to analyze your current dashboard state and extract high-level patterns, contradiction alerts, or suggestions (e.g., "You have a deadline conflict on task X"). - State Persistence: Side menu toggles persist state across reloads via
sessionStorage.
- Automatic Text Extraction: Upload PDFs, text files, or images. StreamBrain uploads the file to the Lemma Files Datastore (
/documents) and uses the children markdown/content APIs to extract the text. - AI Classification: Extracted text is digested by the
streambrain-classifieragent, generating a structured thought card complete with insights, next steps, and meta tags. - Graceful Conflict Overwrites: Automatically checks for existing files at the destination path. If a name conflict occurs, it deletes the outdated file first, ensuring a clean, crash-free re-upload.
- PDF Canvas Rendering: Renders the first page of any uploaded PDF to an off-screen
HTMLCanvasElementat a high scale (2.0) to maintain crisp character lines. - OpenRouter Vision OCR: Converts the canvas to a base64 PNG data URL and uploads it to the
/api/ocrendpoint, utilizingopenai/gpt-4o-minion OpenRouter to transcribe handwriting, text, and mathematical LaTeX formulas exactly as they appear.
- Web Audio API Integration: Uses a native
AudioContextandAnalyserNodeto capture raw microphone inputs. - Real-Time Visualizer: Animates a 60fps, 24-bar frequencies spectrum directly using DOM manipulation to bypass React render overhead.
- Speech-to-Text Transcription: Connects to the browser's
SpeechRecognitioninterface to output voice thoughts in real time.
Open the config panel to access multi-tab management sections:
- Appearance: Adjust fonts (Inter, Newsreader, JetBrains Mono), border radius, CSS variables, and spacing presets.
- Intelligence: Set agent temperatures, model limits, and manage token credentials.
- Vault: View database statistics, live database table counts, and inspect database schemas for tables (
thoughts,documents,tasks,insights,relationships).
- Time Scrubber: A chronological slider allowing users to scrub back and forth through thought capture history.
- Semantic Minimap: A clustered thumbnail view mapping the density and location of semantic thought nodes across the grid.
- Framework: Next.js 16 (App Router, Turbopack)
- Language: TypeScript
- Styling: Tailwind CSS & custom Vanilla CSS (CSS variables, glassmorphism)
- Local DB / Storage: SQLite, synced local databases (
tasks.json,documents.json) - Lemma Integration: Lemma SDK (
lemma-sdk) for table records, custom agent invocations, and files datastores. - Vision Model:
openai/gpt-4o-mini(via OpenRouter API)
- Node.js: Version 18 or higher.
- Lemma CLI: Installed on your system.
Important
The application requires a configured Lemma Pod with StreamBrain resources. Run these CLI commands before launching the app:
- Login:
lemma auth login
- Create Pod:
lemma pod create streambrain
- Import Setup Bundle:
Import the pre-configured local schema and agents:
lemma pod import streambrain --pod streambrain
- Get Pod ID:
Retrieve the UUID of your new pod:
Copy the ID and place it in the
lemma pod get streambrain
.env.localfile asLEMMA_POD_ID.
Install NPM dependencies:
npm installCreate a .env.local file in the root directory:
LEMMA_API_URL=https://api.lemma.work
LEMMA_AUTH_URL=https://lemma.work/auth
LEMMA_POD_ID=YOUR_LEMMA_POD_ID
OPENROUTER_API_KEY="YOUR_OPENROUTER_API_KEY"Tip
If PowerShell script execution is restricted on your Windows system, bypass it with the command below:
in powershell
powershell -ExecutionPolicy Bypass -Command "npm run dev"
# in cmd or terminal
npm run devOpen http://localhost:3000 in your browser.
Compile and build the optimized production package:
# in powershell
powershell -ExecutionPolicy Bypass -Command "npm run build"
# in cmd or terminal
npm run buildA comprehensive overview of features, testing procedures, file structures, and verification checkmarks is maintained in project.md.
Created and maintained as a part of the AI Second Brain project.