How hbar-systems/brainfoundry-nous works
BrainFoundry is a self-hosted personal AI: a user chats through the console, the FastAPI brain answers using a configured model and retrieved memory, and optional tools and integrations extend that loop. Separate product branches cover document ingestion, research, tasks, installable apps, and federation. BrainKernel (NodeOS) supplies permit and mutation governance. The README documents the major capabilities; sampled source confirms selected implementation details, but many endpoint and subsystem connections are documented rather than shown in the excerpts.
Main entry points: api/main.py Chat API · index.js Web console · nodeos/main.py BrainKernel NodeOS · ingest_folder.py Document ingestion
Components 19
User experience
- Web console
ui/pages/index.js
Brain runtime
- Chat API
api/main.py - Model providers
api/providers.py
Memory and knowledge
- Embeddings
api/embeddings/model.py - Postgres pgvector
- Document ingestion
scripts/ingest_folder.py - Memory trust labels
api/memory_type.py
Tools and integrations
- Deep research
api/research.py - Web search tool
api/tools/web_search.py - Tool dispatch
api/tools/__init__.py - External integrations
api/integrations - Tasks and reminders
api/tasks_store.py - Installable apps
api/apps.py
Governance and federation
- BrainKernel NodeOS
nodeos/main.py - Identity and permits
api/identity/core.py - Append-only audit
api/tools/audit.py - Brain federation
api/federation_publisher.py
Other components
- Brain owner
- Ollama
Connections 20
- Brain owner → Web console: uses
- Web console → Chat API: sends chat
- Chat API → Model providers: calls models
api/main.py - Model providers → Ollama: falls back
- Chat API → Postgres pgvector: retrieves memory
- Document ingestion → Postgres pgvector: stores documents
- Document ingestion → Embeddings: embeds content
- Chat API → Embeddings: embeds queries
api/main.py - Memory trust labels → Postgres pgvector: labels memory
- Chat API → Tool dispatch: dispatches tools
api/main.py - Tool dispatch → Web search tool: runs tool
api/tools/web_search.py - Deep research → Web search tool: searches web
api/research.py - Chat API → External integrations: offers integrations
api/main.py - Chat API → Tasks and reminders: manages tasks
api/main.py - Web console → Installable apps: installs apps
api/apps.py - Chat API → BrainKernel NodeOS: checks authority
api/main.py - BrainKernel NodeOS → Identity and permits: issues permits
- BrainKernel NodeOS → Append-only audit: records commands
- Chat API → Append-only audit: records model calls
api/main.py - Brain federation → Brain federation: publishes to peers