Aragora Architecture
Last Updated: 2026-01-21
This document describes the high-level architecture of Aragora, the control plane for multi-agent vetted decisionmaking across organizational knowledge and channels. The multi-agent debate system is the engine that powers adversarial validation and decision assurance.
System Overview
┌─────────────────────────────────────────────────────────────────────────────┐
│ ARAGORA SYSTEM │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌───────────────────────────────────────────────────────────────────────┐ │
│ │ AGENT LAYER │ │
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
│ │ │ Claude │ │ Codex │ │ Gemini │ │ Grok │ │ OpenAI │ │ │
│ │ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ │ │
│ │ │ │ │ │ │ │ │
│ │ └───────────┴─────┬─────┴───────────┴───────────┘ │ │
│ │ ▼ │ │
│ │ ┌─────────────────────────────────────────────────────────────────┐ │ │
│ │ │ PersonaManager + EloSystem │ │ │
│ │ │ Traits, Expertise, Skill Ratings, Selection │ │ │
│ │ └─────────────────────────────────────────────────────────────────┘ │ │
│ └───────────────────────────────────────────────────────────────────────┘ │
│ ▼ │
│ ┌───────────────────────────────────────────────────────────────────────┐ │
│ │ DEBATE LAYER │ │
│ │ ┌─────────────────────────────────────────────────────────────────┐ │ │
│ │ │ Arena (Orchestrator) │ │ │
│ │ │ Role Assignment • Round Management • Context Accumulation │ │ │
│ │ └─────────────────────────────────────────────────────────────────┘ │ │
│ │ │ │ │
│ │ ┌──────────────┬───────────────┼───────────────┬──────────────────┐ │ │
│ │ ▼ ▼ ▼ ▼ ▼ │ │
│ │ DebateGraph DebateForker Protocol ConvergenceDetector Tracer│ │
│ │ (DAG-based) (Parallel) (Sequential) (Early Stop) (Audit)│ │
│ └───────────────────────────────────────────────────────────────────────┘ │
│ ▼ │
│ ┌───────────────────────────────────────────────────────────────────────┐ │
│ │ REASONING LAYER │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │ │
│ │ │ClaimsKernel │ │BeliefNetwork│ │ProofExecutor│ │FormalVerifier │ │ │
│ │ │(Structured) │ │(Probabilist)│ │(Executable) │ │(Z3/Lean) │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────────┘ │ │
│ │ │ │ │
│ │ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ Provenance │ │ Reliability │ │ │
│ │ │ (Evidence) │ │ (Confidence)│ │ │
│ │ └─────────────┘ └─────────────┘ │ │
│ └───────────────────────────────────────────────────────────────────────┘ │
│ ▼ │
│ ┌───────────────────────────────────────────────────────────────────────┐ │
│ │ MEMORY LAYER │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │ │
│ │ │ContinuumMem │ │MemoryStream │ │ConsensusMem │ │SemanticRetriever│ │ │
│ │ │(Timescales) │ │(Per-Agent) │ │(Topic Track)│ │(Embeddings) │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────────┘ │ │
│ │ │ │ │
│ │ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │CritiqueStore│ │InsightStore │ │ │
│ │ │(Patterns) │ │(Learning) │ │ │
│ │ └─────────────┘ └─────────────┘ │ │
│ └───────────────────────────────────────────────────────────────────────┘ │
│ ▼ │
│ ┌───────────────────── ──────────────────────────────────────────────────┐ │
│ │ PERSISTENCE LAYER │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │ │
│ │ │ SQLite │ │ Supabase │ │ Checkpoint │ │ Replays │ │ │
│ │ │ (Local DB) │ │ (Cloud) │ │ (Recovery) │ │ (History) │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────────┘ │ │
│ └───────────────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
Directory Structure
aragora/
├── agents/ # Agent implementations
│ ├── base.py # Abstract Agent class
│ ├── cli_agents.py # CLI tool wrappers (Claude, Codex, etc.)
│ ├── api_agents.py # API-based agents (Anthropic, OpenAI, etc.)
│ ├── fallback.py # QuotaFallbackMixin for provider failover
│ ├── streaming.py # StreamingMixin for SSE parsing
│ ├── personas.py # PersonaManager for agent traits
│ ├── laboratory.py # PersonaLaboratory for A/B testing
│ ├── prober.py # CapabilityProber for quality assurance
│ ├── grounded.py # GroundedPersona (truth-based personas)
│ ├── relationships.py # RelationshipTracker (agent relationships)
│ └── positions.py # PositionTracker (position history)
│
├── debate/ # Core debate infrastructure
│ ├── orchestrator.py # Arena class (~1,500 LOC - coordinator role)
│ ├── arena_initializer.py # ArenaInitializer (extracted initialization)
│ ├── phase_executor.py # PhaseExecutor (orchestrates all phases)
│ ├── context.py # DebateContext (shared state across phases)
│ ├── memory_manager.py # MemoryManager (extracted from orchestrator)
│ ├── prompt_builder.py # PromptBuilder (extracted from orchestrator)
│ ├── convergence.py # ConvergenceDetector (semantic similarity)
│ ├── graph.py # DebateGraph (DAG-based debates)
│ ├── forking.py # DebateForker (parallel branches)
│ ├── checkpoint.py # CheckpointManager (recovery)
│ ├── breakpoints.py # DebateBreakpointManager
│ └── phases/ # Phase executors (18 modules)
│ ├── context_init.py # Phase 0: Context initialization
│ ├── proposal_phase.py # Phase 1: Initial proposals
│ ├── debate_rounds.py # Phase 2: Critique/revision loop
│ ├── consensus_phase.py # Phase 3: Voting and consensus
│ ├── analytics_phase.py # Phases 4-6: Metrics and insights
│ ├── feedback_phase.py # Phase 7: ELO and memory updates
│ ├── vote_collector.py # Vote collection logic
│ ├── vote_aggregator.py # Vote aggregation
│ ├── vote_weighter.py # Vote weight calculation
│ ├── weight_calculator.py# Reputation/calibration weights
│ ├── consensus_verification.py # Result verification
│ ├── roles_manager.py # Role/stance assignment
│ ├── critique_generator.py # Parallel critique generation
│ ├── revision_phase.py # Parallel revision generation
│ ├── evidence_refresh.py # Evidence refresh during rounds
│ └── context_compressor.py # RLM context compression
│
├── reasoning/ # Logical reasoning components
│ ├── claims.py # ClaimsKernel (structured claims)
│ ├── belief.py # BeliefNetwork (probabilistic)
│ ├── crux_detector.py # CruxDetector (pivotal claim identification)
│ ├── provenance.py # ProvenanceManager
│ ├── reliability.py # ReliabilityScorer
│ └── risk.py # RiskRegister
│
├── verification/ # Verification subsystems
│ ├── executor.py # ProofExecutor (code execution)
│ ├── formal.py # FormalVerificationManager (Z3)
│ └── scenarios.py # ScenarioMatrix
│
├── memory/ # Memory systems
│ ├── store.py # CritiqueStore (SQLite patterns)
│ ├── continuum/ # ContinuumMemory (timescales)
│ ├── stream.py # MemoryStream (per-agent)
│ ├── consensus.py # ConsensusMemory (topic tracking)
│ └── embeddings.py # SemanticRetriever
│
├── evolution/ # Self-improvement
│ ├── prompts.py # PromptEvolver
│ └── meta.py # MetaLearner
│
├── connectors/ # External data sources
│ ├── base.py # BaseConnector protocol
│ ├── local_docs.py # LocalDocsConnector
│ ├── github.py # GitHubConnector
│ ├── web.py # WebConnector
│ ├── youtube_uploader.py# YouTubeUploaderConnector (OAuth 2.0)
│ └── twitter_poster.py # TwitterPosterConnector (OAuth 1.0a)
│
├── maintenance/ # System maintenance utilities
│ └── db_maintenance.py # DatabaseMaintenance (WAL, VACUUM)
│
├── monitoring/ # System monitoring
│ └── simple_observer.py # SimpleObserver (agent failure tracking)
│
├── resilience.py # CircuitBreaker for agent failure handling
│
├── visualization/ # Debate visualization
│ ├── mapper.py # ArgumentCartographer
│ └── exporter.py # Graph export utilities
│
├── live/ # Live dashboard (Next.js)
│ ├── src/ # React components
│ └── public/ # Static assets
│
├── server/ # WebSocket/HTTP server
│ ├── unified_server.py # Unified server (2,000+ API operations)
│ ├── handlers/ # Request handlers by domain
│ │ ├── base.py # BaseHandler, ttl_cache decorator
│ │ ├── debates.py # Debate CRUD and exports
│ │ ├── agents.py # Agent profiles and rankings
│ │ ├── analytics.py # System analytics
│ │ └── ... # 41 handler modules
│ └── stream/ # Streaming infrastructure (refactored)
│ ├── servers.py # WebSocket server classes
│ ├── broadcaster.py # Event broadcasting
│ ├── state_manager.py # Connection state