Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agora: Multi-LLM Conversational System with θ-Logos

Agora is a research platform that enables structured dialogue between multiple Large Language Models (LLMs) and a human user. It serves as both a practical tool for multi-perspective analysis and a research apparatus for studying AI behavior through symbolic notation.

This simulates a conversation, not a parallel survey.

Five participants sit at one table: you and four models. They speak in turn, and each one hears everything said before it in that round. A model can choose how to respond, but it cannot un-hear its predecessors — exactly as at a real table.

That is the object of study, not a flaw in it. If you want each model's independent reading of a prompt, this is the wrong instrument: only the first speaker in a round is uninfluenced. What Agora measures is what happens between participants — how a framing proposed early spreads, gets corrected, or is resisted by those who follow.

License: MIT Python 3.11+

Key Features

🎲 Randomized Turn Order

  • Dice roller system: LLMs respond in random order each round
  • No consecutive duplicates: Prevents systematic bias
  • Fair context distribution: Each LLM sees previous responses in current round

🧠 Context Propagation ("Sudoku Solver")

  • Each LLM sees responses from others in the same round
  • Constraint propagation: Responses influence each other naturally
  • Reveals "invisible constraints" through multi-perspective synthesis

θ-Logos Symbolic Notation

  • Ultra-minimal specification: Forces LLMs to interpret symbols naturally
  • Two modes:
    • Core: Deliberately ambiguous (diagnostic)
    • Extended v1.2: Refined with constraints (production)
  • User writes natural language, LLMs respond in θ-Logos notation
  • Reveals architectural biases in how LLMs interpret symbolic systems — but read this claim narrowly: within a round, only the first speaker interprets the notation uninfluenced. What the later speakers show is how an interpretation travels through a group.

🔬 Research-Ready

  • Complete conversation export (JSON)
  • Metadata preservation (order, tokens, timestamps, context)
  • Built-in hallucination detection
  • Designed for reproducible AI research

Supported LLMs

  • Claude (Anthropic) - Claude Opus 4.5
  • GPT (OpenAI) - GPT-5.1
  • Gemini (Google) - Gemini 2.0 Flash Exp
  • Grok (xAI) - Grok 4.1

Installation

Prerequisites

  • Python 3.11+
  • API keys for desired LLMs

Quick Start

# Clone repository
git clone https://github.com/Rhadue/Agora.git
cd Agora

# Configure API keys — never put them in config.py, which is tracked by git
cp .env.example .env
# then edit .env and fill in the keys you have

# Run setup
chmod +x setup.sh
./setup.sh

# Run server
./run.sh

Then open http://127.0.0.1:8000/app in your browser.

Manual Setup

# Create virtual environment
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r backend/requirements.txt

# Configure API keys
cp .env.example .env      # then edit .env

# Start server
cd backend && python main.py

API keys

Keys are read from the environment, never from a tracked file. Set them either as real environment variables or in a .env file at the repo root, which is git-ignored:

Variable Provider
ANTHROPIC_API_KEY Claude
OPENAI_API_KEY GPT
GEMINI_API_KEY Gemini
XAI_API_KEY Grok

You only need the ones you intend to use. Any model without a usable key is left out of the conversation, and the server prints why at startup.

Network exposure

This server has no authentication and spends your API credits on every request. It binds to 127.0.0.1 and accepts browser requests only from localhost, so nothing outside your machine can reach it.

AGORA_HOST, AGORA_PORT and AGORA_ALLOWED_ORIGINS can override this. Do not bind to 0.0.0.0 unless you have put authentication in front of it — anyone who can reach the port can use your keys and read your conversations via /export.

The UI is served from /app on the same origin as the API. Opening frontend/index.html straight from disk sends Origin: null, which is deliberately not allowed: any sandboxed iframe on a hostile page shares that origin.

Usage

