| name | openclaw-memory-os |
| description | OpenClaw Memory-OS - Digital immortality service and cognitive continuity infrastructure for personal memory management |
| tags | ["memory","knowledge-management","digital-immortality","cognitive-continuity","ai-memory","knowledge-graph","semantic-search","agent-memory","long-term-memory","openclaw"] |
OpenClaw Memory-OS
Digital immortality service and cognitive continuity infrastructure
AI-powered personal memory management system for capturing, storing, and intelligently retrieving your digital memories.
ๆฐๅญๆฐธ็ๆๅก | ่ฎค็ฅๅปถ็ปญๅบ็ก่ฎพๆฝ
Installation
Step 1: Install via ClawHub (Recommended)
clawhub install openclaw-memory-os
Step 2: Install the npm package
npm install -g openclaw-memory-os
git clone https://github.com/ZhenRobotics/openclaw-memory-os.git
cd openclaw-memory-os
npm install
npm run build
npm link
Step 3: Initialize Memory-OS
openclaw-memory-os init
openclaw-memory-os config set owner.name "Your Name"
openclaw-memory-os config set owner.email "your@email.com"
Step 4: Verify Installation
openclaw-memory-os status
Usage
When to Use This Skill
AUTO-TRIGGER when user's message contains:
- Keywords:
memory, remember, recall, ่ฎฐๅฟ, ๅๅฟ, ่ฎฐไฝ, ไฟๅญ
- Wants to save information: "remember this", "save this note", "่ฎฐไฝ่ฟไธช"
- Wants to retrieve information: "what did I say about", "find my notes on", "ๆไนๅๅ
ณไบ...่ฏดไบไปไน"
- Wants to manage knowledge: "organize my notes", "build knowledge graph"
- Agent needs long-term memory capabilities
TRIGGER EXAMPLES:
- "Remember: I prefer using TypeScript for all projects" โ Save as memory
- "What did I say about AI last week?" โ Query memory
- "Find all my notes about machine learning" โ Search memory
- "Show me what I did on March 1st" โ Timeline query
- "Build a knowledge graph of my ideas" โ Graph operation
DO NOT USE when:
- Simple reminders or todos (use task management)
- Real-time collaboration (use chat tools)
Core Features
Complete memory management system:
- ๐ค Multi-source Collection - Collect from chat, files, code, media
- ๐ง Semantic Search - AI-powered semantic understanding (planned)
- ๐ Knowledge Graph - Automatic relation discovery (planned)
- โฐ Timeline - Complete temporal tracking
- ๐ฌ Cognitive Chat - Talk with your digital self (planned)
- ๐ Privacy-First - Local storage, full control
- ๐ง Extensible - Modular collectors and processors
- ๐ค Agent-Ready - Perfect for AI agent long-term memory
Agent Usage Guide
Important Notes
CRITICAL: This is a foundational system for digital memory. Use it for:
- Storing agent conversation history
- Building personal knowledge base
- Retrieving context from past interactions
- Maintaining long-term context
Package Name: When importing, use openclaw-memory-os:
import { MemoryOS, MemoryType } from 'openclaw-memory-os';
CLI Name: When using CLI, use openclaw-memory-os:
openclaw-memory-os init
openclaw-memory-os collect --source ~/Documents
Pattern 1: Save Memory
When user wants to remember something:
import { MemoryOS, MemoryType } from 'openclaw-memory-os';
const memory = new MemoryOS({});
await memory.init();
await memory.collect({
type: MemoryType.TEXT,
content: 'User prefers using TypeScript for all projects',
metadata: {
tags: ['preference', 'development'],
context: 'project-setup-discussion',
},
});
console.log('โ Saved to memory');
Pattern 2: Search Memory
When user wants to recall something:
const results = await memory.search({
query: 'TypeScript preferences',
semantic: true,
limit: 5,
});
for (const result of results) {
console.log(`[${result.memory.type}] ${result.memory.content}`);
console.log(` Relevance: ${(result.score * 100).toFixed(1)}%`);
console.log(` Date: ${result.memory.metadata.timestamp}`);
}
Pattern 3: Timeline Query
When user wants to see past activities:
const timeline = await memory.timeline({
date: new Date('2024-03-01'),
range: 'day',
});
console.log(`\nActivities on ${timeline.date.toDateString()}:`);
console.log(`Total: ${timeline.stats.total} memories`);
timeline.memories.forEach(mem => {
console.log(`- [${mem.type}] ${mem.content.substring(0, 60)}...`);
});
Pattern 4: Agent Long-term Memory
Integration with AI agents:
async function handleConversation(userMessage: string) {
await memory.collect({
type: MemoryType.CHAT,
content: {
role: 'user',
message: userMessage,
timestamp: new Date(),
},
metadata: {
source: 'agent-chat',
tags: ['conversation'],
},
});
const relevant = await memory.search({
query: userMessage,
semantic: true,
limit: 5,
});
const context = relevant
.map(r => `[${r.memory.metadata.timestamp}] ${r.memory.content}`)
.join('\n');
const response = await generateResponse({
current: userMessage,
context: context,
});
await memory.collect({
type: MemoryType.CHAT,
content: {
role: 'assistant',
message: response,
timestamp: new Date(),
},
metadata: {
source: 'agent-chat',
tags: ['conversation', 'response'],
},
});
return response;
}
CLI Commands
Basic Operations
openclaw-memory-os init
openclaw-memory-os collect --source ~/Documents
openclaw-memory-os collect --chat chat-export.json
openclaw-memory-os search "AI and machine learning"
openclaw-memory-os search --semantic "ไบบๅทฅๆบ่ฝๅบ็จ"
openclaw-memory-os timeline --date 2024-03-01
openclaw-memory-os timeline --range "last 7 days"
openclaw-memory-os status
Advanced Operations
openclaw-memory-os graph explore --topic "AI"
openclaw-memory-os graph stats
openclaw-memory-os rebuild
openclaw-memory-os optimize
openclaw-memory-os export ~/backup.json
Use Cases
1. Personal Knowledge Base
openclaw-memory-os collect --source ~/Documents/Notes
openclaw-memory-os search --semantic "machine learning algorithms"
openclaw-memory-os graph explore
2. Agent Long-term Memory
import { MemoryOS, MemoryType } from 'openclaw-memory-os';
class MemoryAgent {
private memory: MemoryOS;
async initialize() {
this.memory = new MemoryOS({});
await this.memory.init();
}
async chat(userMessage: string) {
await this.memory.collect({
type: MemoryType.CHAT,
content: userMessage,
});
const context = await this.memory.search({
query: userMessage,
limit: 5,
});
}
}
3. Developer Memory
openclaw-memory-os collect --code ~/projects
openclaw-memory-os search "authentication implementation"
openclaw-memory-os timeline --type code --range "last month"
Configuration
Memory-OS stores config in ~/.memory-os/config.json:
{
"storage": {
"path": "~/.memory-os/data",
"backend": "local"
},
"embedding": {
"provider": "openai",
"apiKey": "${OPENAI_API_KEY}",
"model": "text-embedding-3-small"
},
"collectors": {
"auto": true,
"sources": ["~/Documents", "~/Downloads"]
},
"privacy": {
"encryption": false,
"shareStats": false
}
}
Development
Project Structure
openclaw-memory-os/
โโโ src/
โ โโโ core/ # Core engine
โ โโโ collectors/ # Data collectors
โ โโโ storage/ # Storage layer
โ โโโ query/ # Query engine
โ โโโ agents/ # Agent system
โ โโโ cli/ # CLI tool
โโโ docs/ # Documentation
โโโ tests/ # Tests
Adding Custom Collectors
import { BaseCollector, MemoryType } from 'openclaw-memory-os';
export class CustomCollector extends BaseCollector {
constructor() {
super('custom', MemoryType.TEXT);
}
async collect(source: string): Promise<CollectResult> {
const memories = [];
return {
collected: memories.length,
failed: 0,
memories,
};
}
async validate(source: string): Promise<boolean> {
return true;
}
}
Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Memory-OS Core โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ Collectors โ Processors โ Storage โ
โ โ โ โ โ
โ Multi-source AI Process Multi-layer โ
โ โ
โ Query & Retrieval Engine โ
โ โ โ
โ Cognitive Interface โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
See ARCHITECTURE.md for details.
Skill Capabilities
This skill enables:
- โ
Long-term memory for AI agents
- โ
Personal knowledge management
- โ
Semantic search across all memories (planned)
- โ
Temporal memory tracking
- โ
Knowledge graph construction (planned)
- โ
Privacy-preserving local storage
- โ
Extensible collector system
- โ
Multi-modal memory support (planned)
Documentation
Links
Contributing
OpenClaw Memory-OS is open source. Contributions welcome!
License
MIT License
Memory-OS - Digital Immortality Through Memory
Version: 0.1.0
Skill Name: openclaw-memory-os
Package Name: openclaw-memory-os