@@ -4,7 +4,7 @@ turns it into durable memory, and takes (or proposes) bounded action on your
44behalf.
55
66More academically, it's an exocortex for attention, memory, and action:
7- Cognitive infrastructure that prioritizes context, directs intent deliberately,
7+ cognitive infrastructure that prioritizes context, directs intent deliberately,
88and closes loops.
99
1010*** NOTE:** This project is still in active development and somewhat unstable.
@@ -20,14 +20,12 @@ Don't @ me, bro.*
2020
2121------------------------------------------------------------------------
2222## Motivation
23- I wanted a Siri that didn't suck; a real Jarvis. A local-first,
24- privacy respecting, security forward, personal virtual assistant.
23+ I wanted a Siri that didn't suck; a real Jarvis.
2524
2625My initial use case was to manage commitments: to look across messages, email,
27- meetings, and calendars, and not just build up a todo list, but to actually
28- capture the essence, impact, effort, and timeline of obligations and then
29- support and facilitate timely action towards them, but without abusing my
30- limited attention span. Think:
26+ meetings, etc. and not just build up a todo list, but actually capture the
27+ essence, impact, effort, and timeline of obligations and then facilitate timely
28+ action without abusing my limited attention span. Think:
3129
3230> Hey boss, I know we have that project meeting next Thursday but I don't think
3331> we've prepped yet - tomorrow looks pretty open so I've put a 90 minute focus
@@ -37,107 +35,135 @@ January 1st, 2026, I decided to start an experiment, bolting [PydanticAI] on top
3735of [ Obsidian] and piping communication through [ Signal] . What exists now is a
3836maturation & formalization of that initial prototype, redesigned from the ground
3937up with crisp boundaries to ensure:
40- * extensibility
41- * observability
42- * transparency
4338* governance
39+ * transparency
40+ * observability
41+ * extensibility
42+
43+ ------------------------------------------------------------------------
44+ ## What It Does Today
45+ * Conversational interaction over [ Signal] and a local console TUI.
46+ * Read/write your [ Obsidian] vault with revision-safe edits, atomic moves, and
47+ trash-aware deletes.
48+ * Semantic vault search using local embeddings and [ Qdrant] .
49+ * Governed tool execution: every Op is policy-gated and real-world side effects
50+ flow through approval-aware gateways. Every invocation is auditable.
51+ * First-class [ MCP] integration for third-party tools, with per-tool effect and
52+ approval classification.
53+ * Commitment capture, miss detection, and timing-aware operator reminders.
54+ * Scheduled and background work via the Worker actor, plus optional Subagent
55+ delegation for focused, budget-bounded subtasks.
56+ * Universal ingestion pipeline: capture &rarr ; normalize &rarr ; anchor &rarr ;
57+ index, for arbitrary content.
58+
59+ See the [ Roadmap] ( docs/roadmap.md ) for what's next.
4460
4561------------------------------------------------------------------------
46- ## Overview
47- * Conceptually * , Brain has three primary domains:
62+ ## Conceptual Model
63+ Brain has three primary domains:
48641 . A ** personal knowledge base** : durable, human-readable, locally-stored
4965 information. At its simplest, this could be a single (if very large) file.
50662 . A ** reasoning engine** : an LLM used to interpret context, propose actions,
5167 explain decisions, and interact with you conversationally.
52- 3 . ** Ops** : governed functions that interact with the real world (files,
53- calendars, messaging, etc. ) via native APIs or MCP Servers.
68+ 3 . ** Ops** : governed, testable units of action that wrap a single capability
69+ (e.g. "create a calendar event" ) via native APIs or MCP Servers.
5470
55- * Operationally* , the system takes advantage of Docker for process isolation. In
56- an ideal world every process would be containerized, but for various reasons
57- (security, usability, performance) there are a limited number of services that
58- need to run directly on your host system:
71+ Internally those domains are organized along two orthogonal axes &mdash ; Planes
72+ (what does it own?) and Tiers (who is allowed to talk to whom?).
73+
74+ ### Planes
75+ * ** State** : owns data
76+ * ** Effect** : owns action
77+ * ** Reason** : owns coordination
78+
79+ ### Tiers
80+ * ** 3 (Actors)** : operator interaction surface
81+ * ** 2 (Services)** : internal business logic
82+ * ** 1 (Resources)** : integrations with the outside world
83+
84+ The Boundaries & Responsibilities diagram is a conceptual map of those axes. It
85+ is not a deployment or data flow diagram and it doesn't describe the full scope
86+ of the project, but it captures how control flow, cohesion, and decoupling are
87+ intended to work. See the full [ Boundaries &
88+ Responsibilities] ( docs/boundaries-and-responsibilities.md ) document for details.
89+
90+ ![ Boundaries & Responsibilities] ( img/boundaries-and-responsibilities.png )
91+
92+ ------------------------------------------------------------------------
93+ ## Runtime Topology
94+ Brain uses Docker for process isolation. In an ideal world every process would
95+ be containerized, but for security, usability, and performance reasons a
96+ limited number of services need to run directly on the host:
5997* [ Obsidian] with the [ Local REST API] plugin &mdash ; * required*
6098* [ Ollama] &mdash ; * recommended* for embedding, * optional* for inference
99+ * Companion project [ Host MCP Gateway] &mdash ; a bridge to localhost APIs;
100+ * optional*
61101
62- All other services are run in isolation with Docker Compose:
102+ All other services run in isolation under Docker Compose:
63103* Brain Assistant, built with [ PydanticAI]
64104* Brain Core, which houses all runtime * State* , * Effect* , and * Reason*
65105 Components
66106* Brain Worker and Subagent, for async/parallel work
67107* Brain MCP Adapter sidecar, connecting to configured MCP servers
68108* Secure messaging thanks to [ Signal]
69- * Durable working state and application logs are kept in [ Postgres]
70- * Caching and queueing are handled by [ Valkey]
71- * Vector search for semantic embeddings is powered by [ Qdrant]
72- * Object blobs are stored in [ SeaweedFS]
109+ * Durable working state and application logs in [ Postgres]
110+ * Caching and queueing handled by [ Valkey]
111+ * Vector search for semantic embeddings powered by [ Qdrant]
112+ * Object blobs stored in [ SeaweedFS]
73113
74114There is also an optional OpenTelemetry-based observability stack in
75115` docker-compose.observability.yaml ` . It routes Brain traces through an OTel
76116Collector to self-hosted [ Langfuse] (backed by [ ClickHouse] ) and [ Grafana]
77- ([ Prometheus] , [ Loki] , [ cAdvisor] ) as well as the existing [ Postgres] , [ Valkey] ,
117+ ([ Prometheus] , [ Loki] , [ cAdvisor] ), on top of the existing [ Postgres] , [ Valkey] ,
78118and [ SeaweedFS] services. See [ Observability] ( docs/observability.md ) for
79- connection details, required secrets, environment variables, and startup checks.
119+ connection details, required secrets, environment variables, and startup
120+ checks.
80121
81122------------------------------------------------------------------------
82- ## Architecture
83- The most useful way to understand the system structure is the Boundaries &
84- Responsibilities diagram — a conceptual map of _ Tiers_ , _ Planes_ , _ Actors_ ,
85- _ Services_ , and _ Resources_ . It is not a deployment or data flow diagram and it
86- does not describe the full scope of the project, but it does a good job at
87- visualizing how I think about control flow, cohesion, and decoupling.
88-
89- ### Planes
90- * ** State** : owns data
91- * ** Effect** : owns action
92- * ** Reason** : owns coordination
93-
94- ### Tiers
95- * ** 3 (Actors)** : operator interaction surface
96- * ** 2 (Services)** : internal business logic
97- * ** 1 (Resources)** : integrations with outside world
98-
99- See the full [ Boundaries &
100- Responsibilities] ( docs/boundaries-and-responsibilities.md ) document for details.
101-
102- ![ Boundaries & Responsibilities] ( img/boundaries-and-responsibilities.png )
123+ ## Quickstart
124+ On macOS, with Docker, Python 3.14, and [ Obsidian] + the [ Local REST API]
125+ plugin already installed:
126+ ``` sh
127+ make deps
128+ cp .env.sample .env
129+ mkdir -p ~ /.config/brain
130+ for f in config/* .yaml.sample; do
131+ cp " $f " ~ /.config/brain/" $( basename " $f " .sample) "
132+ done
133+ # edit ~/.config/brain/secrets.yaml with your API keys, etc.
134+ make up
135+ ```
136+
137+ See the [ Development Guide] ( docs/development-guide.md ) for full prerequisites,
138+ configuration details, and the test/lint workflow.
103139
104140------------------------------------------------------------------------
105141## Key Documentation
106- - [ Manifesto] ( docs/manifesto.md ) &mdash ; Design philosophy, first principles,
107- and architectural invariants.
108- - [ Boundaries & Responsibilities] ( docs/boundaries-and-responsibilities.md )
109- &mdash ; Tier model, system model, service catalog, and shared infrastructure.
110- - [ Project Layout] ( docs/project-layout.md ) &mdash ; Directory structure mapped to
111- the conceptual model.
112- - [ Glossary] ( docs/glossary.md ) &mdash ; Term definitions (generated from YAML).
113- - [ Configuration Reference] ( docs/configuration.md ) &mdash ; Config file schema,
114- environment variable overrides, and per-section key reference.
115- - [ Service API Reference] ( docs/service-api.md ) &mdash ; Public API surface
116- (generated from code).
117- - [ Development Guide] ( docs/development-guide.md ) &mdash ; Setup, make targets,
142+ For the full index see the [ ` docs/ ` ] ( docs/ ) directory, but this is where I'd
143+ start as a gentle introduction:
144+ * [ Manifesto] ( docs/manifesto.md ) &mdash ; Design philosophy and first
145+ principles.
146+ * [ Boundaries & Responsibilities] ( docs/boundaries-and-responsibilities.md )
147+ &mdash ; Tier and Plane model, service catalog, and shared infrastructure.
148+ * [ Development Guide] ( docs/development-guide.md ) &mdash ; Setup, make targets,
118149 testing, and contributor workflows.
119- - [ Roadmap] ( docs/roadmap.md ) &mdash ; Phased implementation plan and current
150+ * [ Roadmap] ( docs/roadmap.md ) &mdash ; Phased implementation plan and current
120151 status.
121152
122153------------------------------------------------------------------------
123- ## See Also
124- * [ OpenClaw] : Better than Brain in a lot of ways, but wihout privacy, security,
125- and governance as first-class architectural primitives.
126- * [ Hermes Agent] : Purportedly more dynamic and self-modifying than OpenClaw.
127- * [ Claude Cowork] : An agentic tool, but not long-lived, and largely bound by MCP
154+ ## License
155+ Released under the [ MIT License] ( LICENSE.txt ) .
128156
129- ------------------------------------------------------------------------
130- ## Getting Started
131- See the [ Development Guide] ( docs/development-guide.md ) for prerequisites,
132- environment setup, and how to build/test.
133157
134158[ Claude Cowork ] : https://claude.com/product/cowork
135159[ ClickHouse ] : https://clickhouse.com
136160[ Grafana ] : https://grafana.com
137161[ Hermes Agent ] : https://github.com/NousResearch/hermes-agent
162+ [ issues ] : https://github.com/cmtonkinson/brain/issues
138163[ Langfuse ] : https://langfuse.com
139164[ Local REST API ] : https://github.com/coddingtonbear/obsidian-local-rest-api
140165[ Loki ] : https://grafana.com/oss/loki/
166+ [ MCP ] : https://modelcontextprotocol.io
141167[ Obsidian ] : https://obsidian.md
142168[ Ollama ] : https://ollama.com
143169[ OpenClaw ] : https://github.com/openclaw/openclaw
@@ -149,6 +175,7 @@ environment setup, and how to build/test.
149175[ Signal ] : https://signal.org
150176[ Valkey ] : https://valkey.io
151177[ cAdvisor ] : https://github.com/google/cadvisor
178+ [ Host MCP Gateway ] : https://github.com/cmtonkinson/host-mcp-gateway
152179
153180
154181------------------------------------------------------------------------
0 commit comments