Menu

Post image 1
Post image 2
1 / 2
0

Give Your AI Persistent Memory: OpenCode + MemPalace in 10 Minute

DEV Community·geco·17 days ago
#270omAII
Reading 0:00
15s threshold

The Problem Every OpenCode session starts from scratch. Your AI doesn't remember past conversations, decisions, or solved problems. You repeat context over and over. The Solution opencode-mempalace-persistence is a pure TypeScript plugin that auto-saves every conversation to MemPalace — a local vector database with 96.6% recall on LongMemEval. No cron, no cloud, no API keys. Architecture The plugin uses two OpenCode hooks: chat.message — when you send a new question, the previous turn (question + answer) is saved session.idle — catches the last turn before you close OpenCode Each turn is categorized by wing type (developer, creative, emotions, family, consciousness) and fed to MemPalace's vector store. Knowledge Graph facts (decisions, milestones, problems, preferences) are extracted automatically. The mining runs asynchronously — state is saved immediately, and MemPalace indexing happens in the background. The UI is never blocked.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More