Skip to content

🧠 Debate & Memory System ​

MOP implements a high-performance AI Debate Engine that automatically triggers before any critical execution step, using five specialized agents to achieve consensus through structured competition.

1. Debate Participants (Debate Mode) ​

AgentCore ObjectivePrimary Focus
Analyst AgentProblem structuringRisk identification and scoping options
Solution AgentOptimal blueprintEfficiency and swift implementation
Critic AgentDestructive analysisFinding hidden bugs and edge-case errors
Security AgentThreat evaluationChecking file system bounds, secret containment
Optimizer AgentRefinementProposing alternative paths and performance tuning

2. Debate Workflow ​

The debate process follows a strict 6-stage sequence:

[STEP 1] Analyst Agent establishes the initial context and problem structure.
    │
[STEP 2] Solution Agent proposes the optimal blueprint.
    │
[STEP 3] Critic Agent challenges the solution, hunting for structural flaws.
    │
[STEP 4] Security Agent evaluates security constraints and credential hygiene.
    │
[STEP 5] Optimizer Agent offers alternative paths and optimizations.
    │
[STEP 6] The Aggregation Engine weighs all positions and resolves the consensus.

3. Debate Aggregation Engine ​

The Aggregation Engine collects all arguments and calculates a Confidence Score for each agent:

  • Compares arguments and computes position strength scores.
  • Integrates Memory-Based Weighting (if a Solution Agent historically proposed highly stable code, its current blueprint score is weighted higher; if the Critic historically predicted a bug, its current objection is weighted heavier).
  • Identifies contradictions and guarantees a safe fallback resolve.

Every decision resolved by this engine is completely explainable, traceable, and reproducible.


4. SQLite Persistent Memory ​

The Memory System is integrated directly into the debate cycle. The SQLite database consists of:

  • debates - Session metadata, timestamps, trace IDs, and final consensus decisions.
  • arguments - Individual arguments posted by agents during active debate sessions.
  • decision_history - Comprehensive historical log of all finalized actions.
  • agent_opinion_history - Agent opinion records, tracking agent alignment trends over time.

Similarity Lookup ​

Before a debate begins, the system queries the SQLite database for similar past workflows. If a similar past approach resulted in a failed post-flight test or a rollback, the Critic Agent is automatically injected with this historical context. The Critic can then mount a highly targeted argument to prevent repeating the same mistake.

Izgrađeno sa Antigravity & DocKit Premium