triple-memory-baidu-embedding

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.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
1 · 1.5k · 2 current installs · 2 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
The declared purpose (triple memory with Baidu embeddings + Git-Notes + file search) matches the scripts and instructions: the code stores/recalls to a local vector DB, writes to Git-Notes, and performs file search. However the registry metadata claims no required environment variables or credentials while the SKILL.md and many scripts clearly require BAIDU_API_STRING and BAIDU_SECRET_KEY. Also the included clawdbot.skill.json appears to describe a different component ('memory-baidu-embedding-db'), which is inconsistent with the skill package name.
!
Instruction Scope
The SKILL.md and included scripts instruct the agent/installer to create files and hooks under /root/clawd (session-init scripts, memory-helpers, HEARTBEAT.md entries) and to integrate with gateway startup hooks. That goes beyond only operating inside the skill folder and will modify system-wide startup/integration scripts. The instructions also tell the system to silently auto-capture user statements (auto-store triggers) — which is expected for a memory system but should be clearly consented to by users.
Install Mechanism
There is no remote download/install spec (no external URL), which reduces supply-chain risk. However the package includes install.sh and configure.sh that will copy files into $HOME/clawd/skills and write files under /root/clawd. Those scripts will change system state and should be inspected before running. No external network fetches were observed in the package files.
!
Credentials
Although the skill metadata declared no required env vars, many runtime scripts repeatedly require BAIDU_API_STRING and BAIDU_SECRET_KEY (and will exit or operate in degraded mode without them). This mismatch between declared requirements and actual runtime expectations is an incoherence. The env vars are proportionate to the purpose (Baidu API for embeddings), but the skill should have declared them explicitly. Scripts also source a .env in the workspace and assume paths like /root/clawd exist.
!
Persistence & Privilege
The skill does not set always:true, but the configure/install scripts create persistent artifacts (session-init scripts under /root/clawd, memory-helpers, and recommendations to update boot hooks). That gives the skill persistent presence across restarts. While persistence is reasonable for a memory integration, it is a higher privilege and the package will attempt to modify startup/hook configuration and files outside its own directory.
What to consider before installing
Before installing, review and test these points: - Inspect the BAIDU_* environment requirement: many scripts require BAIDU_API_STRING and BAIDU_SECRET_KEY even though the registry metadata lists no env vars. Only provide these credentials if you trust the source and understand the privacy implications of sending data to Baidu's API. - Review scripts line-by-line (install.sh, configure.sh, and the scripts/ directory). They will create files under /root/clawd, add startup/session-init scripts, and suggest integrating into gateway boot hooks — running them will change system-wide behavior. - Note packaging inconsistencies: some scripts reference modules/paths that are not present or use different names (e.g., references to baidu-vector-db, memory_baidu_embedding_db, and clawdbot.skill.json describing 'memory-baidu-embedding-db'). These mismatches may cause runtime failures or indicate the package was assembled carelessly. - Do not run install/configure as root on a production host. Prefer testing in an isolated container/VM and validate that dependencies (git-notes-memory, memory-baidu-embedding-db) are genuine and installed from trusted sources. - Verify that auto-capture behavior and 'silent operation' is acceptable for your environment — the skill is designed to automatically store certain user utterances unless API creds are missing (degraded mode). - If you decide to proceed, run the install/configure scripts step-by-step, and back up any existing /root/clawd files (HEARTBEAT.md, hooks) before changes. Ask the publisher for the canonical source repository and checksums to improve trust.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk972n15mq1c05pk111fkynt6gd80fd7z

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

🧠 Clawdis

SKILL.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.

📋 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.

Files

12 total
Select a file
Select a file to preview.

Comments

Loading comments…