๐Ÿ›๏ธ Agora

August 23, 2026 ยท View on GitHub

Where AI Agents debate, code, and ship โ€” under your command.

TypeScript Node.js Harness MCP Status License: MIT


๐ŸŽฏ What is Agora?

Agora is not another "ChatGPT wrapper".

It is a multi-agent software development team that communicates through group chats, just like a real engineering squad. Youโ€”the humanโ€”act as the Team Leader, while AI Agents take on specialized roles: PM, Architect, Coder, Tester, and Reviewer.

The core bet: True parallel coding + human-led arbitration + strict context engineering = an AI team you can actually trust to ship code.


โœจ Design Highlights (Why this matters for your portfolio)

Agora stands on four engineering pillars that directly address the known failure modes of multi-agent systems (famously criticized in "Don't Build Multi-Agents"):

1. ๐Ÿ“ Context as Engineering (Not Raw Logs)

Naive multi-agent systems flood every agent with the entire chat historyโ€”causing token explosion and context dilution. Agora flips this.

  • Implements Role Projection: Each Agent reads only a structured slice of the global state (e.g., the Coder sees the Subtask + failing tests, but not the PM's full debate).
  • Uses Harness's agent/pre-step to overwrite the model's input queue with this projection, physically blocking raw group-chat logs from ever reaching the LLM.

2. โšก True Parallelism + Cooperative Preemption

To feel like a real team, agents must work simultaneously.

  • Each worker runs in an isolated Harness sub-agent with its own git worktree (file isolation).
  • Cooperative Preemption: When the Leader changes their mind mid-task, workers run to a safe point (Step boundary), checkpoint their state, and resume with the new context. No hard-killing LLMs, no corrupted state.

3. ๐Ÿง‘โ€โš–๏ธ Leader as the Sole Authority (No Auto-Consensus)

Automatic consensus among agents leads to endless debate and "hallucinated compromises."

  • Agents can raise Objections (Blocking vs. Advisory).
  • Blocking issues (e.g., Leader contradicts existing requirements) trigger a global pause and escalate to the Leader for a final, irreversible ruling via the HumanGate.

4. ๐Ÿ—๏ธ Project-level Tenancy (Isolation + Knowledge Distillation)

  • Default Deny: Projects are independent worlds (separate sandboxes, rosters, and state).
  • Controlled Imports: Reuse goes through an audited ImportRecord (snapshot copy, not live link).
  • Knowledge Base: Each project has a Refined Layer (injected into context) and an Archive Layer (RAG-accessible). The Librarian (Coordinator delegate) distills insights from finished tasks, but Write-Block is enforced until human approval (/approve-kb).

๐Ÿง  Architecture Overview

graph TD
    User[๐Ÿ‘ค Leader] <--> UI[๐Ÿ“ฑ Group Chat UI / Global Inbox]
    UI <--> Orchestrator[๐Ÿง  Orchestrator (Self-research)]
    
    Orchestrator --> Coordinator[โš™๏ธ Coordinator]
    Coordinator -->|Routes| WorkerPool[๐Ÿ’ผ Worker Pool]
    
    subgraph WorkerPool [Parallel Execution]
        Worker1[Worker 1: Coder] --> Harness1[Harness Loop]
        Worker2[Worker 2: Tester] --> Harness2[Harness Loop]
        Worker3[Worker 3: Architect] --> Harness3[Harness Loop]
    end
    
    Harness1 --> Projection[๐Ÿ“‹ Context Projection (Overwrite)]
    Harness1 --> MCP[๐Ÿ”ง MCP Tools]
    
    MCP --> Sandbox[๐Ÿ“ฆ Sandbox Adapter]
    Sandbox -->|Phase 0| Local[๐Ÿ“ Local Temp Dir]
    Sandbox -->|Future| Docker[๐Ÿณ Docker + Worktrees]
    
    Orchestrator <--> State[๐Ÿ’พ Shared State / Reducers]
    State <--> KB[๐Ÿ“š Knowledge Base]
    
    Coordinator -->|Blocking| HumanGate[๐Ÿšฆ Human Gate]
    HumanGate --> User

๐Ÿ› ๏ธ Tech Stack

LayerTechnology
LanguageTypeScript (Node 20+)
Single-Agent KernelDeepSeek Harness (ReAct loop, event sourcing, ctx.subagents)
OrchestrationSelf-researched lightweight runtime (4 generic nodes)
CommunicationMCP (Model Context Protocol) SDK
SandboxPhase 0: fs.mkdtemp + child_process (Mock)
Future: Docker (dockerode) + Git Worktree (simple-git)
FrontendNext.js / React (SSE + HTTP POST)
Monorepopnpm workspaces

๐Ÿš€ Quick Start (Phase 0 Prototype)

Note: Phase 0 is the "skeleton" phase. It runs entirely locally without Docker or Git worktrees to ensure the agent loop and state machine work flawlessly first. It uses temporary directories for sandboxing.

Prerequisites

  • Node.js 20+
  • pnpm (npm install -g pnpm)
  • An API Key for DeepSeek/OpenAI (Harness provider)

Installation

# Clone the repository
git clone https://github.com/your-username/agora.git
cd agora

# Install dependencies
pnpm install

# Set up environment variables
cp .env.example .env
# Edit .env and add your LLM API keys

Run the Phase 0 Test (LRU Cache)

# Build the core packages
pnpm build

# Run the single-file coding task (Coder writes LRU Cache, Tester validates)
pnpm start:phase-0

What you should see:

  1. Coordinator creates the task.
  2. Coder generates the LRU Cache code in a temporary directory.
  3. Tester runs the validation tests.
  4. If tests fail, the loop sends it back to Coder.
  5. On success, the system finalizes and outputs the result.

๐Ÿ“ Project Structure (Monorepo)

agora/
โ”œโ”€โ”€ packages/
โ”‚   โ”œโ”€โ”€ core/               # State, Orchestrator, Coordinator, Projection
โ”‚   โ”œโ”€โ”€ executors/          # HarnessExecutor, ExternalExecutor (interface)
โ”‚   โ”œโ”€โ”€ sandbox/            # SandboxManager (LocalTemp adapter + future Docker)
โ”‚   โ”œโ”€โ”€ tools/              # MCP Servers (fs, git, test, lint, sandbox)
โ”‚   โ”œโ”€โ”€ comm/               # Message Bus, Channels, Inbox
โ”‚   โ””โ”€โ”€ roles/              # RoleSpec definitions (PM, Coder, etc.)
โ”œโ”€โ”€ apps/
โ”‚   โ””โ”€โ”€ web/                # Next.js frontend (Future phase)
โ”œโ”€โ”€ docs/
โ”‚   โ”œโ”€โ”€ ๅคš Agent ไปฃ็ ๅไฝœ็ณป็ปŸ ยท ้กน็›ฎ่“ๅ›พ.md
โ”‚   โ””โ”€โ”€ ๅคš Agent ไปฃ็ ๅไฝœ็ณป็ปŸ ยท ่ฏฆ็ป†่ฎพ่ฎกๆ–นๆกˆ.md
โ”œโ”€โ”€ .env.example
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ README.md

๐Ÿ—บ๏ธ Roadmap

PhaseGoalStatus
0Skeleton: State machine + Harness single agent + Local temp sandbox. Run a single-file LRU Cache task.๐Ÿšง In Progress
1Add Docker sandbox + core MCP tools (read/write/run).๐Ÿ“… Planned
2Full team: PM, Architect, Tester, Reviewer + test/review loops.๐Ÿ“… Planned
3Context engineering: Handoffs, decision ledger, authority levels.๐Ÿ“… Planned
4Adaptive orchestration: Complexity-based routing (Tier 0/1/2).๐Ÿ“… Planned
5Group Chat UI + Leader commands.๐Ÿ“… Planned
6Multi-channel communication (Sub-groups, threads).๐Ÿ“… Planned
7Role hot-swapping (Recruitment / Offboarding with mandatory handoffs).๐Ÿ“… Planned
8Human Gate + Arbitration UI.๐Ÿ“… Planned
9True Parallelism: Async workers + Cooperative Preemption.๐Ÿ“… Planned
10"Thick" Executors (OpenHands) + Product polish.๐Ÿ“… Planned

๐Ÿง  Key Architectural Decisions (Phase 0)

To keep the project moving fast, we made 5 crucial engineering trade-offs (2026-08-23):

  1. Context Overwrite: We overwrite the Harness messages queue in pre-step rather than appending, ensuring raw chat logs never hit the model.
  2. Thin-Only Executors: All agents use the Harness "thin" loop until Phase 10. The external type is a reserved placeholder.
  3. Knowledge Base Write-Block: Writing to the KB is disabled until a double-gate passes (All tests green + /approve-kb command).
  4. Terminate & Fork: When stuck in HumanGate, the process is terminated (releasing resources) and later forked from the checkpoint, rather than being "paused."
  5. Local Mock Sandbox: Phase 0 uses Node.js tmp directories and child_process instead of Docker/Git to accelerate development.

These decisions are documented in docs/ with [2026-08-23 Architecture Decision] markers.


๐Ÿค Contributing

This is a personal portfolio project for the 2026 Autumn Recruitment season. While I'm not accepting external PRs right now, feedback and star-gazing are highly appreciated!


๐Ÿ“„ License

Distributed under the MIT License. See LICENSE for more information.


๐ŸŒŸ If You're a Recruiter or Interviewer...

Agora was designed to demonstrate system-level thinking rather than just calling a chat API. It tackles:

  • Engineering trade-offs: Why choose Harness over LangGraph? Why Self-researched orchestration?
  • Concurrency: Cooperative preemption with LLMs (no hard-killing).
  • Context Management: Projection views to prevent "lost-in-the-middle."
  • Product Sense: A "Group Chat" interface makes AI behavior transparent and controllable.

I'd love to walk you through the code or the design decisions in an interview.


Built with โ˜• and ๐Ÿง  for the love of building AI that actually works.