Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.wolffi.sh/llms.txt

Use this file to discover all available pages before exploring further.

Architecture Overview

Wolffish maps the human brain’s architecture onto a deterministic software pipeline. Each of the 15 runtime modules handles exactly one function, and they communicate via a typed event bus (corpus).

The Brain Metaphor

The module names aren’t random — each maps to a real brain region that performs an analogous function:
ModuleBrain RegionFunction
thalamusSensory gatewayRoutes input to LLM providers
prefrontalExecutive functionAssembles context for the LLM
rasReticular Activating SystemFilters relevant content by attention
cortexCerebral cortexFast retrieval index (SQLite FTS5)
hippocampusMemory centerStores and retrieves conversation history
cerebellumMotor coordinationDiscovers and loads capabilities
wernickeLanguage comprehensionParses LLM output and extracts tool calls
brocaLanguage productionStreams responses to the UI
amygdalaThreat detectionSafety gate for dangerous operations
motorMotor cortexExecutes tasks with retry and logging
basalgangliaReward/learningRecords outcomes for feedback
hypothalamusHomeostasisMonitors system health
brainstemAutonomic functionsFile watching, cron jobs, compaction
corpusCorpus callosumEvent bus connecting all modules
insulaSelf-awarenessStatus and performance introspection

The Key Insight

The pipeline is deterministic — the same input follows the same path through the same gates every time. The LLM adds creativity and intelligence at exactly one point (the thalamus.stream() call). Everything else is predictable TypeScript code that reads and writes markdown files.

Module Communication

All modules communicate via corpus (the event bus), never by importing each other directly. This keeps dependencies clean and makes the system inspectable — every event is logged to daily markdown files.
corpus.emit('message.received', { content: '...' })
corpus.emit('context.built', { tokens: 8000 })
corpus.emit('tool.called', { name: 'shell_exec', args: {...} })
corpus.emit('safety.blocked', { reason: '...' })

Tech Stack

Wolffish is built on Electron 39, React 19, TypeScript 5.9, and Vite 7. The event bus uses mitt for typed events. Memory indexing uses better-sqlite3 with FTS5. All LLM communication is pure fetch() — no SDKs.

See the Full Pipeline

Follow a message from input to response, step by step.