Workspace Overview

The workspace crates that make up the product:
loop-test-support is a dev helper and is not part of the binary.

loop-ai

Unified LLM API layer — provider abstraction, streaming, auth, and cost tracking.

Modules

Key Types

Provider Abstraction

All providers implement the same interface, making model switching seamless. The faux provider enables deterministic testing without API calls.

loop-agent

Agent runtime — the core harness that orchestrates LLM calls, tools, sessions, and sandbox.

Architecture

Modules

Adapter Layer

Session Backends

All backends implement the SessionStore trait and are accessed through SessionRepository.

loop-app-core

Shared application core — bootstrap, config, theme, and tool-approval wiring used by both CLI and desktop. Surfaces differ only in presentation; harness and config paths are shared.

loop-cli

Terminal UI — ratatui-based TUI, slash commands, configuration loading, and runtime bootstrap.

Modules

TUI Stack

  • ratatui 0.30 — Terminal UI framework
  • crossterm 0.28 — Terminal backend
  • syntect — Syntax highlighting
  • pulldown-cmark — Markdown parsing

Workflow Progress UI

With --features orchestration, /workflow streams live WorkflowTask cards (pending → success/error) with description and collapsible output (Ctrl+O).

loop-desktop

GPUI desktop app — sessions sidebar, streaming chat, diff review, PTY dock. Shares harness wiring through loop-app-core and a DesktopController that coalesces agent events into UI snapshots (~60fps). Live multi-agent workflow task cards remain CLI-only for now. Requires Rust nightly:

loop-mcp

MCP protocol — client manager and server implementation (linked into the default binary).

Components

Dependencies

  • rmcp — Rust MCP SDK
  • axum 0.8 — HTTP server
  • tower 0.5 — HTTP middleware
CLI: loop --serve-mcp listens for streamable HTTP on 127.0.0.1:3100. --mcp-host changes the interface; a non-loopback address requires --mcp-token.

loop-telemetry

Traces — OpenTelemetry export to Langfuse or any OTLP/HTTP collector (feature: telemetry). Spans cover the agent run, a model generation, and tool calls. In the CLI this is /tracing plus the --trace-* flags on --print. Settings for the destination are global; secrets stay in the credential store. See Tracing.

loop-orchestration

Multi-agent workflow engine — planning, scheduling, memory, and event sourcing (plugin crate).

Modules

Traits Defined

  • AgentRunner, ShellRunner — abstract interfaces for task execution
  • Decoupling: serde_json::Value at the crate boundary (avoids coupling to loop-agent types)
  • Feature: sqlite for optional SqliteEventLog

Worker Trait

Implement this trait to add custom worker types to the orchestration engine.

Dependency Graph

loop-mcp is part of the default loop binary. The orchestration and telemetry plugin crates are absent from it. The agent implements their traits only when the feature is enabled.