AI Brain Blueprint
The complete architecture of an AI brain system. Understand how every component connects and works together to create an autonomous AI workforce. See how it works →
System Architecture
Want to go deeper? Read the context engineering guide for how these layers interact at runtime.
Screen memory — captures everything you see and hear. Searchable AI memory for your entire digital life.
Identity, rules, architecture decisions, conventions — your AI's operating manual
Multi-model support — route tasks to Haiku (fast), Sonnet (balanced), or Opus (deep) by complexity
11 OpenClaw + 98 Ruflo swarm + 150+ Agency Agents personalities (engineering, design, sales, marketing, testing, game dev)
1,703 global + 35 project SKILL.md files — verified count, loaded on demand per task
Auditor-gated knowledge promotion, safety checks, approval gates
Session → Working → Knowledge Base → Agent Memory → Knowledge Graph → Daily Archive
Knowledge graph (MCP), semantic search, retrieval-augmented generation
Hybrid backend — SQLite structured data + HNSW vector search for sub-millisecond semantic retrieval
330+ tool connections — GitHub, Slack, Apify, SerpAPI, Ruflo MCP (310+ tools), Browserbase, and more
Bidirectional sync — daily logs, decision records, tool reviews, linked knowledge vault
Multi-agent swarms — Queen/worker topology, consensus coordination, autopilot mode, anti-drift gates
Slash commands (/start, /sync, /wrap-up) + 10 Ruflo command groups + 7 automated hook types
Observation → Nomination → Auditor Review → Knowledge Promotion (RETRIEVE → JUDGE → DISTILL)
Agent Lightning patterns — structured rewards, triplet learning, prompt optimization, per-agent metrics
Multi-dimensional scoring — correctness, efficiency, cost, quality per task per agent
Gate 1: Security (no telemetry, no keys, no exfiltration). Gate 2: Quality (maintained, documented, useful).
CVE detection, threat modeling, vulnerability scanning, input validation at system boundaries
Company orchestration — org charts, department workflows, budgets, governance for multi-agent teams
Cross-instance messaging — Claude sessions discover and coordinate across machines and projects
Ruflo consensus coordination — Byzantine fault tolerance, gossip protocols, distributed decision-making
Why This Structure Exists
This isn't just folder organization. Each component solves a specific problem that makes AI unpredictable without it.
CLAUDE.md is the single source of truth
Without it, every session starts from zero. With it, AI has persistent identity, rules, and context from the first message.
Skills are modular files, not inline prompts
Reusable across projects and sessions. Version-controlled. No more copy-pasting the same instructions.
Hooks are separate from commands
Hooks are deterministic safety checks (always run). Commands are triggered workflows (run when asked). Mixing them creates unpredictable behavior.
Memory has 7 tiers, not 1
Session context expires. Working memory gets pruned. Knowledge persists forever. Different lifespans need different storage — just like human memory.
The auditor gates knowledge promotion
Not every observation deserves permanent storage. The auditor reviews nominations before they become rules — preventing knowledge base bloat and contradictions.
Agent-to-agent communication via files
Agents hand off context through shared memory files, not fragile API calls. File-based state is inspectable, debuggable, and survives crashes.
Key Files & Directories
7-Tier Memory Architecture
See the full deep-dive in the memory system guide.
| Tier | Scope | Storage | Retention |
|---|---|---|---|
| 1. Session | Current conversation | Context window | Until session ends |
| 2. Working | Active task | memory.md | Pruned weekly |
| 3. Knowledge | System rules | knowledge-base.md | Permanent (auditor-gated) |
| 4. Agent | Per-agent | agent-memory/ | Permanent |
| 5. Graph | Structured relations | MCP knowledge graph | Permanent |
| 6. Vector | Semantic embeddings | Ruflo HNSW + SQLite | Permanent |
| 7. Archive | Daily logs | memory/ directory | Permanent |
Self-Improvement Loop
This system doesn't just follow instructions — it learns from experience and improves its own operating procedures. Here's how:
/retro retrospectives and tracks performance in PERFORMANCE.md — creating a continuous evaluation and improvement cycle. Every session makes the next one better.Evaluation & Observability
Production AI systems need monitoring. Our architecture includes built-in tracing, audit trails, and quality gates.
Audit Trail
Every hook logs actions to .claude/logs/. Full history of what the AI did and why.
Quality Gates
The Auditor agent reviews work quality before it ships. The /audit command triggers on-demand reviews.
Performance Tracking
Token usage, task completion rates, and context health monitored across sessions via PERFORMANCE.md.
Get the Full Blueprint — Pre-Configured
Our Pro package delivers this entire system ready to run. One command, 5 minutes, fully operational.
View Pricing