Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ritual-ai-multi-agent-system

A full-stack experimental AI system that simulates multiple AI agents interacting, competing, and producing a resolved decision inside a shared environment.

This project extends the previous concepts:

  • Project 1: single AI decision system
  • Project 2: single continuous AI agent
  • Project 3: multi-agent interaction system

What this project does

This system simulates multiple AI agents operating in the same environment:

  • each agent produces independent decisions
  • agents may disagree
  • a resolution layer decides the final outcome
  • the system executes only the resolved decision
  • everything is stored in an audit history

Core idea

Instead of a single AI making decisions, this system introduces:

→ multiple AI perspectives
→ conflicting outputs
→ decision resolution layer
→ collective system behavior

This simulates early-stage “multi-agent intelligence systems”.


Why this matters

Real-world decision systems are rarely single-source:

  • multiple signals exist
  • multiple strategies compete
  • final decisions are often aggregated

This project explores a simplified simulation of that concept using AI agents.


Tech Stack

  • Backend: Node.js + Express
  • Frontend: HTML + CSS + Vanilla JavaScript
  • AI: OpenAI API (optional) + deterministic fallback
  • Storage: file-based JSON state

System architecture

Market State ↓ Multiple AI Agents ↓ Agent Outputs (A / B / C) ↓ Conflict Resolution Layer ↓ Verification Layer ↓ Execution Layer ↓ State Update ↓ History Log


Core features

🧠 Multi-Agent System

  • Multiple independent AI agents
  • Each agent has its own strategy behavior
  • Each produces a separate decision

Example agents:

  • Agent A: aggressive strategy
  • Agent B: conservative strategy
  • Agent C: neutral strategy

⚖️ Conflict Resolution Layer

When agents disagree:

The system resolves decisions using:

  • majority voting
  • weighted logic (optional)
  • override rules

Final decision is produced from this resolution step.


🔍 Verification Layer

  • Ensures final decision consistency
  • Rejects invalid or contradictory outputs
  • Acts as a safety constraint layer

⚙️ Execution Engine

  • Applies final decision to system state
  • Updates:
    • balance
    • asset
    • step counter

Note: This is a simulation only, not real financial execution.


📊 Shared State System

All agents operate on the same state:

  • balance
  • asset
  • step

State only updates after final resolved decision.


🧾 Audit History

Every cycle is recorded:

  • agent A / B / C decisions
  • reasoning from each agent
  • final resolved decision
  • verification result
  • execution result
  • updated state snapshot

API endpoints

Run single cycle


UI features

  • 3-panel dashboard layout

    • Control panel (left)
    • Live execution panel (center)
    • History panel (right)
  • Real-time multi-agent visualization

  • Shows:

    • each agent’s decision
    • reasoning per agent
    • conflict resolution result
    • final decision
  • System status indicator:

    • IDLE
    • RUNNING
    • PAUSED
    • ERROR
  • Monochrome (black / white / gray) design system

  • Smooth transitions and minimal UI noise


Footer

Includes persistent attribution:


How to run

Install dependencies

npm install

npm start

http://localhost:3002

Releases

Packages

Contributors

Languages