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/genegulanesjr/lapis/memory-layernpx skills add GeneGulanesJr/LaPis --skill memory-layergit clone --depth 1 https://github.com/GeneGulanesJr/LaPisWrote 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/genegulanesjr/lapis/memory-layer)<a href="https://agentmods.dev/skills/genegulanesjr/lapis/memory-layer"><img src="https://agentmods.dev/badge/skills/genegulanesjr/lapis/memory-layer.svg" alt="Measured on agentmods" height="20"></a>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.00029 | $0.04136 |
| Opus 5 | $0.00015 | $0.02068 |
| Sonnet 5 | $0.00006 | $0.00827 |
| Haiku 4.5 | $0.00003 | $0.00414 |
Grade A, and why
memory-layer 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 6d 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 — 277 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pi Memory Layer v6.2
Persistent memory via a single SQLite database (~/.pi/memory/memory.db).
All operations through memory-store.js — zero Python dependency, zero MCP servers.
Code parsing uses web-tree-sitter (WASM) in-process.
Code analysis (imports, call graph, complexity, dead code, churn) and doc indexing (markdown sections, links, glossary, code examples) built in — no external tools needed.
Optional HTTP server for programmatic access to the Aurex domain (missions, milestones, working units) and code analysis endpoints.
CLI Quick Reference
Session lifecycle
session-start --project NAME→ auto-recovers incomplete sessions, returns{ sessionId, recoveredSession }session-end --id INT --memories INT [--auto]→ trust-recovery + close
LaPis install/update
- Install:
pi install git:github.com/GeneGulanesJr/LaPis - Update:
pi update --extensionsorpi update --extension git:github.com/GeneGulanesJr/LaPis - Restart/reload Pi after updating so the refreshed prompt and extension resources are loaded
Observations
save --title TEXT --content TEXT [--type TYPE] [--project NAME] [--scope project|personal] [--topic-key KEY] [--session-id ID] [--force]- Dedup pipeline: trigram overlap checked against existing observations of the same type+project.
- ≥85% overlap → auto-merges (keeps new, soft-deletes old, records
observation_relations). - 60-84% overlap →
potential_duplicatewarning, lists matching IDs. - Use
--forceto bypass dedup entirely.
update --id INT [--title TEXT] [--content TEXT] [--type TYPE] [--scope SCOPE] [--topic-key KEY]- Update an existing observation in-place by ID. Only provided fields are changed.
- Use instead of saving a correction entry to avoid duplicate/misleading memories.
delete --id INT- Soft-delete an observation by ID. The memory is marked deleted but can be recovered.
- Use to clean up stale, incorrect, or superseded memories.
search --query TEXT [--project NAME] [--type TYPE] [--scope SCOPE] [--limit N] [--session-id ID]- Hybrid ranking: FTS5 relevance × recency × trust × recall history.
- Recall auto-logged when
--session-idis provided. - Results include
_scorefor transparency. --include-codeflag returns both memories AND indexed code symbols.
get --id ID— Read full memory details. In the Pi tool,memory-getrejects project-scoped memories from another project unlessallow_cross_project=trueis set, to avoid accidentally pulling stale or unrelated context.context --project NAME [--limit N] [--session-id ID] [--topic-key KEY] [--query TEXT] [--deep true]- Priority-weighted: decisions/architecture first, then bugfixes/patterns, then discoveries.
- Includes cross-project personal-scope observations.
- Excludes
skilltype from project context.
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.
- 6d ago First seen · 277 lines · 29 tokens per session scan A bb89fbc01527
memory-layer is a skill published in the GitHub repository GeneGulanesJr/LaPis (43 stars, last pushed 3d ago), licensed MIT. It adds 29 tokens to every session and 4,136 once invoked, about $0.0001 per session on Opus 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.
Other skills, from other repositories
brainctl
Unified agent memory CLI — read, write, search, and maintain the shared memory spine (brain.db). Use for persistent cross-session memory, knowledge graph, event logging, decisions, affect tracking, and consolidation.
memory-compounding
Review and sharpen persistent memory so it compounds instead of accumulating. Use when pruning pi-hermes-memory entries, doing monthly memory hygiene, or when the same lesson has been recorded multiple times.
session-handoff
Hand off work to another Pi session — write a handoff doc, save key decisions to memory, and notify the target session via intercom. Use when a session is getting long, when you need to continue work in a fresh context, or when transferring work between projects/sessions. Composes handoff.ts (doc writer) + memory…
memory-manager
Persistent project memory using SQLite + FTS5 + BM25. Fast, zero dependencies (stdlib only), production-ready. Progressive disclosure with 3 layers (compact/index/detailed).
build-with-tinybase
Scaffold, extend, and verify reactive local-first JavaScript or TypeScript applications with TinyBase. Use when choosing TinyBase for in-memory tabular or key-value state, generating an app with create-tinybase, adding schemas or UI bindings, configuring browser or database persistence, configuring MergeableStore…
ha-data-stores
Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…