Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ritual-ai-agent-simulator

A full-stack experimental system that simulates a continuously running AI agent that makes decisions over time under a deterministic execution and verification layer.

This project extends the idea from a single-shot AI decision system into a continuous agent-based execution loop.


What this project does

This system simulates an autonomous AI agent that runs in cycles:

Each cycle:

  1. Market conditions are generated or provided
  2. AI produces a decision (BUY / SELL / HOLD)
  3. Verification layer validates the decision
  4. Execution layer updates system state
  5. Result is stored in history

Unlike a single decision system, this one runs continuously over time.


Core idea

This project explores agent behavior over time, not just single outputs.

Instead of:

→ Input → AI → Output

It becomes:

→ Looping system → AI → Verification → Execution → State evolution


Why this matters

Most AI systems today are stateless:

  • they respond once
  • they do not evolve

But real-world systems often require:

  • persistence
  • memory
  • sequential decision-making

This project explores a minimal simulation of that idea.


Tech Stack

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

System architecture

Agent Loop ↓ AI Decision Layer ↓ Verification Layer ↓ Execution Layer ↓ State Update ↓ History Log ↺ (repeats over time)


Core features

🧠 AI Agent Loop

  • Runs step-by-step or continuously
  • Produces decisions per cycle
  • Simulates autonomous behavior

🔍 Verification Layer

  • Validates AI output consistency
  • Rejects contradictory or invalid decisions

⚙️ Execution Engine

  • Updates simulated portfolio state:
    • balance
    • asset
    • step counter

📊 State Evolution

  • System state evolves over time
  • Each cycle modifies the environment

🧾 Audit History

  • Stores all cycles
  • Includes:
    • input
    • decision
    • verification result
    • execution result
    • updated state

API endpoints

Run single cycle


UI features

  • 3-panel dashboard layout
    • Input / Control panel
    • Live execution panel
    • History panel
  • Real-time agent updates
  • System status indicator:
    • IDLE
    • RUNNING
    • PAUSED
    • ERROR
  • Subtle animations (typing + transitions)
  • Monochrome (black / white / gray) design system

Footer

Includes persistent attribution:


How to run

Install dependencies

npm install

npm start

http://localhost:3001

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages