memory

A persistent memory system that stores project knowledge as a graph of linked notes and rules. It tells the agent what memory to load and update for each task.

In plain words
What is it for?
Use it to load session-start instructions, follow task-specific memory links, check known risk areas, and record important fixes or decisions.
Why use it?
It helps the agent retain relevant project context across sessions instead of repeatedly starting from zero.

Cursor rule

Install

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.

agentmods
npx agentmods add rules/karstom/simplegraph-agentic/memory
Clone the repo
git clone --depth 1 https://github.com/karstom/simplegraph-agentic
Per session 291 This file is loaded in full into every session.
When invoked 291 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00291 $0.00291
Opus 5 $0.00146 $0.00146
Sonnet 5 $0.00058 $0.00058
Haiku 4.5 $0.00029 $0.00029

Measured yesterday against content hash a2888317a55b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memory 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.

adapters/cursor/memory.mdc · 27 lines

What it actually says

simplegraph-agentic Memory Graph

Session start (mandatory): CRITICAL: You MUST read (e.g. using a file reading tool) core/graph_index.md as your very first action in every conversation, without exception. It is ~40 lines. Do not skip this step. Do not load the full graph.

Rules

  1. Read core/graph_index.md first, every session.
  2. Use the Task Routing table in graph_index.md to decide which detail files to load. Only load files relevant to the current task — not all files.
  3. Before modifying any component, check its edges for VIOLATED_BY and WATCHLIST links. Any Regression with REGRESSED_N_TIMES >= 2 indicates high-risk code — proceed carefully.
  4. After fixing a bug, making an architectural decision, or identifying a dangerous code area, update the graph in the same commit. See core/HOW_TO_UPDATE.md for the protocol.
  5. If the graph contradicts the code, flag the discrepancy before implementing anything.

Multi-Repo

If core/graph_index.md lists a shared graph path, read that index too when working across repo boundaries.

Changes

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.

  1. yesterday First seen · 27 lines · 291 tokens per session scan A a2888317a55b

Subscribe to this mod's changes

memory is a cursor rule published in the GitHub repository karstom/simplegraph-agentic (5 stars, last pushed 5d ago), licensed MIT. It adds 291 tokens to every session, about $0.0015 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.