Skip to content

Local database

AgentDock persists workspaces, sessions, messages, settings, and AIgency state locally through a sql.js-backed repository layer.

All of AgentDock's durable state lives in a single local SQLite database, compiled to WebAssembly via sql.js (src/main/db) and accessed exclusively through a repository layer rather than ad hoc queries scattered through services.

Structure

  • schema.ts and migrations.ts define and evolve the database shape.
  • sqlite-adapter.ts wraps the underlying sql.js engine.
  • src/main/db/repositories holds one repository per feature area — workspaces, sessions, and (in AgentDock Pro) a full family of AIgency repositories for runs, tasks, interactions, usage, timeline events, criteria, verification reports, defects, repair iterations, and completion reports.

What's persisted, and what isn't

Durable records — a run's definition, a task's status history, a session's message log — are persisted. Live, in-memory handles to an actually-running provider process are intentionally not persisted, since they can't meaningfully survive an app restart anyway; see Restart and crash recovery for how AIgency reconciles durable state against the absence of those old processes on startup.