Skip to content

Architecture Overview

Brian Vasquez edited this page May 20, 2026 · 3 revisions

Architecture Overview

A.I.M. uses a Decoupled Exoskeleton architecture. It does not use a standard RAG pipeline. Its core insight is separating the "frontal lobe" (active coding) from the "subconscious" (memory indexing and long-term storage).

1. The Dual-Search Brain

A.I.M. maintains two types of memory to prevent the "photograph effect" of pure vector search:

  • The Persistent LLM Wiki: A human-readable, structural Markdown knowledge base (memory-wiki/) that acts as the ultimate source of truth.
  • The LanceDB Memory Pool: A high-fidelity, native LanceDB vector database (memory_lance) utilizing Hybrid RAG (semantic embeddings + Tantivy FTS lexical search) and Reciprocal Rank Fusion.

2. The Subconscious Daemon

Instead of forcing the active coding agent to index its own memory (which wastes expensive flagship model tokens), A.I.M. uses an event-driven "Subconscious Daemon". When a session ends via the Direct Python Handoff, a script natively chunks the flight recorder using a Length-Constrained Accumulator. The daemon (running a cheaper model) then wakes up in the background, embeds the vectors directly into LanceDB RAM, and elegantly weaves the core takeaways into the markdown Wiki.

3. The Syncthing / Obsidian Bridge

Because the ultimate source of truth is a pure, native Markdown directory (memory-wiki/), A.I.M. allows you to offload the heavy LLM memory jobs to a secondary server. You simply sync the project folder using a P2P tool like Syncthing, and a headless A.I.M. daemon on your local GPU rig watches the ingest folder, compiles the memory, and syncs the updated Wiki pages back to your primary laptop—giving you a real-time, visual Obsidian knowledge graph across machines.

4. The GitOps Bridge

A.I.M. intercepts the agent's workflow to enforce a strict, atomic development lifecycle:

  1. aim bug: Forces the agent to define the Commander's Intent and create a ticket.
  2. aim fix <id>: Mechanically spawns an isolated Git Worktree.
  3. aim push "msg": Parses Conventional Commits and deploys the branch atomically. This prevents "agent drift" and ensures that if an agent hallucinates, the damage is quarantined to a disposable Worktree.

5. Sandboxed Skills & The DataJack Protocol

Capabilities are extended via a modular skill system executed within a secure bubblewrap sandbox. The DataJack protocol allows you to package massive, pre-embedded documentation sets into highly-compressed, Native Apache Arrow .parquet cartridges. These are shared globally via a decentralized BitTorrent swarm (aim_torrent.py) and mounted locally using Zero-Copy reads, bypassing expensive embedding API calls entirely.

Navigation

Deep Dives & Philosophy

👉 A.I.M. Knowledge Base (Explore the full design history, benchmarks, and architectural maps in our public Obsidian vault).

Clone this wiki locally