skills$openclaw/triple-memory-baidu-embedding
xqicxx4.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.

4.4k stars241 forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026data analytics

Skill Snapshot

nametriple-memory-baidu-embedding
descriptionComplete 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.
ownerxqicxx
repositoryxqicxx/triple-memory-baidu-embedding
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @xqicxx/triple-memory-baidu-embedding
last updatedFeb 7, 2026

Maintainer

xqicxx

xqicxx

Maintains triple-memory-baidu-embedding in the OpenClaw Skills directory.

View GitHub profile
File Explorer
14 files
.
scripts
baidu-memory-tools.sh
6.0 KB
memory_skill_full_verification.sh
4.2 KB
memory_skill_startup_check.sh
2.0 KB
triple-integration.sh
6.3 KB
_meta.json
310 B
clawdbot.skill.json
392 B
configure.sh
5.0 KB
CREDITS.md
1.2 KB
install.sh
2.4 KB
INTEGRATION_GUIDE.md
5.0 KB
README.md
6.2 KB
SKILL.md
6.8 KB
USAGE_EXAMPLES.md
4.6 KB
SKILL.md

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

FlagLevelWhen to Use
-i cCritical"always remember", explicit preferences
-i hHighDecisions, corrections, preferences
-i nNormalGeneral information
-i lLowTemporary notes

šŸ“‹ When to Use Each System

SystemUse For
Baidu EmbeddingConversation context, auto-retrieval with privacy
Git-NotesStructured decisions, searchable by entity/tag
File SearchWorkspace 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:

  1. The memory-boot-loader hook can be configured to run /root/clawd/session-init-triple-baidu.sh
  2. This ensures all three memory layers are initialized on startup
  3. 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

  1. Install this skill in your skills/ directory
  2. Configure your Baidu API credentials
  3. Disable original triple-memory if desired
  4. Update your bot configuration to use this memory system
  5. 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.

README.md

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:

  1. The hook will automatically run /root/clawd/session-init-triple-baidu.sh on gateway startup
  2. This initializes all three memory layers simultaneously
  3. 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

  1. Baidu Embedding Layer - Semantic search and auto-recall (requires API credentials)
  2. Git-Notes Layer - Structured, branch-aware storage (always available)
  3. 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:

  1. Install this skill
  2. Configure Baidu API credentials
  3. Disable original if desired
  4. 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:

  1. Check the documentation
  2. Review the original Triple Memory documentation
  3. Ensure Baidu API credentials are properly configured
  4. 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.