joshuadavidthomas/opencode-agent-memory
Memory blocks for OpenCode, inspired by Letta.
What it solves
It provides OpenCode agents with a persistent, self-editable long-term memory system. This prevents agents from forgetting critical information across different sessions or when the conversation context is compacted, allowing them to maintain a consistent persona and remember user preferences and project-specific knowledge.
How it works
The plugin implements a system of memory blocks—structured markdown files stored on disk—that are injected into the agent's system prompt. These blocks are categorized as either global (shared across all projects) or project-specific. The agent interacts with this memory using dedicated tools to list, create, update, or replace content within these blocks. Additionally, it features an optional journal for append-only entries that the agent can search semantically using local embeddings (all-MiniLM-L6-v2).
Who it’s for
Developers using OpenCode who want their AI agents to have long-term memory, a consistent identity, and the ability to record and retrieve insights across multiple coding sessions.
Highlights
- Self-Editing Memory: Agents can actively read and modify their own memory blocks using specialized tools.
- Persistent Storage: Information is stored in markdown files, surviving session restarts and context limits.
- Shared Scopes: Supports both global memory for general preferences and project-level memory for codebase architecture.
- Semantic Journaling: An opt-in journal allowing agents to capture and semantically search discoveries and decisions.
- Local Privacy: Semantic search for the journal is performed entirely on the machine using local embeddings.
Related
- Project
- Project
- Project
- Project
- Project