Skip to main content
ReferenceDraft · not yet verified

Microservice Architecture

The services the compose file starts, how they connect, what each holds or does, and the interfaces the engine offers.

The stack is one Docker Compose file, run on your hardware with no internet access needed. Two services are published, to the machine the stack runs on and to it alone: the API service and the console. Every other service is reached only by the others, by name, on the stack's own network.

The services​

Core​

The engine is the API service and its workers together.

ServiceContainerWhat it isHolds or does
API Service (MCP and REST)ememory-apiThe engine's front: the MCP server and the REST APIServes the MCP tools and the REST API, the change feed and the exchange with peers. Runs the database migrations when it starts
Workersememory-worker-ingest, ememory-worker-archive, ememory-worker-maintenance, ememory-workerFour background workers, on the same image as the API serviceIngest: the part of each write that runs after the call returns (the extractor plugins and the embedding). Archive: writes to the archive. Maintenance: batches of repair work, such as embedding every record after the embedding model changes. Scheduled (ememory-worker): jobs when CRON_ENABLED=true, window embedding, and dialling peers

Broker​

ServiceContainerWhat it isHolds or does
Message Brokerememory-redisRedis 7The queue of background jobs and the change feed's live messages. Nothing is written to disk

Indexing​

ServiceContainerWhat it isHolds or does
Databaseememory-postgresPostgreSQL 17 (Percona), with pgvector and pg_tdeThe live index: records, edge properties, vectors, corrections, the audit log, policies. Encrypted at rest by pg_tde, with its key in its own volume

Qdrant is not in the default stack; an overlay file adds it (below).

Plugins​

ServiceContainerWhat it isHolds or does
Chrono Pluginplugin-chrono, chrono-engineExtractor pluginReads dates, times and date ranges from a record's content, using chrono-node
WordNet Pluginplugin-wordnetExtractor pluginReads a record's words, using WordNet. Its corpus is in its image

What the extractor plugins return is kept as each record's tags, which search reads; tags are not edge properties.

Models​

ServiceContainerWhat it isHolds or does
Model GatewaygatewayEmbeddings gateway (LiteLLM)The OpenAI-compatible endpoint the engine embeds through. It routes the model name to a provider, and holds any provider keys in its own settings file
Embedding Modellocal-embedLocal embedding modelllama.cpp serving nomic-embed-text v1.5 (768 dimensions, CPU), the default route. The model is in its image

The default route needs no key and sends nothing off the machine. The gateway can be switched to a provider's route, which then receives record text.

Persistence​

ServiceContainerWhat it isHolds or does
Archive Storearchive-store, archive-bucketSeaweedFSThe archive: S3-compatible object storage on local disk, in the host folder ARCHIVE_DIR

Interfaces​

ServiceContainerWhat it isHolds or does
ConsoleconsoleWeb interface and its backend, one Node processHolds the engine client key server-side in the sign-in session and passes /api to the API service. Published to this machine only
Folder Intakefolder-intakeIts own compose file (docker-compose.folder.yml)Watches a folder on this machine, mounted read-only, and writes its files to the API service. See documents and files

Overlays​

ServiceContainerWhat it isHolds or does
Open Network Accessememory-api (in docker-compose.open.yml)Overlay filePublishes the API service on every interface, and turns authentication on
Vector Storeqdrant (in docker-compose.qdrant.yml)QdrantKeeps vectors in Qdrant instead of PostgreSQL

The API service's interfaces​

PathWhat it is
/mcpMCP over streamable HTTP: the ten tools, and the instructions an agent receives when it connects
/mcp/sseThe same MCP server over the older SSE transport
/api/v2/The REST API: the tool operations, and routes for policies and agent profiles, lanes, edge properties, records, embedding spaces, bundle export and import, and administration
/api/v1/feedThe change feed, as server-sent events
/api/v1/sync/The exchange between peers
/healthThe engine's health: healthy, or degraded when the database is unreachable, or when the embedding width is not declared, cannot be read, or differs from the width of a vector the endpoint returned. The pipeline profile and the temporal profile in force are named in the reply.

e.sh is a command-line script over the REST API, for agent profiles, lanes, policies, records, edge properties, peers, ingesting files, bundle export and import, and minting client keys.

See configuration for every setting.