deployment
Skill624 starsChanged 6 months agoApache-2.0View on GitHub
Deploy Memoria with Docker Compose or Kubernetes. Environment variables, multi-instance setup, security. Use when deploying or configuring Memoria.
- Reads credentials
33 other projects use a version of this.
Adopted by
Most recently taken up by
- artivilla/agent-skillstheir own version, first seen Nov 8, 2026
- vijaysuperpositionist/skillstheir own version, first seen Nov 1, 2026
- CrowdStrike/fusion-skillstheir own version, first seen Oct 30, 2026
- bmcszk/agent-skillstheir own version, first seen Oct 29, 2026
- microsoft/frontier-ghcp-ttt-rvastheir own version, first seen Oct 25, 2026
- SwastikPandey1024/agentic-engineering-ostheir own version, first seen Oct 20, 2026
Used with
Projects with it also use dependency-management, database and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
dkprogSkilldependency-management
Apply when wiring dependencies, integrating external services, or designing interfaces between modules. Ensures loose coupling through dependency injection, interface segregation, and proper abstraction boundaries.
Also in 3 projects that use this
mijunriSkilldatabase
数据库脚本与操作规范。脚本放在 db_scripts 目录,遵循查询优化、事务、安全等实践。
Also in 3 projects that use this
BlockSkilldebugging
Debugging guidelines and best practices
Also in 6 projects that use this
AnthropicSkilldocumentation
Write and maintain technical documentation. Trigger with "write docs for", "document this", "create a README", "write a runbook", "onboarding guide", or when the user needs help with any form of technical writing — API docs, architecture docs, or operational runbooks.
Also in 5 projects that use this
pproencaSkillrefactoring
Code refactoring best practices based on Martin Fowler's catalog and Clean Code principles. This skill should be used when refactoring existing code, improving code structure, reducing complexity, eliminating code smells, or reviewing code for maintainability. Triggers on tasks involving extract method, rename, decompose conditional, reduce coupling, or improve readability.
Also in 3 projects that use this
OpenAISkillobservability
Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.
Also in 3 projects that use this
Other versions33 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 33
- NVIDIA/TensorRT-Model-Optimizer★ 5.6ksame name
- NVIDIA/Model-Optimizer★ 5.6ksame name
- StarRocks/starrocks-debug-skills★ 77same name
- nahid-sparktales/agent-dispatcher★ 59same name
- digitalocean-labs/do-app-platform-skills★ 38same name
- CrowdStrike/fusion-skills★ 29same name
- manu14357/Zelaxy★ 15same name
- DojoCodingLabs/code-sensei★ 14same name
- binnicordova/expo-boilerplate★ 11same name
- kpbray/power-bi-agent-skills★ 9same name
23 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- .cursor/rules/memory-branching-patterns.mdcCursor rule
- .cursor/rules/memory.mdcCursor rule
- api-referenceSkill
- architectureSkill
- local-embeddingSkill
- plugin-developmentSkill
- releaseSkill
- setupSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 29 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 77
Use an existing MatrixOne instead of the bundled one:
- Distinctive: line 87
All coordination uses the shared MatrixOne database — zero external dependencies.
- Distinctive: line 176
All replicas share one MatrixOne
- Very specific: line 188
All queries scoped to authenticated user_id
- Distinctive: line 191
Run behind reverse proxy with TLS in production
“Common” is measured: kept by at least 6 in 10 of the 29 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Docker Compose (Single Instance)
cd Memoria
cp .env.example .env # Set MEMORIA_MASTER_KEY, MEMORIA_EMBEDDING_API_KEY
docker compose up -dServices: 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) |
Security
| Variable | Default | Description |
MEMORIA_API_KEY_SECRET | — | HMAC secret for key hashing. Set independently of MASTER_KEY |
LLM (for reflect/extract-entities/episodic)
| Variable | Description |
LLM_API_KEY | OpenAI-compatible API key |
LLM_BASE_URL | API base URL |
LLM_MODEL | Model name |
External MatrixOne
Use an existing MatrixOne instead of the bundled one:
MEMORIA_DB_HOST=your-host MEMORIA_DB_PORT=6001 docker compose up -d apiTables are auto-created on first startup.
Multi-Instance (K8s)
All coordination uses the shared MatrixOne database — zero external dependencies.
How it works:
- Governance scheduler: Each instance acquires a DB lock before each task. Only one wins; others skip. Heartbeat renews every TTL/3.
- Async tasks: Stored in
mem_async_taskstable, visible cross-instance. - Lock expiry: Crashed instance's locks expire after TTL, another takes over.
- Single-instance:
NoopDistributedLock— zero overhead, identical behavior.
K8s Manifest
apiVersion: apps/v1
kind: Deployment
metadata:
name: memoria-api
spec:
replicas: 3
selector:
matchLabels:
app: memoria-api
template:
metadata:
labels:
app: memoria-api
spec:
containers:
- name: memoria
image: matrixorigin/memoria:latest
ports:
- containerPort: 8100
env:
- name: MEMORIA_INSTANCE_ID
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: MEMORIA_MASTER_KEY
valueFrom:
secretKeyRef:
name: memoria-secrets
key: master-key
- name: MEMORIA_DB_HOST
value: "matrixone.default.svc.cluster.local"
- name: MEMORIA_DB_PORT
value: "6001"
- name: MEMORIA_EMBEDDING_PROVIDER
value: "openai"
- name: MEMORIA_EMBEDDING_API_KEY
valueFrom:
secretKeyRef:
name: memoria-secrets
key: embedding-api-key
# Optional: multi-backend round-robin (supersedes API_KEY + MODEL single-backend)
# - name: MEMORIA_EMBEDDING_ENDPOINTS
# value: '[{"url":"https://api1.example.com/v1","api_key":"sk-1"},{"url":"https://api2.example.com/v1","api_key":"sk-2"}]'
- name: MEMORIA_EMBEDDING_MODEL
value: "BAAI/bge-m3"
- name: MEMORIA_EMBEDDING_DIM
value: "1024"
- name: MEMORIA_GOVERNANCE_ENABLED
value: "true"
- name: MEMORIA_LOCK_TTL_SECS
value: "120"
livenessProbe:
httpGet:
path: /health
port: 8100
initialDelaySeconds: 5
periodSeconds: 10
readinessProbe:
httpGet:
path: /health/instance
port: 8100
initialDelaySeconds: 5
periodSeconds: 10
---
apiVersion: v1
kind: Service
metadata:
name: memoria-api
spec:
selector:
app: memoria-api
ports:
- port: 8100
targetPort: 8100Key points:
MEMORIA_INSTANCE_ID→fieldRef: metadata.name(Pod name)- All replicas share one MatrixOne
- Leader election is automatic
- Liveness:
/health, Readiness:/health/instance
Data Persistence
MatrixOne data bind-mounted to ./data/matrixone. Survives restarts. Change: MATRIXONE_DATA_DIR=/your/path
Security Notes
- API keys are HMAC-SHA256 hashed at rest
- Set
MEMORIA_API_KEY_SECRETindependently ofMASTER_KEYfor key rotation - All queries scoped to authenticated
user_id - Snapshot names are regex-validated before SQL
- Rate limiting per API key (in-memory sliding window)
- Run behind reverse proxy with TLS in production
Rate Limits
Configurable via env: MEMORIA_RATE_LIMIT_AUTH_KEYS=1000,60 (format: max_requests,window_seconds)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

