How it works

Runtime topology

Each Codifix instance has its own service, database and configured authority. The CLI, TUI, browser, watchers and MCP adapt to the selected instance. A single installation can serve several projects; independently operated knowledge areas do not become one unrestricted shared database.

Components

ComponentRole
codifix CLIHuman and agent automation surface.
codifix-serviceLocal HTTP API, web UI host, curation pipeline, embedding jobs, MCP HTTP mount.
TUITerminal dashboard for humans reviewing memory, evidence, agents, and diagnostics.
Web UIWeb companion using the same service APIs as the TUI.
WatchersBackground processes that observe agent sessions and report activity.
MCP serverRead-first protocol adapter for MCP clients; it reuses the service API.
PostgreSQLDurable store for projects, memories, captures, activities, history, graph data, and embeddings.

Curation commits canonical changes and durable enrichment intents together. Workers recover pending jobs from PostgreSQL after restart. The offline write outbox and downloaded knowledge projections are separate from the owning instance's canonical PostgreSQL state.

Private federation adds a separately configured gateway and publication/receiver ledgers. It transports reviewed publications or explicit expertise requests; ordinary local query does not automatically contact another area. See Federation and expertise.

Configuration layers

LayerTypical contents
Global configDatabase URL, service URL, API token, providers, service preferences.
Area routingOperator-owned mapping from exact repository/project identities to a service configuration and durable instance UUID.
Project configProject slug, repo root, project-specific options.
Repo-local .agents/Agent instructions and Codifix skills.
Runtime stateCheckpoints, service status, watcher heartbeats, generated logs.

Do not commit secrets, API keys, database URLs, or local runtime state. Repo-local project identity and agent instructions are normally safe to commit after review.

Service ports and modes

Packaged installs normally run the service in the background through systemd on Linux or launchd on macOS. Development runs use the foreground command:

codifix service run

The foreground command should keep running in the terminal and should not daemonize itself. If you need background operation, use the packaged service manager.

MCP as an adapter

The built-in MCP server exposes ordinary read-only memory tools alongside separately gated loop and expertise actions. Expertise submission sends an explicitly authorized question externally; it is not ordinary retrieval. Stdio runs as a local process; service-mounted HTTP uses scoped token authentication. See MCP for the transport and disclosure boundaries.

Operational rule

When something looks wrong, check the layers in order:

codifix doctor
codifix health
codifix status --project <project-slug>

Then inspect the TUI Errors tab, service logs, watcher status, and embedding diagnostics.

© 2026 Olivier Van Acker (3vilM33pl3). Codifix is AGPL-3.0-or-later with commercial licensing available.