tickernelz/opencode-mem

OpenCode plugin that gives coding agents persistent memory using local vector database

What it solves

OpenCode Memory provides a persistent, long-term memory system for AI coding agents. It prevents the loss of technical context, project-specific decisions, and user preferences across different chat sessions, ensuring that AI agents don't forget important details as a project evolves.

How it works

The system uses a local vector database (Turso/libSQL) to store and retrieve memories. It employs embedding models (via Hugging Face transformers or OpenAI-compatible APIs) to convert text into vectors for similarity search.

Key mechanisms include:

  • Auto-capture: A background AI process that automatically summarizes and saves technical context when a session goes idle.
  • User Profile: A cross-project summary that learns the user's habits and preferences over time.
  • Memory Injection: Relevant memories are automatically injected into the AI's context during conversations.
  • Manual Control: A memory tool allowing users to explicitly add, search, or migrate memories.

Who it’s for

Developers using OpenCode AI agents who want their AI to retain project-specific knowledge and personal coding preferences across multiple sessions and projects.

Highlights

  • Local-first storage: Uses embedded Turso/libSQL with native vector search for privacy and speed.
  • Automatic learning: Extracts memories and auto-updates a user profile without requiring manual input.
  • Web UI: A dedicated interface at http://127.0.0.1:4747 to browse, inspect, and manage memories.
  • Flexible Embeddings: Supports 12+ local embedding models or remote OpenAI-compatible endpoints.
  • Workspace Support: Handles multi-repo workspaces using a .opencode-mem-project marker file to share memory across nested repositories.

Related

  • Project
  • Project
  • Project
  • Project
  • Project