Skip to main content

Architecture Overview

The reference server is three layers; the protocol itself is layer-agnostic (it specifies semantics, not transport).

LayerResponsibility
1 · Network / MCP GatewayFastAPI app: routing, Bearer-token auth, tenant extraction, MCP (stdio + SSE) tool surface.
2 · Ingestion QueueAsync batch worker with backpressure; writes are enqueued and flushed in batches.
3 · StorageSQLiteGMPBackend — sentinel-encoded schema, composite B-tree indexes, WAL mode for concurrent reads.

Each layer maps to a module: src/aml/server/app.py, src/aml/server/ingestion.py, and the backends under src/aml/backends/.

A backend does not need the server: any object implementing the MemoryBackend protocol is directly conformance-testable in-process.