deployment

A deployment guide for running Memoria with Docker Compose or Kubernetes. These are tools for running applications in managed containers, either on one machine or across a cluster.

In plain words
What is it for?
Use it to deploy Memoria, set environment variables, start its services, configure local or remote embeddings, and check that the API is healthy.
Why use it?
It documents the settings needed for the API, database, security key, embeddings, and multiple instances so the service can be configured correctly.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/matrixorigin/memoria/deployment
Any agent
npx skills add matrixorigin/memoria --skill deployment
Clone the repo
git clone --depth 1 https://github.com/matrixorigin/memoria

Made for: Claude Code, Codex.

Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,662 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00028 $0.01662
Opus 5 $0.00014 $0.00831
Sonnet 5 $0.00006 $0.00332
Haiku 4.5 $0.00003 $0.00166

Measured 2d ago against content hash be088a6e9235, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

deployment scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Services: API on `:8100`, MatrixOne on `:6001`. Verify: `curl http://localhost:8100/health`
skills/deployment/SKILL.md · 196 lines

How it starts

The opening of the file, as written. The whole thing — 196 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Docker Compose (Single Instance)

cd Memoria
cp .env.example .env   # Set MEMORIA_MASTER_KEY, MEMORIA_EMBEDDING_API_KEY
docker compose up -d

Services: API on :8100, MatrixOne on :6001. Verify: curl http://localhost:8100/health

Environment Variables

Required

Variable Description
MEMORIA_MASTER_KEY Admin API key (min 16 chars)

Database

Variable Default Description
MEMORIA_DB_HOST matrixone MatrixOne host
MEMORIA_DB_PORT 6001 MatrixOne port
MEMORIA_DB_USER root Database user
MEMORIA_DB_PASSWORD 111 Database password
MEMORIA_DB_NAME memoria Database name

Embedding

Variable Default Description
MEMORIA_EMBEDDING_PROVIDER local local or openai
MEMORIA_EMBEDDING_MODEL all-MiniLM-L6-v2 Model name
MEMORIA_EMBEDDING_API_KEY Required if provider is openai (single-backend)
MEMORIA_EMBEDDING_BASE_URL Custom endpoint, OpenAI-compatible (single-backend)
MEMORIA_EMBEDDING_ENDPOINTS JSON array for multi-backend round-robin. When set, supersedes BASE_URL/API_KEY. Format: [{"url":"https://api1.example.com/v1","api_key":"sk-1"},{"url":"https://api2.example.com/v1","api_key":"sk-2"}]. All endpoints must serve the same model. Requests rotate round-robin; failed/rate-limited endpoints are skipped automatically.
MEMORIA_EMBEDDING_DIM 0 (auto) Embedding dimension

Distributed

Variable Default Description
MEMORIA_INSTANCE_ID Random UUID Unique instance ID. Set to Pod name in K8s
MEMORIA_LOCK_TTL_SECS 120 Distributed lock TTL. Heartbeat renews every TTL/3

Governance

Variable Default Description
MEMORIA_GOVERNANCE_ENABLED false Enable background governance scheduler
MEMORIA_GOVERNANCE_PLUGIN_BINDING default Repository binding name
MEMORIA_GOVERNANCE_PLUGIN_SUBJECT system Subject key for binding resolution
MEMORIA_GOVERNANCE_PLUGIN_DIR Local plugin dir (dev mode, skips signature)

Read the full file on GitHub · 196 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 196 lines · 28 tokens per session scan A be088a6e9235

Subscribe to this mod's changes

deployment is a skill published in the GitHub repository matrixorigin/memoria (592 stars, last pushed 6d ago), licensed Apache-2.0. It adds 28 tokens to every session and 1,662 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.