Repository navigation
The Decoupled Brain
⚠️ STATUS: CONCEPTUAL ARCHITECTURE (PHASE 33) This document outlines the architectural pivot from a monolithic local agent to a distributed cognitive system utilizing Obsidian as a zero-API transport layer.
Currently, A.I.M. is a monolithic architecture. The "Hands" (the active coding agent manipulating the terminal) and the "Brain" (the 5-Tier Memory Refinement Pipeline) run on the exact same machine, within the same event loops, and draw from the same API quotas and rate limits.
This creates several fatal bottlenecks:
-
API Exhaustion: If the background Scribe attempts to summarize 50 turns of history, it can trigger a
MODEL_CAPACITY_EXHAUSTED(429) rate limit, instantly paralyzing the active coding agent in the primary terminal. - Compute Contention: Running heavy vector embedding models or complex summarization prompts drains local GPU/CPU resources, slowing down the active development environment.
-
The Cleanup Problem: The active RAG database (
engram.db) suffers from "ghost context" because deleting specific concepts from a compiled vector database is incredibly difficult without wiping the entire table.
To scale, A.I.M. must decouple the Control Plane (The coding agent) from the Data Plane (The memory pipeline).
We will offload the Brain to a dedicated background server (e.g., a spare Mac Mini, a Raspberry Pi, or a cheap Cloud VPS), allowing it to process memory 24/7 on separate API keys without ever interrupting the developer.
Decoupling introduces a major networking challenge. If Machine A (The Hands) and Machine B (The Brain) are constantly reading and writing to the same MEMORY.md file or SQLite database, we will encounter severe race conditions and merge conflicts.
Building a custom REST API, WebSocket server, or managing firewall rules and SSL certificates to handle this synchronization introduces massive, unnecessary overhead.
Rather than building a custom networking layer, A.I.M. will use Obsidian Sync (or an automated Git backend) as a secure, "Zero-API" transport layer.
By structuring the A.I.M. memory system to output strictly as flat .md files, we gain the ability to use third-party folder-syncing tools to pass data between the physical machines.
-
The Hands (Machine A): The developer finishes a coding session. The A.I.M. CLI dumps the raw
session.jsonchat log and a skeletal.mdtrace into a designated folder inside an Obsidian Vault (e.g.,Vault/AIM_Inbox/). -
The Transport: Obsidian Sync (or a background Git hook) automatically encrypts the new files, pushes them to the cloud, and syncs them down to the secondary machine.
-
The Brain (Machine B): A headless A.I.M. daemon runs continuously on the server, using a file-watcher (
watchdog) onVault/AIM_Inbox/. When a new session file arrives, the daemon triggers the 5-Tier Memory Pipeline (Scribe -> Archivist). -
The Ephemeral Subconscious: Instead of updating a monolithic database directly, the Brain writes the final distilled facts as hundreds of tiny, individual
.mdfiles into a hidden directory:Vault/.engrams/. It also updates the mainVault/MEMORY.md, which now serves purely as an "Index Card" pointing to those files. -
The Return: Obsidian Sync automatically pushes the newly generated
.engrams/and updatedMEMORY.mdback to the developer's primary coding machine. -
The Rebuild: When the coding agent wakes up on Machine A, it runs
aim index. This command drops the localengram.dbtables and instantly rebuilds the vector database from the fresh.mdfiles in.engrams/.
- Zero Custom Networking: No open ports, no complex API routing, no auth tokens to manage between devices.
-
Effortless Cleanup: Because the
engram.dbis now treated as an ephemeral, instantly-rebuildable cache, "deleting a memory" simply means deleting the.mdfile in the.engrams/folder. - The Visual Graph: As a free byproduct of this architecture, the user can open their A.I.M. workspace in the Obsidian application and see a beautiful, interactive, real-time graphical representation of their project's entire subconscious memory.
- Atomic Architecture (The KISS Manifesto)
- Origin Story
- The Logic Of A.I.M.
- The A.I.M. Handbook (Operator's Manual)
- The Swarm Post Office (Comms Interface)
- The Master Schema
- Waterfall Memory Architecture
- Technical Specification
- Script Map (Core Codebase Map)
- Brain Map (Memory Architecture)
- A.I.M. Prompt Injection Map
- AI Prompt Ledger
- Onboarding Identity Map
- Handoff Architecture Guide
- Reincarnation Map
- TUI Map (Cockpit UI Logic)
- The Global Chalkboard (Concept: Document Data Bus)
- Remote Fleet Architecture (Concept: The Phantom Keyboard)
- The Eureka Protocol (Concept: Live Context Pruning)
- The Sovereign Swarm (Concept: BitTorrent DataJack)
- The Decoupled Brain (Concept: Obsidian Transport Layer)
- Obsidian Bridge Architecture
- Layered Engram Architecture
- The Pragmatic Feature Manifesto
- The Cascading Memory Engine
- Hybrid RAG (Semantic + Lexical)
- Cognitive Routing
- The DataJack Protocol
- Runbook Engram Creation
- The GitOps Bridge
- Feature Quarantine Daemon
- The 30 Percent Rule
- TUI Handoff Report
- The Universal Skills Framework
- Vibe Coding Pipelines (Automated Agentic Assembly)
- Cartridge Farming Ecosystem
- Design Future Architectures
- The Collective Cortex (Vision: SETI@home for AI)
- Sovereign Swarm (P2P) (Architecture: P2P DataJack)
- Eureka Protocol & Synapses (Protocol: Synthetic Data Factory)