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 rules/jaychouya/memoryagent/memory-sidecargit clone --depth 1 https://github.com/jaychouya/MemoryAgentWhat 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.00775 | $0.00775 |
| Opus 5 | $0.00387 | $0.00387 |
| Sonnet 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 2d 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.
- 2d 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 (68 stars, last pushed 2mo ago), licensed MIT. It adds 775 tokens to every session, about $0.0039 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 cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.