| name | memory |
| description | Persistent memory across AI sessions using ChromaDB vector database. Stores and retrieves context from past conversations, decisions, and code. Use when user asks to remember something, search past conversations, recall what was done before, save context for later, or find information from previous sessions. Do NOT use for git history or file-based notes. |
| triggers | ["remember","search past","recall","what was done","previous session","save context","remember that","memory","ChromaDB","vector memory","persistent memory"] |
| negatives | ["git history","file system","file notes","backup","database","memory admin (use chromadb)","backup memory (use chromadb)"] |
| license | MIT |
| compatibility | opencode |
| metadata | {"workflow":"productivity","audience":"developers","version":"1.0.0","author":"shokunin"} |
| allowed-tools | Read Bash Write |
Memory
Persistent memory across sessions using ChromaDB vector search. Every conversation is stored and retrievable.
How It Works
The memory system uses ChromaDB (local vector database, no server needed) to store conversation context as embeddings. When you start a new session, the agent searches past memory for relevant context.
- Storage:
~/.shokunin/memory/chroma_db/ (ChromaDB persistent files)
- Sessions:
~/.shokunin/memory/sessions/ (markdown summaries per session)
- MCP Server:
~/.shokunin/memory/mcp-server.py
Workflow
Step 1: Start memory server (if not running)
The memory MCP server is configured in opencode.json. It starts automatically when OpenCode connects to it.
Step 2: Save context during session
At the end of each significant task, save context:
store_context with:
text: "Summary of what was done, key decisions, code patterns"
tags: ["project-name", "feature", "language"]
project: "project-name"
session_id: "current-session-id"
Step 3: Search past memory at session start
When starting a new session, search for relevant context:
search_context with:
query: "what we discussed about auth"
project: "current-project"
Step 4: Get full session summary
get_session_summary with:
session_id: "session-id"
Automatic Session Save
The agent should automatically:
- At the end of the session, save a summary of key decisions and context
- At the start of a new session, search for relevant past context
- Present relevant past context to the user naturally
Error Handling
| Error | Cause | Fix |
|---|
| ChromaDB not found | Not installed | pip install chromadb |
| Collection not found | First run | Creates automatically on first store |
| Slow first query | Downloading ONNX model | First run downloads ~79MB. Subsequent runs are instant. |
| Memory not returning results | No data stored yet | Normal on first use. Start by saving something. |
| Embedding model fails to download |