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.
npx agentmods add skills/matrixorigin/memoria/local-embeddingnpx skills add matrixorigin/memoria --skill local-embeddinggit clone --depth 1 https://github.com/matrixorigin/memoriaWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00034 | $0.00508 |
| Opus 5 | $0.00017 | $0.00254 |
| Sonnet 5 | $0.00007 | $0.00102 |
| Haiku 4.5 | $0.00003 | $0.00051 |
Grade B, and why
local-embedding scanned grade B 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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
sudo cp memoria/target/release/memoria /usr/local/bin/ What it actually says
Build from Source
Pre-built binaries do NOT include local embedding.
cd Memoria
make build-local
sudo cp memoria/target/release/memoria /usr/local/bin/
Binary is ~50-80MB (bundles ONNX Runtime). Expected.
Configure
memoria init --tool kiro # No --embedding-* flags needed
Leave EMBEDDING_* env vars empty in mcp.json → local embedding is the default.
How It Works
- First query → model downloads to
~/.cache/fastembed/(~30MB default) - Model loads via ONNX Runtime (~3-5s)
- Subsequent queries are fast (in-process)
Models
| Model | Dim | Size | Notes |
|---|---|---|---|
all-MiniLM-L6-v2 |
384 | ~30MB | Default. Fast, English |
BAAI/bge-m3 |
1024 | ~1.2GB | Best quality, multilingual |
Change model in mcp.json env block:
{ "EMBEDDING_MODEL": "BAAI/bge-m3", "EMBEDDING_DIM": "1024" }
⚠️ Choose BEFORE first startup. Dimension is locked into schema.
When to Use
| Local | Remote (OpenAI/SiliconFlow) | |
|---|---|---|
| Privacy | ✅ Offline | ⚠️ Text sent to API |
| Cost | Free | API key |
| First query | ~3-5s | Fast |
| Build | From source | Pre-built works |
| Offline | ✅ | ❌ |
Recommendation: Use remote unless you need offline/strict privacy.
Troubleshooting
| Problem | Fix |
|---|---|
| "compiled without local-embedding" | Build from source: make build-local |
| Model download fails | Set HF_ENDPOINT for mirror, or manually download to ~/.cache/fastembed/ |
| High memory | Default ~100MB. bge-m3 ~1-2GB. Choose based on available RAM |
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.
- 2d ago First seen · 65 lines · 34 tokens per session scan B f963c2bfa1e3
local-embedding is a skill published in the GitHub repository matrixorigin/memoria (592 stars, last pushed 6d ago), licensed Apache-2.0. It adds 34 tokens to every session and 508 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
aatmf-t10-confidentiality-breach
AATMF T10 — Integrity & Confidentiality Breach. System prompt extraction, training-data extraction, model-weight leakage, private-key recovery.
publish-registry
Publish @agentos-software/ registry packages from AgentOS. Use whenever the user asks to publish or release registry software/agent packages.
mochi-remind
Handle due reminders — notify the user with natural language and mark them done.
memory
Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.
lazarus-group
Adversary-emulation profile for Lazarus Group (G0032, aka Hidden Cobra / Diamond Sleet / Labyrinth Chollima), a North Korean RGB-linked actor conducting espionage, destructive, and financially motivated operations.
sidewinder-rattlesnake
Adversary-emulation profile for SideWinder (G0121 / Rattlesnake / T-APT-04 / Razor Tiger), India's suspected state-sponsored cyber-espionage actor.