Pure protocollash-sansio
Owns TurnMachine, Effect, Response, ModePreamble, prompt templates, messages, attachments, the TurnOutcome::{Finished, Handoff, Stopped} contract, and tool definitions/output contracts. Top-level files cover turn, mode, prompt, plugin, attachment, session, and tool surfaces; the sansio/, session_model/, and llm/ subdirectories hold the state machine, durable model, and provider request types.
lash-sansio/src/{turn,mode,prompt,plugin,tool_surface,session,attachment}.rs, sansio/, session_model/, llm/
Async runtimelash-core
Owns LashRuntime, Session, SessionGraph, and the RuntimePersistence contract, plus tool dispatch, provider registry, OAuth, attachments, tracing, runtime controls, the built-in tool-output budgeting plugin, and handoff-following turn execution. No knowledge of MCP, user config files, or any host concerns — those live in higher layers.
lash-core/src/runtime/*, lash-core/src/session.rs, lash-core/src/store.rs, lash-core/src/plugin/*
Facadelash
App-facing API on top of lash-core. Provides LashCore, LashCoreBuilder, LashSession, SessionBuilder, TurnBuilder, mode presets, and typed-plugin binding helpers. Host applications use this crate (not lash-core directly) for runtime construction, chat/task sessions, persistence wiring, and semantic turn streaming.
lash/src/lib.rs, lash/src/core.rs, lash/src/session.rs, examples/*
CLI runtime + configlash-cli
Hosts the lash binary plus a [lib] half that owns LashConfig, provider spec parsing, and credential bootstrap. Bench runners and lash-harness-opt consume the lib half to share the same config loader. The bin handles resume/fork, --print, interactive TUI flows, and assembles the plugin factory chain (providers, MCP, mode presets) before constructing LashCore.
lash-cli/src/config.rs, lash-cli/src/bootstrap.rs, lash-cli/src/main.rs, lash-cli/src/interactive
Mode pluginsstandard + rlm
Standard drives native provider tool calls. RLM extracts lashlang code fences, runs persistent REPL state with read-only host bindings projected into scope (history and any host-supplied globals), masks fence streaming, owns the continue_as handoff control tool, and records the RLM trajectory.
lash-mode-standard, lash-mode-rlm, lashlang, lash-rlm-types
Provider pluginsOpenAI, Codex, Anthropic, Google
Each provider implements state, auth, readiness, transport, and model policy components behind ProviderHandle.
lash-provider-*, lash-providers-builtin
Tool pluginsdefault tools + subagents + LLM helpers + MCP + tool-output budgeting
Default tools, subagents, llm_query, monitors, plan mode, prompt context, observational memory, rolling-history compaction, UI activity, tool discovery, MCP servers (via lash-plugin-mcp, rmcp-based, Stdio + Streamable HTTP + SSE), and the built-in tool-output budgeter all register through plugin factories. Discovery remains split across catalog projection, provider execution, lexical/BM25 ranking, LLM rerank, and schema indexing.
lash-standard-plugins, lash-subagents, lash-llm-tools, lash-plugin-*, lash-core/src/plugin/tool_result_projection_builtin.rs
Persistencelash-sqlite-store
The concrete SQLite implementation persists session heads, graph nodes, blobs, checkpoints, usage ledgers, tombstones, and vacuum metadata behind the runtime store contract.
lash-sqlite-store/src/lib.rs
Host UICLI, TUI, UI surfaces
The CLI bootstraps runtime, plugins, and providers, then renders the authoritative SessionReadView through ChronologicalProjection into UiTimeline.
lash-cli, lash-tui-extensions, lash-tui
Inspection toolstrace + export + file index
lash-trace defines standard and extended JSONL trace records. lash-export walks a tree of sessions joined by continue_as handoffs and spawn_agent subagents, combining store state with provider traces to render chronological sessions, prompt snapshots, and token usage as a single HTML doc. lash-trace-viewer is a standalone tool that renders JSONL traces into a self-contained HTML browser. lash-file-index powers async fuzzy file completion.
lash-trace, lash-trace-viewer, lash-export, lash-file-index
Experimentationbenchmarks + harness optimization + autoresearch
Benchmark runners use Lash as an evaluated agent and follow handoff continuations between turns. lash-harness-opt owns generic optimization primitives (Candidate, HarnessProject, HarnessOptimizer, SqliteHarnessStore), the strategies::gepa reflective strategy, and a clbench project binding. Autoresearch adds off research tools and a UI extension.
bench/*/runner, lash-harness-opt, lash-autoresearch