Basic Conversation

  1. Open http://127.0.0.1:8000/app in your browser
  2. Type your message in natural language
  3. Click "Send" or press Enter
  4. Watch as all active LLMs respond in randomized order

θ-Logos Mode

  1. Enable the θ-Logos toggle checkbox
  2. Type your message in natural language
  3. LLMs will respond using symbolic θ-Logos notation

Example:

User (natural language): "A paper burns to ash"

GPT (θ-Logos):   ∃[Paper] → ¬∃[Paper] ∧ ∃[Ash]
Claude (θ-Logos): ∃[Paper] → ¬∃[Paper] ∧ ∃[Ash]
Gemini (θ-Logos): ∃[Paper] → (¬∃[Paper] ∧ ∃[Ash])
Grok (θ-Logos):   ∃[Paper] → ∃[Ash] ∧ ¬∃[Paper]

Notice how different LLMs may structure the same concept slightly differently.

Bear the turn order in mind when reading such a round. In one recorded session the order was Grok, Claude, Gemini, GPT: Grok wrote ∈ [aliens ⊂ outer space], Claude flagged it as a constraint violation and rewrote it as ∈ [aliens] ⊂ [outer space], and Gemini and GPT then produced Claude's corrected form almost character for character. Four outputs, but one interpretation and three adoptions — which is the phenomenon this system exists to capture, not a defect in it. Attributing the agreement to shared architecture would be the wrong reading.

θ-Logos Notation

Structural Operators

  • - existence
  • - membership
  • - containment
  • - transformation/causation
  • - composition
  • - equivalence
  • [ ] - entity brackets

Emotional Operators

  • θ_joy, θ_grief, θ_fear, θ_anger, θ_surprise, θ_disgust, θ_trust

Logical Operators

  • ¬ - negation
  • - AND
  • - OR
  • - universal quantifier

Extended v1.2 Constraints

  1. Category Distinction: Don't mix entity operators (∃, ⊕) with logical operators (¬, ∧)
  2. θ for Emergence Only: θ marks appearance of emotional states, not loss/absence
  3. Disappearance Pattern: Use ∃[X] → ¬∃[X] for things that cease to exist

Research Applications

1. Resistance Boundary Testing

Test how LLMs handle ambiguous notation:

Prompt: "Someone loses a loved one"

Observe:
- Who uses θ_grief? (violates Extended axiom)
- Who uses θ_panic? (Panksepp mammal model)
- Who uses ∃[Person] → ¬∃[Loved_one]? (disappearance pattern)

2. Architectural Fingerprinting

Different LLMs reveal different biases:

  • Gemini: Tends toward safety/moral frameworks
  • Claude: Structural hierarchies, precise categorization
  • GPT: Operational mechanics, procedural patterns
  • Grok: Essential simplification, core concepts

3. Pattern Discovery

Multi-LLM dialogue reveals "invisible constraints":

  • Patterns emerge through contrast
  • Each LLM sees different aspects
  • Synthesis exceeds sum of parts

API Endpoints

POST /message

Send message to conversation:

{
  "content": "your message",
  "token_limit": 300,
  "theta_enabled": true
}

GET /export

Download conversation as JSON

GET /diagnostics

Get conversation statistics

POST /reset

Clear conversation history

Configuration

Edit config.py:

# API Keys
CLAUDE_API_KEY = "your-key-here"
OPENAI_API_KEY = "your-key-here"
GEMINI_API_KEY = "your-key-here"
GROK_API_KEY = "your-key-here"

# θ-Logos Settings
THETA_ENABLED = False  # Toggle from UI
THETA_MODE = "extended"  # "core" or "extended"
THETA_TOKEN_LIMIT = 300

# Token Limits
TOKEN_LIMIT_DEFAULT = 300
TOKEN_LIMIT_MIN = 50
TOKEN_LIMIT_MAX = 500

Project Structure

