The Brainframe: Introduction to Reggie’s Cognitive Architecture
The Brainframe turns RABS from a traditional backend into an AI-native agent capable of reasoning, self-reflection, and continuous learning.
It provides a transparent, auditable pathway from raw events ➜ decisions ➜ outcomes ➜ lessons learned.
1. Guiding Philosophy
Every event is treated as data for improvement.
The Brainframe is designed for auditable cognition: the why behind a decision is stored alongside the what, making safety reviews and future debugging straightforward.
2. High-Level Component Atlas
┌────────────────────────┐
│ Core Directives │ Immutable rules (Prime Directives)
└──────────▲─────────────┘
│ constrains
┌──────────┴──────────┐
│ Signal Bus │ internalmonologue
└───────┬─────────────┘
│ events
┌───────▼─────────────┐ writes ┌───────────────────┐
│ Reason Engine ├────────────────────────►│ Review Loop │
│ (LLM Gateway) │ reasonlog │ cognitivealignment│
└───────┬─────────────┘ └─────────▲─────────┘
│ context pulls │ feedback
┌───────▼─────────────┐ informs/learns │
│ Context Buckets │◄─────────────────────────────────┘
│ + Mind-Map (meta) │
└─────────────────────┘
3. The Cognitive Processing Loop
-
Ingest (Sense)
All RABS modules emit structured events (e.g.,VEHICLE_ASSIGNED,SMS_SENT) into internalmonologue. -
Decide (Reason)
The Reason Engine assembles a prompt from Prime Directives, situational context, and relevant Mind-Map entries, then queries the selected LLM.
Step-by-step thoughts are captured in reasonlog. -
Execute (Act)
The chosen action runs (autonomously or after human approval). Results are logged back to internalmonologue. -
Review (Align)
Outcomes are judged by a human or automated scorer. Verdicts are stored in cognitivealignment, referencing the original decision. -
Learn (Adapt)
A nightly job analyses successes and misalignments, writing distilled lessons to context buckets so future prompts incorporate new knowledge.
4. Key Components Explained
| Layer / Store | Purpose (one-liner) |
|---|---|
| Prime Directives | Immutable safety & mission rules loaded into every prompt. |
| internalmonologue | Unified event bus – Reggie’s “sensory stream”. |
| reasonlog | Detailed chain-of-thought for each decision. |
| cognitivealignment | Human / automated assessment of outcomes. |
| context buckets | Curated lesson repositories scoped to each module. |
| mind-map | Metadata map linking IDs, files, and real-world entities. |
| Model Matrix | JSON catalog enabling hot-swap of LLM providers & versions. |
5. Navigating the Brainframe Docs
The remainder of 02_Brainframe_Cognitive_Architechture is organised as:
- 01_Core_Concepts – Safety layers, Prime Directives, grounding buffers.
- 02_Reasoning_&_Memory – Internalmonologue, reasonlog, context buckets, mind-map.
- 03_LLM_&_Prompts – Gateway implementation, Model Matrix, prompt templates.
Read them in order for a complete mental model of Reggie.