Architecture
How the CLI, local database and optional dashboard fit together.
Components
-
CLI and code runner. A Go executable.
lighthouse coderuns one bounded Starlark script and prints JSON. -
Store. SQLite through the CGo-free
modernc.org/sqlitedriver, with FTS5 full-text search and an optional bundled vector extension. -
Dashboard. A standard-library HTTP server with
html/template. Loopback only. -
Change feed. Every write also appends a row to a
changestable in the same transaction. Each record carries arevision, a globalseq,updated_at,actorand an optionalbatch_id. Clients read the feed withlighthouse changes --followor the API stream. -
Local API. The dashboard listener serves
/api/v1/*with bearer tokens. See Local API and Dock.
Code calls
An agent runs lighthouse code with a short Starlark script. Lighthouse interprets the script inside the CLI, performs the permitted database operations, and returns JSON. No separate script runtime or running dashboard is needed for these calls. See the Code API for the available operations.
Search
Keyword search works locally with no configuration. Semantic search needs embeddings that you supply. Lighthouse never sends data to an embedding provider on its own. Vector query behavior is still being validated.
Context lifecycle
load_memory builds a snapshot for a scope and stores it with a revision. Writes advance the revision and return a patch. The conversation text is the live cache. Lighthouse stores rows and snapshots but does not change provider-side prompt state.