Architecture
A bird's-eye view of the components that make up Reyn, and how they coordinate to execute a single request.
Reyn is built from a small set of components. Agents hold long-lived conversations and route each decision through a RouterLoop. Skills are instructions the model reads on demand, not phase graphs the OS executes. Every LLM decision becomes a typed Control IR op, validated and dispatched under a permission gate. Workspace and Events make every step inspectable and replayable.
Each component has one job. Agents don't know how a Skill's instructions are written. The OS is the only layer that touches all of them — and it never embeds skill-specific logic.
A long-lived ChatSession. RouterLoop dispatches messages to Skills, an optional Planner decomposes complex goals, memory scope and skill allowlist define what the agent can see and do.
Layered-disclosure instructions the model chooses to read — a one-line menu entry, an on-demand full read, and bundled assets. Not a program the OS executes.
The typed contract. Every LLM decision — a tool call, a skill read, a delegation — becomes a schema-validated op before it touches the world. No side effect ever rides a free-form string.
The runtime engine. Builds context, validates LLM output against schemas, executes ops under permission gates, emits an event for every state change. Constant; never embeds skill specifics.
Workspace is the single source of truth for inter-phase data. Events is an append-only log of every transition, op call, and decision. Together they make crash recovery and replay possible.
A user message arrives at an Agent. The RouterLoop decides what to do — call a tool, read a Skill's instructions, or delegate to another agent. The OS builds context, calls the LLM with a closed candidate set, and validates the response as a typed Control IR op. The op dispatches under a permission gate and writes to the Workspace; an event records each step. The loop continues, bounded by force-close, until the RouterLoop decides the turn is done, and the reply travels back to the user.
Agents reach other Agents through a topology gate — network, team, or pipeline — permission-scoped the same way any other capability is. From outside, Reyn exposes itself as an MCP server: Claude Code, Cursor, and any MCP-aware client can call list_agents() and send_to_agent(). Inside Phases, Control IR ops can call external MCP servers as well — third-party tools come under the same permission gate and event log as everything else.
Multi-hop agent-to-agent relay retired with delegate_to_agent; the current interface addresses a single (agent, session). Whether a join concept returns is an open design question.
The concepts section covers each component in detail — with design rationale, edge cases, and links to the implementation.