better-memory
Semantic memory, intelligent compression, and context management for AI agents. Prevents context limit amnesia with real embeddings, priority-based compression, and identity persistence.
Why use this skill?
Enhance your AI agent with Better Memory. Features semantic search, intelligent compression, and identity persistence to prevent context loss and maintain long-term conversation history.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/dvntydigital/better-memoryWhat This Skill Does
Better Memory transforms your AI agent from a stateless listener into a long-term collaborator. By implementing a sophisticated semantic memory layer, it allows agents to store, retrieve, and synthesize historical interactions using local vector embeddings. This eliminates the common frustration of AI forgetting your preferences, past project decisions, or specific user context mid-conversation. The skill performs automatic deduplication to maintain a clean database and utilizes priority-based compression to ensure that only the most relevant information occupies your token budget, effectively solving the context limit amnesia inherent in standard LLMs.
Installation
To integrate this memory capability into your agent, run the following command in your terminal:
clawhub install openclaw/skills/skills/dvntydigital/better-memory
Ensure your project environment has the necessary storage permissions, as the skill creates local vector indices. After installation, initialize the contextGuardian instance in your main configuration file, providing your preferred context limit to match your model's maximum window size.
Use Cases
- Long-term Project Management: Keep track of complex project specifications, architectural decisions, and task statuses across multiple development sessions.
- Personalized Assistants: Remember specific user preferences, such as coding styles, tone of voice, or preferred project structures, to ensure the agent feels highly customized.
- Contextual Knowledge Bases: Use the agent to ingest and retrieve specific snippets from documentation or previous technical discussions without needing to re-feed the entire context.
- Research Continuity: Resume deep-dive research tasks after extended periods of inactivity by pulling relevant memories from previous investigative branches.
Example Prompts
- "OpenClaw, remember that for all future TypeScript projects, I prefer using Zod for schema validation and strict null checks in my tsconfig."
- "Search your memory for the structural changes we discussed for the user-auth module last week and summarize the main bottlenecks."
- "Summarize our recent conversation history regarding the database migration plan and store it as a high-priority memory for future reference."
Tips & Limitations
- Storage Limits: While the semantic search is efficient, index performance may degrade if you store massive volumes of irrelevant data. Use the priority system to keep the index lean.
- Local Embeddings: The system relies on local embeddings. This is excellent for privacy as no data leaves your machine, but ensure you have sufficient CPU/RAM resources for the vector indexing process.
- Token Budgeting: Always define a conservative token budget when calling
getRelevantContext. Leaving a safety buffer prevents the agent from truncating critical instructions when the memory footprint becomes too large. - Deduplication: The auto-deduplication feature is powerful, but be mindful when storing similar, yet distinct, facts. If you store very similar statements, the system may merge them, so provide enough unique context for each memory entry.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-dvntydigital-better-memory": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write