System architecture, design patterns, and technical specifications.
- Backend Architecture - Backend system design
- Database Schema - Database structure and relationships
- Database Standardization - Database standards
- BYOK Implementation Summary - BYOK overview
- BYOK LLM Integration Complete - Complete LLM integration
- BYOK V6 Migration Guide - Migration to v6.0
- Cognitive Tier System - 5-tier LLM routing (rule-based)
- Learning LLM Router - Per-model satisfaction predictors that re-rank BPC candidates from observed outcomes; DB-persisted feedback, live
/api/chat/feedback, quality signals, flag-gated ✨
- Workbook Runtime ✨ - Excel engine: LibreOffice headless (recalc + pixel-accurate render + structural edits) →
formulaslibrary → openpyxl cached values; replaces openpyxl-as-parser so agents see computed results - Mini-Apps ✨ NEW (design) - Long-running stateful document apps (spreadsheets/docs/decks) on canvases. MVC: Canvas=View, CanvasLogic=Controller, MiniApp manifest=Model; wraps the real office engine. Platform is the harness (P1→P3→P4→P9); viewer rights always cap declared scopes.
- Context Memory (Per-Turn Fact Extraction) - Hermes-style durable-fact extraction layer;
sync_turn+on_pre_compresshooks; two-tier recall (SQL + LanceDB); extraction-first over compression-first ✨ - AgentRadio (Lateral Coordination) ✨ NEW - Passive-awareness peer-to-peer messaging between agents (3
radio.*actions: create_thread / send_message / wait_for_mention). Mention-first, cost-governed, breakpoint-gated; a fixed team is never the default. Complements (does not replace) Conductor/Fleet/Queen orchestration. - Atom vs. Hermes Comparison - Evidence-based capability matrix, decision log, and what Atom deliberately didn't build (and why)
- Pre-Action Match-Confidence Layer - Pre-action selector-certainty scorer mirroring the post-action
VerifiedOutcometri-state; gates ambiguous/partial matches through ProposalService for ALL tiers (including AUTONOMOUS) ✨ - Selector Confidence Thresholds - One-pager on tuning env vars, score curve, per-agent opt-out
- Switchyard Gap Analysis & Stage Router ✨ NEW (Aug 2026) — Shadow-first turn-level LLM routing inside the ReAct loop: signal-driven tier switching (efficient/capable), weighted-random A/B harness, calibration script (
calibrate_stage_router.py), consent-gated automation (off/notify/approve/auto), per-workload policy override. Closes the Switchyard gap for cost-aware mid-run routing.
- Agent Hybrid Search (BM25 + Vector RRF) ✨ NEW (Aug 2026) -
documents.searchfused from two legs via Reciprocal Rank Fusion (k=60): BM25 over FTS5 (SQLite) / tsvector+GIN (Postgres) + 1536-dim LanceDB ANN. Join-key bridge (pg_document_id) closes the PG↔LanceDB silo; legacy ILIKE fallback ladder; multi-source legs (episodes/turn_facts/reasoning-steps) are additive. - Knowledge VFS ✨ NEW (Aug 2026) - Agent-native virtual document tree under
knowledge/—documents.ls/cat/grep/head/tail/search/…(11 actions) with line-numbered, VFS-citable content (knowledge/documents/<id>/content.lines:L47). Additive, flag-gated (ATOM_KNOWLEDGE_VFS_ENABLED), legacy ILIKE preserved as kill-switch path. Composes with hybrid search: search finds the doc, VFS cites the line.
- Postcondition Oracle & Two-Tier Confidence ✨ NEW (Aug 2026) - Closes the self-attestation gap:
tool_outcome_verifiergrades the tool's own return, the oracle re-derives success against the system of record (DB read-back) independently. OnlyEXTERNAL_VERIFIEDis credible;INTERNAL_HIGH(incl. LLM tiebreak) is not. Verify-before-retry (arXiv 2608.02645) prevents duplicate side effects. Flag:ATOM_ORACLE_VERIFIER_ENABLED(default on). - Reviewer Re-delegation Loop ✨ NEW (Aug 2026) - REVIEW strategy: rejected candidates are re-delegated to the originating specialist with the reviewer's feedback, not swapped or debated (deliberately not multi-round debate — Debate-or-Vote martingale, Cost-of-Consensus sycophancy). Pairs with diversity-aware MoA sampling (P4a).
- Agent Environment (Goal-Driven Loop) ✨ NEW (Aug 2026) - Phase 5 of the Stanford-biotech-insights program: objective +
definition_of_donetermination predicate (no more always-max_steps), maturity success ratio as explicit utility target, maturity-gated custom action surface (register_action), stuck-detector. Flag:ATOM_OBJECTIVE_LOOP_ENABLED(default on). - Self-Evolving Harness - Offline Meta-Runtime: mines
agent_reasoning_stepsfailure clusters, proposes micro-patches to the harness, runs regression tests in an isolated sandbox, deploys mutated config. Kills "loopmaxxing" in live sessions.
- Production-Ready Security Hardening (P0–P9) ✨ NEW (Aug 2026) - Start here. Ten-phase hardening overview: default-on sandbox for all dispatch paths, encrypted credentials, per-agent capability bindings, outbound gatekeeper, data-taint tracking, credential-safe sharing, external MCP client, per-canvas runtime, workspace context.
- Execution Sandbox Layer ✨ - Deterministic blast-radius
layer (Rounds 43-47). Five phases: (A) policy + audit table, (B) filesystem
scope, (C) tripwires + resource caps + KillRun, (D) Firecracker microVM +
dual-proxy egress, (E) provenance tagging + LLM ActionJudge. Default-on
enforcement since P9 (Aug 2026) for all dispatch paths via shared
core/sandbox_gate.py— closes the "tier is routing, not security" gap documented in ../security/TRUST_VS_SANDBOX.md. - Self-Consistency Voter - N-sample majority vote on structured plans (Round 42). Composes with sandbox — voter gates plan agreement, sandbox bounds execution scope.
- Match-Confidence Layer - (See Memory & Context above.) Pre-action selector certainty; Phase E provenance layer extends this to context-window chunks.
- Fleet Orchestration (CSO→Division→Specialist Wiring) ✨ NEW (Aug 2026) - The previously-dead
route_with_governancepath wired into liveAtomMetaAgent.execute(); realSpecialistMatcherwith ranked candidates (capability overlap + tier + verified-episode ratio), depth-enforced delegation nesting (DelegationChain.max_depth), fleet budget/memory hooks. Flag:ATOM_FLEET_ROUTING_ENABLED(default off — live-traffic change). - Swarm Coordination ✨ - Three patterns from
Cursor swarm research for coordinating many concurrent agents on a shared
codebase:
- Stigmergic Field Guide (
core/field_guide_service.py): per-workspace agent-curated ops manual, auto-injected into system prompts, persisted in thefield_guidestable (PostgreSQL) with a filesystem fallback for local dev. 50-line budget, deduplicated,SELECT FOR UPDATEconcurrency. - Parallel Branch Reconciler (
ConductorAgent._reconcile_branch_conflicts): neutral third-party mediator that merges per-key output from diverging parallel branches instead of discarding minority work. - Megafile & Bloat Tripwire (
sandbox_tripwire.MegafileDetector): tracks file edits per loop; blocks hotspot megafiles (>800 LOC or ≥5 edits/loop) and emitsHarnessEvolutionService-compatible patch proposals.
- Stigmergic Field Guide (
- Decorator Application Complete - Decorator patterns
- API Reference - Architecture API reference
- Database Session Guide - Session management
┌─────────────────────────────────────────┐
│ Presentation Layer │
│ (Next.js + TypeScript) │
├─────────────────────────────────────────┤
│ API Layer (FastAPI) │
│ REST + WebSocket + Streaming │
├─────────────────────────────────────────┤
│ Business Logic Layer │
│ Agent Governance | LLM | Canvas | Tools │
├─────────────────────────────────────────┤
│ Data Access Layer │
│ SQLAlchemy ORM + Repository Pattern │
├─────────────────────────────────────────┤
│ Data Storage Layer │
│ PostgreSQL | Redis | LanceDB | Files │
│ (Personal Edition: SQLite + embedded │
│ file-based LanceDB — no servers) │
└─────────────────────────────────────────┘
class AgentRepository:
def get(self, agent_id: str) -> Agent:
return db.query(Agent).filter(Agent.id == agent_id).first()class AgentGovernanceService:
def can_execute_action(self, agent_id: str, action: str) -> bool:
# Business logic here
pass@app.get("/agents/{agent_id}")
def get_agent(agent_id: str, db: Session = Depends(get_db)):
return agent_service.get_agent(agent_id, db)- Each component has one clear purpose
- Services handle business logic
- Repositories handle data access
- Controllers handle HTTP concerns
- Frontend and backend are separate
- Business logic independent of frameworks
- Data access abstracted behind repositories
- Every AI action is attributable
- Maturity-based access control
- Complete audit trail
- Sub-millisecond cached governance checks
- Hybrid storage (hot + cold)
- Efficient database queries with proper indexing
- users: User accounts
- workspaces: Tenant/workspace isolation
- agent_registry: Agent definitions
- agent_executions: Execution history
- agent_reasoning_steps: Persisted ReAct steps (thought/action/observation)
- turn_facts: Durable facts extracted per-turn (see Context Memory)
- episodes: Episodic memory
- canvases: Canvas presentations
users (1) → (N) workspaces
workspaces (1) → (N) agent_registry
agent_registry (1) → (N) agent_executions
agent_registry (1) → (N) episodes
episodes (1) → (N) episode_segments
- Performance: ASGI support, async/await
- Type Safety: Automatic validation with Pydantic
- Documentation: Auto-generated OpenAPI docs
- Modern: Python 3.11+ features
- Reliability: ACID compliance
- Features: JSONB, CTEs, full-text search
- Performance: Excellent query optimization
- Extensibility: Custom functions, extensions
- Performance: Server-side rendering
- Developer Experience: React + TypeScript
- Ecosystem: Rich component library
- SEO: Built-in optimization
- Technical Overview - Technical overview
- Code Structure - Code organization
- Database Architecture - Database design
Last Updated: August 8, 2026