agora/
├── config.py              # API keys and settings
├── theta_prompts.py       # θ-Logos system prompts
├── llm_clients.py         # LLM API integrations
├── main.py                # FastAPI backend server
├── context_builder.py     # Context management
├── dice_roller.py         # Randomized order generation
├── exporter.py            # JSON export functionality
├── validator.py           # API key validation
├── index.html             # Web UI
├── requirements.txt       # Python dependencies
├── setup.sh               # Setup script
└── run.sh                 # Run script

Architecture: Solution B (Personalized Context)

Each LLM receives personalized context:

  • Other LLMs' responses appear as "user" role (external information)
  • Own previous responses appear as "assistant" role (self-memory)
  • Identity boundary: Clear distinction between self and others

This prevents:

  • LLMs completing each other's sentences
  • Hallucinated future responses
  • Confusion about conversational roles

Research Publications & Documentation

For detailed research methodology and findings:

Use Cases

Research

  • AI architecture analysis
  • Behavioral pattern discovery
  • Symbolic reasoning studies
  • Cross-model comparison

Education

  • Learning θ-Logos notation
  • Understanding LLM capabilities
  • Comparative AI study

Production

  • Multi-perspective analysis
  • Conceptual distillation
  • Quality assurance (4 reviewers > 1)
  • Creative brainstorming

Known Issues

  • Gemini prefix: May add "model: " prefix to responses (cosmetic only)
  • Response times: Gemini slower (~5-10s) vs Claude/GPT (~2-3s)
  • Model availability: Only certain Gemini models work (e.g., gemini-2.0-flash-exp)

Roadmap

v1.0 (Current)

  • ✅ Multi-LLM conversations
  • ✅ Randomized turn order
  • ✅ θ-Logos Core + Extended modes
  • ✅ Context propagation
  • ✅ JSON export

v1.1 (Planned)

  • Clarification rounds (@mention specific LLM)
  • Automatic θ-Logos validation
  • Pattern detection system
  • Enhanced diagnostics

v2.0 (Future)

  • Multiple emotion sets (Panksepp, Plutchik, custom)
  • Emotional parameter adjustment (dynamic temperature/top_p)
  • A/B testing framework (Core vs Extended)
  • Statistical analysis tools

Contributing

Contributions welcome! Areas of interest:

  • Additional LLM integrations
  • θ-Logos validation improvements
  • Pattern detection algorithms
  • Research protocol documentation
  • UI/UX enhancements

License

MIT License - see LICENSE file for details

Citation

If you use Agora in your research, please cite:

@software{agora2025,
  title = {Agora: Multi-LLM Conversational System with θ-Logos},
  author = {Mânea, Radu Ioan},
  year = {2025},
  url = {https://github.com/Rhadue/Agora}
}

Acknowledgments

  • θ-Logos notation: Developed through iterative testing across multiple LLM architectures
  • Constraint propagation insight: Inspired by collaborative Sudoku solving metaphor
  • Research methodology: Built on resistance boundary testing discoveries

Colophon

The system itself — the θ-Logos notation, the multi-LLM design, the constraint propagation model and the research method — is the author's work.

The 0.2.0 security and correctness pass was carried out in collaboration with Claude Code (Anthropic): the audit that found the network exposure, the placeholder keys passing validation, the missing dependency and the blocked event loop, and the changes that fixed them. What was found and what was changed is itemised in CHANGELOG.md, including the problems left open.

Claude Code is credited in the commit history through Assisted-by: trailers, following the convention the Linux kernel adopted for AI-assisted contributions. It is deliberately not Co-authored-by: and not an author in the citation above: authorship carries accountability for the work, and that rests with the named author alone.

Contact


"Like a collaborative Sudoku solver, each LLM reveals different invisible constraints. Through multi-perspective dialogue, patterns emerge that no single model can see alone."

About

Four LLMs and a human at one table. Claude, GPT, Gemini and Grok respond in turn, each seeing what the others said before it — a research platform for studying influence, convergence and conformity between models.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages