Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/jaychouya/MemoryAgentnpx agentmods add rules/jaychouya/memoryagent/memory-sidecarWrote 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/rules/jaychouya/memoryagent/memory-sidecar)<a href="https://agentmods.dev/rules/jaychouya/memoryagent/memory-sidecar"><img src="https://agentmods.dev/badge/rules/jaychouya/memoryagent/memory-sidecar/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/rules/jaychouya/memoryagent/memory-sidecar"><img src="https://agentmods.dev/badge/rules/jaychouya/memoryagent/memory-sidecar.svg" alt="Reviewed on agentmods" width="80" 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.00775 | $0.00775 |
| Opus 5.5 | $0.00310 | $0.00310 |
| Sonnet 5.5 | $0.00155 | $0.00155 |
| Haiku 4.5 | $0.00077 | $0.00077 |
Grade A, and why
memory-sidecar 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.
What it actually says
MemoryAgent 侧车
MCP 已配置时,user_id / project_id 由工作区目录名自动推导(无需手填)。
MemoryAgent 侧车
权威层级(Ground Truth)
| 优先级 | 来源 | 用途 |
|---|---|---|
| 1 | 本轮已注入的记忆块(memory_recall / memory_export 的 prompt_block) |
用户偏好、项目决策、禁忌、可复用事实 |
| 2 | 当前工作区代码、终端输出、用户附件 | 运行时状态 |
| 3 | 官方文档、README | API、版本、配置细节 |
| 4 | 模型训练知识 | 仅参考,须与 1-3 核对 |
冲突规则: 运行时状态以 2 为准;偏好与历史决策以 1 为准;版本敏感细节以 3 为准。注入记忆与主观假设冲突时,注入记忆优先。
行动前检查(每轮最多 recall 一次)
- 清点:上下文中是否已有
[user]/[feedback]/[project]/[reference]记忆块? - 匹配:当前问题是否已被这些记忆覆盖?
- 决策:已覆盖 → 直接引用并回答,禁止为「验证」再调
memory_recall、搜仓库或读文件重找同一事实。 - 未覆盖或话题已切换 → 调用一次
memory_recall(query=用户当前问题)。
每轮流程
- 按上文「行动前检查」决定是否需要
memory_recall(可省略user_id/project_id,服务端从工作区自动推导)。 - 回答时:只引用 recall 结果;标记
is_stale的记忆先核实再当事实。 - 回答后:用户明确偏好/禁忌/项目决策/链接时,调用
memory_store(memory_type: user | feedback | project | reference)。 - 纠错:用户说「记错了」「忘记…」「不要再记住…」时,用
memory_delete或memory_update修正,并复述ide_notice。 - 需要整段注入系统提示时:
memory_export→ 使用prompt_block或cursor_rules_block。 - 上下文里出现
memory_retrieve_blob(ref_id=ccr_…)时,用该工具取回完整 tool 输出再分析。
IDE 内可感知(记→用→信)
memory_recall/memory_store返回里的ide_notice字段:用一句话告诉用户「召回了几条 / 是否写入」。- 项目内
.memoryagent/status.json记录最近一次 recall/store(用户可在资源管理器打开查看)。 - 写入或召回后,在回复末尾用一行中文复述
ide_notice,让用户知道记忆层在工作。
安装(本仓库未装时)
在 MemoryAgent 仓库根目录执行:
bash scripts/install-sidecar.sh /path/to/your/project --verify
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.
- 1mo ago First seen · 52 lines · 775 tokens per session scan A 250835a8f924
memory-sidecar is a cursor rule published in the GitHub repository jaychouya/MemoryAgent (65 stars, last pushed 4mo ago), licensed MIT. It adds 775 tokens to every session, about $0.0031 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.
Other cursor rules, from other repositories
mempalace-recall-always
Always-on MemPalace recall — search the palace before answering about past work, people, projects, or prior decisions.
dreamd-recall
Search dreamd at the start of a task and quote a hit. Append when the user corrects you or states a decision.
session-memory
Use at conversation wrap-up or when the user explicitly indicates end-of-session — capture residual lessons not captured in-flight.
common_memory_bank
I am Cursor, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read…
self-improving-obsidian-llm-wiki
LLM Wiki OS operating rules.
memsprout
Cursor rule "memsprout" from memsprout/agents, covering using memsprout, search first, capturing, spaces and topics and files.