CORE CONCEPTS

Platform architecture

Presentation, orchestration, plugins, model providers, and durable evidence stay deliberately separated.

MonorepoTyped contractsEvent-drivenPlugin-first
01

Presentation boundary

Next.js never imports or executes an environment. It creates runs through Fastify, submits normalized human actions, and renders state received from REST and WebSocket contracts.

02

Orchestration boundary

The runner resolves registered components, resets episodes, routes turns to the active participant, enforces budgets, emits normalized events, invokes evaluators, and commits the run record.

03

Plugin boundary

Environment plugins own rules and authoritative state. Agent plugins own decision logic. Evaluators own scoring. Runtime adapters own execution. The shared contracts package keeps every boundary explicit.

04

Provider boundary

Model calls happen only in server-side agent plugins. An environment receives a normalized AgentAction and never needs to know whether it came from a baseline policy, a human, or a model routed through OpenRouter.

05

Evidence boundary

Run records, events, evaluations, snapshots, and replay frames are persisted independently from the web process. REST is the recovery source of truth; WebSocket is the low-latency live view.