This plugin extends Claude Code with long-term memory capabilities using the OpenViking Memory integration. It enables Claude to remember and recall conversations, decisions, and context across sessions, significantly improving coherence and context retention in long-running development workflows.
- Long-term Memory Storage: Persist conversation history and context across Claude Code sessions
- Intelligent Context Recall: Automatically retrieve relevant memories based on current conversation context
- Memory Management: Efficiently manage and prune memories to maintain performance
- Session Continuity: Seamlessly continue conversations where they left off
- Memory Organization: Categorize and structure memories by project, session, and context type
- Python 3.10 or higher
- An existing Claude Code installation
- OpenViking Memory service accessible
git clone https://github.com/Yu-Xiao-Sheng/openviking-memory-plugin.git
cd openviking-memory-plugin
pip install -e .Add the following to your Claude Code settings:
{
"hooks": {
"sessionStart": [
{
"type": "memory:sessionMemory",
"options": {
"memory_service_url": "your-openviking-memory-url",
"project_id": "your-project-id",
"max_memory_size": 10000,
"memory_threshold": 0.8
}
}
]
}
}Once installed, the plugin automatically integrates with your Claude Code sessions:
- Memory Creation: Memories are created automatically as you work
- Context Recall: Relevant memories are injected into prompts based on context
- Memory Pruning: Older or less relevant memories are automatically managed
- Session Continuity: Continue conversations seamlessly between sessions
| Option | Type | Default | Description |
|---|---|---|---|
memory_service_url |
string | Required | URL to your OpenViking Memory service |
project_id |
string | Required | Unique identifier for this project |
max_memory_size |
integer | 10000 | Maximum number of memories to store |
memory_threshold |
float | 0.8 | Threshold for memory recall relevance |
The plugin categorizes memories into several types:
- Session Memories: High-level context about current session goals
- Conversation Memories: Detailed conversation history and context
- Decision Memories: Important technical decisions and their rationale
- Code Memories: Code snippets, patterns, and implementations
- Issue Memories: Problems encountered and their solutions
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate and follow the existing code style.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Built on top of Claude Code
- Powered by OpenViking Memory service
- Inspired by the need for better long-term context in AI-assisted development