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 skills add matrixorigin/memoria --skill architecturegit clone --depth 1 https://github.com/matrixorigin/memoriaWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/matrixorigin/memoria/architecture)<a href="https://agentmods.dev/skills/matrixorigin/memoria/architecture"><img src="https://agentmods.dev/badge/skills/matrixorigin/memoria/architecture/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/matrixorigin/memoria/architecture"><img src="https://agentmods.dev/badge/skills/matrixorigin/memoria/architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00033 | $0.01908 |
| Opus 5.5 | $0.00013 | $0.00763 |
| Sonnet 5.5 | $0.00007 | $0.00382 |
| Haiku 4.5 | $0.00003 | $0.00191 |
Grade A, and why
architecture scanned grade A with 0 findings 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 3mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Workspace Layout
memoria/ # Cargo workspace root
├── crates/
│ ├── memoria-core/ # Shared types: MemoriaError, Memory, MemoryType
│ ├── memoria-storage/ # SqlMemoryStore — all SQL queries, migrations
│ ├── memoria-service/ # Business logic
│ │ └── src/
│ │ ├── service.rs # MemoryService — main entry point
│ │ ├── scheduler.rs # GovernanceScheduler — periodic tasks + leader election
│ │ ├── config.rs # Config struct (reads env vars)
│ │ ├── distributed.rs # DistributedLock, AsyncTaskStore traits + SQL impls
│ │ ├── governance/ # GovernanceStrategy trait, DefaultGovernanceStrategy
│ │ └── plugin/ # Plugin system (manifest, repository, rhai, grpc)
│ ├── memoria-api/ # REST API (axum)
│ │ └── src/
│ │ ├── lib.rs # build_router(), route registration
│ │ ├── state.rs # AppState (service, task_store, instance_id)
│ │ └── routes/ # memory, admin, governance, plugins, sessions
│ ├── memoria-mcp/ # MCP server (stdio/SSE transport)
│ ├── memoria-cli/ # CLI binary: init, mcp, serve, plugin, benchmark
│ ├── memoria-embedding/ # Embedding + LLM client
│ └── memoria-git/ # Git-for-Data: snapshots, branches, merge
├── Cargo.toml # Workspace deps
└── build.rs # Proto compilation (tonic)
Key Traits
trait GovernanceStrategy: Send + Sync {
fn strategy_key(&self) -> &str;
async fn plan(&self, store, task) -> Result<GovernancePlan>;
async fn execute(&self, store, task, plan) -> Result<GovernanceExecution>;
}
trait GovernanceStore: Send + Sync {
async fn list_active_users(&self) -> Result<Vec<String>>;
async fn quarantine_low_confidence(&self, user) -> Result<i64>;
// ... cleanup/maintenance methods
}
trait DistributedLock: Send + Sync {
async fn try_acquire(&self, key, holder, ttl) -> Result<bool>;
async fn renew(&self, key, holder, ttl) -> Result<bool>;
async fn release(&self, key, holder) -> Result<()>;
}
trait AsyncTaskStore: Send + Sync {
async fn create_task(&self, task) -> Result<()>;
async fn complete_task(&self, task_id, result) -> Result<()>;
async fn fail_task(&self, task_id, error) -> Result<()>;
async fn get_task(&self, task_id) -> Result<Option<AsyncTask>>;
}
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.
- 3mo ago First seen · 160 lines · 33 tokens per session scan A 36f145581ad1
architecture is a skill published in the GitHub repository matrixorigin/memoria (631 stars, last pushed 8d ago), licensed Apache-2.0. It adds 33 tokens to every session and 1,908 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
architecture compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| architecturematrixorigin/memoria | Skill | 631 | 8d ago | Apache-2.0 | A | 33 | Claude Code, Codex |
| sensors-add-skilltoejough/engram | Skill | 10 | 1mo ago | Apache-2.0 | A | 30 | Claude Code, Codex |
| review-prsgoogleapis/mcp-toolbox | Skill | 17k | today | Apache-2.0 | A | 162 | Claude Code, Codex |
| reproduce-buggoogleapis/mcp-toolbox | Skill | 17k | today | Apache-2.0 | A | 130 | Claude Code, Codex |
| fix-failing-testsgoogleapis/mcp-toolbox | Skill | 17k | today | Apache-2.0 | A | 87 | Claude Code, Codex |
| stale-sweepgoogleapis/mcp-toolbox | Skill | 17k | today | Apache-2.0 | A | 159 | Claude Code, Codex |
| triage-issuesgoogleapis/mcp-toolbox | Skill | 17k | today | Apache-2.0 | A | 164 | Claude Code, Codex |