memory

memory is a cursor rule for Cursor from karstom/simplegraph-agentic. It costs 382 tokens per session, scanned A, original, MIT.

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 for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to load session-start instructions, follow task-specific memory links, check known risk areas, and record important fixes or decisions.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/karstom/simplegraph-agentic/memory
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.

Clone the repo
git clone --depth 1 https://github.com/karstom/simplegraph-agentic

Made for: Cursor.

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

agentmods badge for memory

README.md
[![agentmods](https://agentmods.dev/badge/rules/karstom/simplegraph-agentic/memory/github.svg)](https://agentmods.dev/rules/karstom/simplegraph-agentic/memory)
Your own site
<a href="https://agentmods.dev/rules/karstom/simplegraph-agentic/memory"><img src="https://agentmods.dev/badge/rules/karstom/simplegraph-agentic/memory/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.

agentmods 80×15 button for memory

Your own site · 80×15
<a href="https://agentmods.dev/rules/karstom/simplegraph-agentic/memory"><img src="https://agentmods.dev/badge/rules/karstom/simplegraph-agentic/memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 382 This file is loaded in full into every session.
When invoked 382 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00382 $0.00382
Opus 5.5 $0.00153 $0.00153
Sonnet 5.5 $0.00076 $0.00076
Haiku 4.5 $0.00038 $0.00038

Measured 1mo ago against content hash 78201dd5f306, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

adapters/cursor/memory.mdc · 31 lines

What it actually says

simplegraph-agentic Memory Graph

Session start (mandatory): CRITICAL: You MUST read core/graph_index.md (or call simplegraph_index if MCP is enabled) 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 (or call simplegraph_index) 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 or file:
    • If MCP is configured: call simplegraph_check_files({files: ["path/to/file"]}).
    • Without MCP: check edge links in the loaded graph for VIOLATED_BY and WATCHLIST links. Any Regression with REGRESSED_N_TIMES >= 2 indicates high-risk code — proceed carefully.
  4. Before generating code: call simplegraph_anti_patterns() (or check core/anti_patterns.md).
  5. 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. (Use simplegraph_add_node / simplegraph_update_node if MCP is configured).
  6. 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. 1mo ago Changed · +4 lines · +91 tokens per session 78201dd5f306
  2. 1mo ago 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 4d ago), licensed MIT. It adds 382 tokens to every session, about $0.0015 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-31.