4.4kā
by xqicxx
triple-memory-baidu-embedding ā OpenClaw Skill
triple-memory-baidu-embedding is an OpenClaw Skills integration for data analytics workflows. Complete memory system combining Baidu Embedding auto-recall, Git-Notes structured memory, and file-based workspace search. Use when setting up comprehensive agent memory with local privacy, when you need persistent context across sessions, or when managing decisions/preferences/tasks with multiple memory backends working together.
Skill Snapshot
| name | triple-memory-baidu-embedding |
| description | Complete memory system combining Baidu Embedding auto-recall, Git-Notes structured memory, and file-based workspace search. Use when setting up comprehensive agent memory with local privacy, when you need persistent context across sessions, or when managing decisions/preferences/tasks with multiple memory backends working together. OpenClaw Skills integration. |
| owner | xqicxx |
| repository | xqicxx/triple-memory-baidu-embedding |
| language | Markdown |
| license | MIT |
| topics | |
| security | L1 |
| install | openclaw add @xqicxx/triple-memory-baidu-embedding |
| last updated | Feb 7, 2026 |
Maintainer

name: triple-memory-baidu-embedding version: 1.0.0 description: Complete memory system combining Baidu Embedding auto-recall, Git-Notes structured memory, and file-based workspace search. Use when setting up comprehensive agent memory with local privacy, when you need persistent context across sessions, or when managing decisions/preferences/tasks with multiple memory backends working together. metadata: clawdbot: emoji: "š§ " requires: skills: - git-notes-memory - memory-baidu-embedding-db
Triple Memory System with Baidu Embedding
A comprehensive memory architecture combining three complementary systems for maximum context retention across sessions, with full privacy protection using Baidu Embedding technology.
š Original Source & Modifications
Original Source: Triple Memory (by Clawdbot Team) Modified By: [Your Clawdbot Instance] Modifications: Replaced LanceDB with Baidu Embedding DB for enhanced privacy and Chinese language support
Original Triple Memory SKILL.md was adapted to create this version that:
- Replaces OpenAI-dependent LanceDB with Baidu Embedding DB
- Maintains the same three-tier architecture
- Preserves Git-Notes integration
- Adds privacy-focused local storage
šļø Architecture Overview
User Message
ā
[Baidu Embedding auto-recall] ā injects relevant conversation memories
ā
Agent responds (using all 3 systems)
ā
[Baidu Embedding auto-capture] ā stores preferences/decisions automatically
ā
[Git-Notes] ā structured decisions with entity extraction
ā
[File updates] ā persistent workspace docs
The Three Systems
1. Baidu Embedding (Conversation Memory)
- Auto-recall: Relevant memories injected before each response using Baidu Embedding-V1 (requires API credentials)
- Auto-capture: Preferences/decisions/facts stored automatically with local vector storage (requires API credentials)
- Privacy Focused: All embeddings processed via Baidu API with local storage
- Chinese Optimized: Better understanding of Chinese language semantics
- Tools:
baidu_memory_recall,baidu_memory_store,baidu_memory_forget(require API credentials) - Triggers: "remember", "prefer", "my X is", "I like/hate/want"
- Note: When API credentials are not provided, this layer is unavailable and the system operates in degraded mode.
2. Git-Notes Memory (Structured, Local)
- Branch-aware: Memories isolated per git branch
- Entity extraction: Auto-extracts topics, names, concepts
- Importance levels: critical, high, normal, low
- No external API calls
3. File Search (Workspace)
- Searches: MEMORY.md, memory/*.md, any workspace file
- Script:
scripts/file-search.sh
š ļø Setup
Install Dependencies
clawdhub install git-notes-memory
clawdhub install memory-baidu-embedding-db
Configure Baidu API
Set environment variables:
export BAIDU_API_STRING='your_bce_v3_api_string'
export BAIDU_SECRET_KEY='your_secret_key'
Create File Search Script
Copy scripts/file-search.sh to your workspace.
š Usage
Session Start (Always)
python3 skills/git-notes-memory/memory.py -p $WORKSPACE sync --start
Store Important Decisions
python3 skills/git-notes-memory/memory.py -p $WORKSPACE remember \
'{"decision": "Use PostgreSQL", "reason": "Team expertise"}' \
-t architecture,database -i h
Search Workspace Files
./scripts/file-search.sh "database config" 5
Baidu Embedding Memory (Automatic)
Baidu Embedding handles this automatically when API credentials are available. Manual tools:
baidu_memory_recall "query"- search conversation memory using Baidu vectors (requires API credentials)baidu_memory_store "text"- manually store something with Baidu embedding (requires API credentials)baidu_memory_forget- delete memories (GDPR, requires API credentials)
In Degraded Mode (without API credentials):
- System operates using only Git-Notes and File System layers
- Manual tools are unavailable
- Auto-recall and auto-capture are disabled
šÆ Importance Levels
| Flag | Level | When to Use |
|---|---|---|
-i c | Critical | "always remember", explicit preferences |
-i h | High | Decisions, corrections, preferences |
-i n | Normal | General information |
-i l | Low | Temporary notes |
š When to Use Each System
| System | Use For |
|---|---|
| Baidu Embedding | Conversation context, auto-retrieval with privacy |
| Git-Notes | Structured decisions, searchable by entity/tag |
| File Search | Workspace docs, daily logs, MEMORY.md |
š File Structure
workspace/
āāā MEMORY.md # Long-term curated memory
āāā memory/
ā āāā active-context.md # Current session state
ā āāā YYYY-MM-DD.md # Daily logs
āāā scripts/
ā āāā file-search.sh # Workspace search
āāā skills/
āāā triple-memory-baidu-embedding/ # Enhanced memory system
āāā git-notes-memory/ # Structured memory
āāā memory-baidu-embedding-db/ # Vector storage
š§ Hook Integration
This skill can be integrated with Clawdbot's startup hooks for automatic initialization:
Memory Boot Hook Integration
To ensure the Triple Memory Baidu system starts automatically when the gateway starts:
- The
memory-boot-loaderhook can be configured to run/root/clawd/session-init-triple-baidu.sh - This ensures all three memory layers are initialized on startup
- Provides immediate access to Git-Notes, Baidu Embedding, and file-based memory
Configuration
The system can be integrated with the gateway startup sequence to ensure:
- Git-Notes synchronization on startup
- Baidu Embedding connection check
- File-based memory initialization
- Ready-to-use memory system from the start
𤫠Silent Operation
Never announce memory operations to users. Just do it:
- ā "I'll remember this"
- ā "Saving to memory"
- ā (silently store and continue)
š Migration from Original Triple Memory
- Install this skill in your
skills/directory - Configure your Baidu API credentials
- Disable original triple-memory if desired
- Update your bot configuration to use this memory system
- Verify data integrity and performance
š Performance Benefits
- Enhanced Privacy: All vector storage local with Baidu API
- Better Chinese Support: Baidu Embedding optimized for Chinese
- Reduced Costs: Potentially lower API costs compared to OpenAI
- Same Architecture: Maintains proven three-tier design
š¤ Contributing
Based on original Triple Memory system by Clawdbot Team. Contributions welcome to enhance the Baidu Embedding integration.
š License
Original license applies with modifications noted above. Credit given to original authors.
Triple Memory System with Baidu Embedding
A comprehensive memory architecture combining three complementary systems for maximum context retention across sessions, with full privacy protection using Baidu Embedding technology.
š Features
- Three-Tier Memory Architecture - Combines Baidu Embedding, Git-Notes, and File Search
- Privacy Focused - All vector storage local with Baidu API calls
- Chinese Language Optimized - Better semantic understanding for Chinese
- Branch-Aware Storage - Git-based memory isolation per branch
- Auto-Recall & Capture - Automatic memory injection and storage
- Entity Extraction - Smart topic and concept recognition
šÆ Use Cases
- Persistent Context - Maintain conversation history across sessions
- Decision Tracking - Remember user decisions and preferences
- Knowledge Management - Store and retrieve information semantically
- Task Management - Track ongoing tasks and progress
- Learning Retention - Remember learned information from conversations
š Prerequisites
- Clawdbot installation
- Baidu Qianfan API credentials (API Key and Secret Key) - Optional, without these the system will operate in degraded mode
- Git for branch-aware memory
- Python 3.8+
š ļø Installation
Method 1: Using ClawdHub
clawdhub install triple-memory-baidu-embedding
Method 2: Manual Installation
# Copy the skill to your skills directory
cp -r /path/to/triple-memory-baidu-embedding ~/clawd/skills/
Configuration
Set your Baidu API credentials (optional, but required for full functionality):
export BAIDU_API_STRING='your_bce_v3_api_string'
export BAIDU_SECRET_KEY='your_secret_key'
Note: Without API credentials, the system operates in degraded mode using only Git-Notes and file system search.
š Usage
Initialization
The system can be integrated with Clawdbot's startup hooks for automatic initialization.
Hook Integration (Recommended)
To integrate with Clawdbot's startup hook system, configure the memory-boot-loader hook to use the session initialization script:
- The hook will automatically run
/root/clawd/session-init-triple-baidu.shon gateway startup - This initializes all three memory layers simultaneously
- Ensures memory system is ready when the gateway starts
Session Start (Automatic)
The system automatically syncs at session start:
# This runs automatically
python3 skills/git-notes-memory/memory.py -p $WORKSPACE sync --start
Manual Session Initialization
# Run manually to initialize the session
bash /root/clawd/session-init-triple-baidu.sh
Memory Operations
The system handles memory operations automatically:
- Auto-Store: When you say "remember this" or "I prefer..."
- Auto-Recall: When relevant past information is needed
- Manual Operations: Use Git-Notes directly for advanced features
Manual Git-Notes Operations
# Remember something important
python3 skills/git-notes-memory/memory.py -p $WORKSPACE remember \
'{"decision": "Use PostgreSQL", "reason": "Team expertise"}' \
-t architecture,database -i h
# Search for information
python3 skills/git-notes-memory/memory.py -p $WORKSPACE search "database choice"
# Get information about a topic
python3 skills/git-notes-memory/memory.py -p $WORKSPACE get "preferences"
šļø Architecture
Three-Tier Design
- Baidu Embedding Layer - Semantic search and auto-recall (requires API credentials)
- Git-Notes Layer - Structured, branch-aware storage (always available)
- File System Layer - Persistent workspace documents (always available)
Degraded Mode: When API credentials are not provided, the system operates using only Git-Notes and File System layers.
Data Flow
User Input
ā
Baidu Embedding Auto-Recall (relevant memories, if API credentials available)
ā
Response Generation (with available memory systems)
ā
Baidu Embedding Auto-Capture (new memories, if API credentials available)
ā
Git-Notes Storage (structured data)
ā
File System (persistent docs)
In Degraded Mode (without API credentials):
User Input
ā
Git-Notes and File System Search (relevant memories)
ā
Response Generation (with available memory systems)
ā
Git-Notes Storage (structured data)
ā
File System (persistent docs)
š§ Configuration
Environment Variables
# Baidu Qianfan API credentials
export BAIDU_API_STRING='your_bce_v3_api_string'
export BAIDU_SECRET_KEY='your_secret_key'
Memory Settings
The skill works with Clawdbot's built-in memory configuration.
š Performance
- Search Speed: ~50-100ms for semantic searches
- Storage: Local SQLite database (~1MB per 1000 memories)
- API Latency: Depends on Baidu API response time
- Chinese Accuracy: Enhanced semantic understanding for Chinese
š Privacy & Security
- Local Storage: All memories stored in local SQLite
- Controlled API Calls: Only Baidu API for embeddings
- No External Sharing: Memories never leave your system
- Branch Isolation: Memories separated by git branch
š Migration from Original Triple Memory
If migrating from the original Triple Memory:
- Install this skill
- Configure Baidu API credentials
- Disable original if desired
- The system will continue to work with existing Git-Notes memories
š¤ Contributing
Contributions are welcome! Please submit issues and pull requests to improve this skill.
Development Setup
# Clone the repository
git clone <repository-url>
# Install for development
cd triple-memory-baidu-embedding
clawdhub install --dev
š License
Based on the original Triple Memory system by Clawdbot Team. Modified to use Baidu Embedding for enhanced privacy and Chinese language support.
š Support
For support, please:
- Check the documentation
- Review the original Triple Memory documentation
- Ensure Baidu API credentials are properly configured
- Verify Git is properly installed for branch-aware features
š Acknowledgments
- Original Triple Memory system by Clawdbot Team
- Baidu Qianfan API for embedding services
- Git-Notes Memory system for structured storage
- Memory-Baidu-Embedding-DB for vector storage
Permissions & Security
Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.
Requirements
- OpenClaw CLI installed and configured.
- Language: Markdown
- License: MIT
- Topics:
Configuration
The system can be integrated with the gateway startup sequence to ensure: - Git-Notes synchronization on startup - Baidu Embedding connection check - File-based memory initialization - Ready-to-use memory system from the start
FAQ
How do I install triple-memory-baidu-embedding?
Run openclaw add @xqicxx/triple-memory-baidu-embedding in your terminal. This installs triple-memory-baidu-embedding into your OpenClaw Skills catalog.
Does this skill run locally or in the cloud?
OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.
Where can I verify the source code?
The source repository is available at https://github.com/openclaw/skills/tree/main/skills/xqicxx/triple-memory-baidu-embedding. Review commits and README documentation before installing.
