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 instructions/pgmnemo/pgmnemo/agents-mdgit clone --depth 1 https://github.com/pgmnemo/pgmnemoWhat 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.08496 | $0.08496 |
| Opus 5 | $0.04248 | $0.04248 |
| Sonnet 5 | $0.01699 | $0.01699 |
| Haiku 4.5 | $0.00850 | $0.00850 |
Grade A, and why
pgmnemo AGENTS.md 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 yesterday.
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 — 800 lines — stays where its author put it; the contents beside it link to each section on GitHub.
pgmnemo — Agent Integration Guide
Version: 0.8.0
License: Apache-2.0
Install: CREATE EXTENSION pgmnemo CASCADE in your existing PostgreSQL database.
This document is the canonical reference for an AI agent or developer evaluating or integrating pgmnemo. One read covers: what it is, when to adopt it, every capability with working SQL, and how to measure adoption ROI.
1. What pgmnemo is — and the problem it solves
The problem
AI agents accumulate memory — lessons, observations, summaries, decisions — that must persist across runs and be recalled at query time. The dominant approaches each introduce the same failure cluster:
| Symptom | Root cause |
|---|---|
| Scattered stores, split query plans | Vector search, keyword search, graph edges, and metadata filters live in separate systems. Final ranking happens in application code. No single EXPLAIN shows why a memory ranked first. |
| Data egress on every write | Cloud memory APIs send observations to vendor infrastructure for LLM-powered fact extraction (~$0.17–$0.36 per 1,000 writes). Every write crosses a trust boundary you don't own. |
| Context-token bloat | Retrieval without budget discipline returns full lesson texts for everything above a score threshold. Agents receive 8,000 tokens of memory and use 200. |
| Opaque ranking | Score = some float from a black box. You cannot EXPLAIN it, regression-test it, or tune it without guess-and-check. |
| Hallucinated memory accumulates silently | No write-path enforcement links a memory to a verifiable artifact. Broken agent runs produce plausible-but-wrong memories that survive all future recalls. |
The solution: single-plan multimodal fusion inside your existing Postgres
pgmnemo is a PostgreSQL extension (CREATE EXTENSION pgmnemo CASCADE) — no
separate service, no API key, no new container.
It ranks across four retrieval channels inside one SQL query plan:
HNSW vector search (pgvector)
+ BM25 full-text (tsvector / GIN index)
+ graph-edge proximity (mem_edge BFS, causal + temporal)
+ JSONB metadata predicate pushdown (GIN index)
+ relational filters (role, project_id, state, verified_at)
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.
- yesterday First seen · 800 lines · 8,496 tokens per session scan A 106256b515bd
pgmnemo AGENTS.md is an instructions file published in the GitHub repository pgmnemo/pgmnemo (6 stars, last pushed 2d ago), licensed Apache-2.0. It adds 8,496 tokens to every session, about $0.0425 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-31.
Other instructions, from other repositories
LaunchStack CLAUDE.md
Instructions for Deodat-Lawson/LaunchStack, covering claude.md, frontend rules (apps/web, apps/landing) and workflow.
interview-guide AGENTS.md
AGENTS.md instructions for Snailclimb/interview-guide, covering ai interview platform agent rules, tech stack, commands, project structure and architecture.
interview-guide CLAUDE.md
Claude Code instructions for Snailclimb/interview-guide, covering claude code instructions, path rules and maintenance.
SoupNet CLAUDE.md
Claude Code instructions for AndyForest/SoupNet, covering claude.md, project overview, monorepo structure, common commands and or for development with hot reload.
supabase studio-composition-patterns.instructions.md
Instructions for supabase/supabase, covering react composition patterns review rules, core principle, when to flag, 1. boolean prop proliferation (high) and 2. render props instead of children (medium).
supabase studio-e2e-tests.instructions.md
Instructions for supabase/supabase, covering studio e2e test review rules, selector priority (best to worst), patterns to flag and good practices to encourage.