Skip to content

Architecture

A map of the moving parts for anyone working on the system itself.

Repos

Repo What
letta-anatomie the engine: FastAPI backend, generation/lab/learning services, bundled engine seed, this docs site
letta-anatomie-engine curated memfs source + DAW scripts (bundled into the backend image as engine/)
anatomie-ai the Strategist (Next.js)
ReviewHub unmodified prod build; talks to the backend via HIDS_API_URL

Files-mode (memfs)

The knowledge store is markdown files, not DB rows: pools, notes, vocabulary, brand system blocks. The body IS the memory; frontmatter is metadata; git is the audit history. The backend reads/writes the memfs on a persistent volume; pool mutations dual-write to Postgres (the SelectionEngine's pool loader reads the DB).

Data (Postgres)

manifests (the dealt outfits) → generated_prompts (compose + render results, unique same-day P-NNNN IDs) → segmentation_results (garment masks, 1-based hitmap indexes) → feedback_log (grades, image- or garment-level) → birth_certificates (seeds, superseded on re-grade) → experiments (lab runs, genealogy via parent_birth_cert_id) → lab_vocab (fragments with grade attribution) → pipeline_events (observability).

LLM/render stack

Compose + lab + describe: gemini-2.5-flash via OpenRouter (robust JSON parsing everywhere — trailing prose tolerated, failures recorded). Render: Imagen 4 Ultra via Replicate. Segmentation: SAM 3 via Replicate. No Letta agents in files mode (direct-LLM paths; the agent code remains for DB-mode).