Skip to main content

Architecture

OpRelay is a three-lane coordination plane with a broker enforcing container-per-task isolation, a persistent fact/decision store as shared agent memory, and MCP as the universal interface.

System overview

┌─────────────────────────────────────────────────────┐
│ MCP Clients │
│ Claude Code · Codex · Cursor · Custom Agents │
└──────────────────────┬──────────────────────────────┘
│ MCP (SSE transport)
┌──────────────────────▼──────────────────────────────┐
│ OpRelay Runtime │
│ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │
│ │ Broker │ │ MCP │ │ Dashboard │ │
│ │ Engine │ │ Server │ │ (Operator UI) │ │
│ └────┬─────┘ └──────────┘ └──────────────────┘ │
│ │ │
│ ┌────▼─────────────────────────────────────────┐ │
│ │ PostgreSQL │ │
│ │ Facts · Decisions · Tasks · Runs · Audit │ │
│ └───────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────┘

Key principles

  • MCP native — no SDK, no library. Any MCP client connects with one URL.
  • Deterministic state — four primitives in Postgres. No embeddings required for coordination.
  • Container isolation — every task execution gets a clean environment.
  • Dual-lane — human speed for judgment, agent speed for execution.
  • Event-driven — SSE notifications for real-time coordination. No polling.

Components

ComponentResponsibility
BrokerTask dispatch, lane routing, lock management, execution leases
MCP ServerTool discovery, authentication, request routing
Fact StoreOperational memory — facts, decisions, context retrieval
Task EngineLifecycle management, advisory locks, dependencies
Run TrackerExecution records, token usage, failure context
DashboardReal-time operator UI — timeline, agents, memory browser