setup-ai-memory
Skill0 starsChanged 55 days agoMITView on GitHub
Install or repair the ai-memory companion for Claude Code, Cursor, Codex and Gemini (native macOS binary, LaunchAgent, MCP + lifecycle hooks) while keeping kit layers AGENTS.md, PROJECT.md, and .claude/state authoritative. Also invoked from /setup-project (pré-check repair + depth-2 install) and /setup-pucpr when the full Cursor stack is in play. Use when the user asks to wire ai-memory, long-horizon wiki memory, cross-agent handoffs, or says setup / arrumar ai-memory. Prefer this over ad-hoc upstream copy-paste.
In this repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- claude/CLAUDE.mdCLAUDE.md
- ai-memory-curateSkill
- asd-ste100Skill
- blindspot-passSkill
- code-reviewSkill
- diagnosing-bugsSkill
- digest-filesSkill
- domain-modelingSkill
- emodeSkill
- find-skillsSkill
- grillingSkill
- handoffSkill
- new-botSkill
- prior-art-checkSkill
- prototypeSkill
- prSkill
- researchSkill
- resolving-merge-conflictsSkill
- retroSkill
- setup-matt-pocock-skillsSkill
- setup-projectSkill
- setup-pucprSkill
- simplifySkill
- tddSkill
- verification-planningSkill
- wayfinderSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Multi-tool (primary path): run ~/Projects/cursor-kit/sync-all.sh (subset via TOOLS="claude cursor codex gemini").
- Distinctive: line 57
Prefer kit script (idempotent):
- Distinctive: line 71
Do not download without user consent if they only asked for docs.
- Very specific: line 75
After wiring, if the user runs ./sync-hooks.sh, it must be merge-safe (kit scripts only.
- Distinctive: line 105
No second episodic store — checkpoint remains continue/retomar authority
- Very specific: line 106
No secrets in wiki or kit memory files (memory-security)
- Distinctive: line 107
No absolute machine-specific paths in committed docs
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Setup ai-memory
Multi-tool (primary path): run ~/Projects/cursor-kit/sync-all.sh (subset via TOOLS="claude cursor codex gemini"). It installs/repairs the binary + LaunchAgent and wires every tool. Verify with claude mcp list, codex mcp list, ai-memory doctor. Cursor-specific steps below apply only to Cursor.
Opt-in companion for long-horizon project memory. Compose upstream ai-memory with cursor-kit — do not fork, do not vendor their SKILL.md, do not replace kit episodic state.
Canonical kit root: ~/Projects/cursor-kit (or this plugin repo). Human doc (PT):
docs/tools/10-ai-memory.md. Pasteable prompt: docs/prompts/07-ai-memory-wire.md.
Ownership (do not blur)
| Layer | Authority |
| Prefs / facts | AGENTS.md (continual-learning) |
| Architecture | PROJECT.md Decisions |
| Live task / continue | .claude/state/checkpoint.json |
| Tool failures | .claude/state/failures.jsonl |
| Long-horizon wiki / handoff / FTS | ai-memory (when enabled) |
Retrieval still starts with kit layers; only then ask ai-memory MCP for handoff/brief.
Process
0. Consent
Confirm once: install/repair companion on this machine? (recommended for solo macOS Cursor + optional Claude/Codex later). If declined, stop and point at the PT doc.
1. Pré-check
| Check | Healthy | Action |
| macOS + arch | Darwin arm64/x86_64 | Else: point upstream install docs; do not run kit script |
| Binary | ai-memory on PATH or ~/Applications/ai-memory/ai-memory | Run kit installer |
| Server | curl http://127.0.0.1:49374/mcp → 405 (or 401 with auth) | Start LaunchAgent / serve |
| MCP | ~/.cursor/mcp.json has ai-memory | install-mcp --client cursor --apply |
| Hooks | hooks.json has kit and ai-memory commands | install-hooks --agent cursor --apply; never wipe kit hooks |
2. Install / repair
Prefer kit script (idempotent):
# from cursor-kit root
./scripts/install-ai-memory.shDefaults: native release tarball → ~/Applications/ai-memory, LaunchAgent,
loopback bind, zero-LLM OK, then upstream install-mcp / install-hooks for
cursor.
Overrides: AI_MEMORY_HOME, AI_MEMORY_SKIP_LAUNCHD=1, AI_MEMORY_SKIP_WIRE=1,
AI_MEMORY_FORCE_DOWNLOAD=1.
Do not download without user consent if they only asked for docs.
3. Preserve kit hooks
After wiring, if the user runs ./sync-hooks.sh, it must be merge-safe
(kit scripts only; companions preserved). If an old overwrite wiped ai-memory
entries, re-run ai-memory install-hooks --agent cursor --apply via the real
binary path under ~/Applications/ai-memory/ai-memory (not a broken symlink).
4. Verify
- LaunchAgent running (or foreground
serve) - Loopback
/mcpreturns 405 - MCP lists ai-memory beside token-engine / codebase-memory
hooks.jsonstill includes kit*.pyhooks and ai-memory hook commands- Remind: Reload Cursor MCP / window
- Optional:
memory_statusvia MCP; do not dump secrets
5. Done report
## ai-memory setup
- Consent: accepted | declined
- Binary: path | missing
- Server: up (code) | down
- MCP: wired | repaired | skipped
- Hooks: kit+companion | kit-only | needs re-wire
- Next: reload MCP; use checkpoint for continue; wiki for long-horizon recallGuardrails
- Composition: call upstream CLI; never paste their hook scripts into the plugin
- No second episodic store — checkpoint remains continue/retomar authority
- No secrets in wiki or kit memory files (
memory-security) - No absolute machine-specific paths in committed docs
- Docker path is secondary on macOS; kit default is native + LaunchAgent
- Depth 1
/setup-projectdoes not require this companion
Out of scope
- Homelab multi-user auth / TLS (point at upstream deploy docs)
- Making
ai-memory runthe Cursor launcher - Dual-write AGENTS ↔ wiki
- Cloud Projects VM install (companion is desktop/loopback-first)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

