Project 01 / Pluggable Agent Runtime

Looper.

A complete, pluggable Agent Runtime evolving from a verified Rust Core, with stable interfaces for real products to supply their own capabilities.

Why it exists.

Agent systems become difficult to reason about when model calls, state changes, streaming output, and side effects collapse into one opaque function.

Looper separates those responsibilities into a visible execution lifecycle. The current repository begins with one session, one foreground run, an in-memory event store, and a simulated model effect. That is the first verified implementation slice—not the final product scope.

The destination is a complete Runtime module: the Core keeps execution semantics coherent, while extension interfaces let real business applications replace capabilities without forking or rebuilding the loop.

Core vs Extensions.

Core owns the invariants. Extensions own the things that must vary between products.

Core / stable execution module

One small interface over the full lifecycle.

The Core is responsible for session and run state, command ordering, pure decisions, durable facts, effect scheduling, event publication, and recovery semantics.

Running now
Single-session Mailbox, pure decision and reducer, in-memory Event Store, Event Bus, and simulated effects.
Evolution target
Durable recovery, cancellation, multi-session supervision, retries, and late-result rejection behind the same Runtime interface.
Extensions / replaceable adapters

Real capabilities meet the Core at explicit seams.

Products inject adapters for external and business-specific behavior. Looper defines lifecycle contracts and error modes; each application chooses the implementations.

Existing proof
Simulated model, in-memory storage, CLI, HTTP/SSE, and React inspection adapters.
Evolution target
Versioned discovery, configuration, isolation, health, upgrade, and graceful drain for production adapters and plugins.

Extension interfaces.

Each interface describes what a caller must know at its seam. Adapters can change without leaking provider or deployment complexity into the Core.

01 / Slice exists

Model

Inference, streaming deltas, completion, usage metadata, cancellation, and provider errors. The current proof uses a simulated streaming adapter; real providers are next.

02 / Contract planned

Tool

Capability discovery, schema validation, execution, progress, results, and failures for local tools, MCP servers, or product-owned actions.

03 / Memory adapter exists

Memory / Storage

The current Event Store is in memory. The interface will support durable session events, snapshots, artifacts, and optional long-term memory implementations.

04 / Stream exists

Event

Ordered runtime facts and ephemeral progress for UI subscribers, audit logs, metrics, tracing, indexing, and product workflows.

05 / Contract planned

Policy

Permissions, budgets, approvals, sandbox requirements, organization rules, and decisions that may allow, deny, or pause an effect.

06 / Adapters exist

Transport

CLI and HTTP/SSE prove the seam today. Future adapters can expose JSON-RPC, queues, workers, or application-specific interfaces.

The working loop.

Every accepted command travels through the same explicit stages.

  1. 01Mailbox

    Serializes commands and completed effects for a single session actor.

  2. 02decide()

    Purely calculates domain events and requested effects from current state and input.

  3. 03Event Store

    Persists durable facts first; the prototype uses an in-memory adapter.

  4. 04Reducer

    Applies stored events to rebuild the session’s in-memory state.

  5. 05Event Bus

    Publishes durable facts and ephemeral streaming deltas to subscribers.

  6. 06Effect Runner

    Executes requested work and returns the result to the mailbox to close the loop.

What runs today.

The current milestone proves the minimum Core loop and its first adapters. It does not yet claim the complete production Runtime.

  • Typed command, run, effect, session, and event identifiers.
  • A pure decision function and reducer with domain-focused tests.
  • A Tokio mailbox, command receipt, broadcast Event Bus, and simulated streaming Effect Runner.
  • A CLI that prints durable events and live deltas.
  • An Axum HTTP/SSE adapter and a React Runtime Inspector.

Real business integration.

Looper is a headless Runtime module, not a preselected business Agent.

01

The product owns the domain.

A coding assistant, browser operator, data diagnostic Agent, or experiment runner defines its workflows, prompts, data, UI, and business rules.

02

Adapters bring real capabilities.

The product supplies Model, Tool, Memory or Storage, Event, Policy, and Transport adapters at Looper’s extension seams.

03

The Core keeps execution coherent.

Looper owns lifecycle, ordering, state transitions, effects, recovery semantics, and observable events across every business integration.

What comes next.

These milestones deepen the existing Core and turn the planned extension seams into production-ready interfaces. They are roadmap items, not current capability claims.

  • Durable Storage adapters, snapshots, recovery, and replay.
  • Production Model and Tool interfaces with cancellation and structured failures.
  • Memory, Event sink, and Policy adapters for business applications.
  • Multi-session supervision, late-result rejection, retries, and graceful shutdown.
  • Out-of-process plugin discovery and isolation with versioned protocol contracts.