What You Get
- -Squish MCP server setup
- -Memory write/read integration
- -Cross-session context retention
- -Semantic memory search
- -Memory consolidation strategy
Step by Step
1. Install and configure Squish MCP server
Follow docs at squishplugin.dev to install the Squish MCP server. Configure it with your project path. Test basic operations: remember, recall, search, and context via MCP inspector.
2. Create the memory toolkit for your agent
Give your agent access to Squish tools: squish_remember (store facts, decisions, observations), squish_recall (retrieve specific memory by ID), squish_search (semantic search across memories). Define clear guidelines for what to remember.
3. Implement auto-context loading
On agent startup, call squish_context to load relevant project context. Pass the agent's task description and user identity to filter relevant memories. Set a max context limit (e.g., top 10 memories).
4. Add memory consolidation
Implement a scheduled job (weekly) that: identifies low-confidence memories (confidence < 30), identifies memories older than 30 days with < 5 accesses, archives them using squish_forget or tier=cold, logs consolidation stats.
5. Build the memory inspector UI
Create a simple Next.js page that displays: total memory count by type, recent memories, search interface, memory detail view (content, type, confidence, created_at, access_count), and pin/unpin controls.
6. Add logging and monitoring
Log every memory operation: write, read, search result count, consolidation actions. Monitor: total memory size, API call frequency, average recall relevance score.
Stack
Build This
Copy this prompt and paste it into Claude Code, OpenCode, Codex, or Cursor to build this recipe.
Common Failure Modes
- !Memory context gets too large and expensive
- !Retrieval returns irrelevant memories
- !Memory conflicts from contradictory information
- !SQLite lock contention at scale
Implementation Notes
Pin critical memories (API keys, user preferences) to prevent consolidation. Monitor memory storage size. Tune search parameters per use case.
Want agent memory with squish running in your business?
4M Labs can deploy agent memory with squish as a production workflow:
- Connected to your tools and data sources
- Secured for your team with proper access controls
- Deployed with monitoring and error handling
- Documented for handoff and future maintenance