AGENT SKILL

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.

License 许可
MIT
最近更新
2026-08-23
Stars
★ 1
Forks
0

01 前言 Front Matter

name
triple-memory-baidu-embedding
version
1.0.0
metadata
{ "clawdbot": { "emoji": "?", "requires": { "skills": [ "git-notes-memory", "memory-baidu-embedding-db" ] } } }
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.

02 资源文件 12

03 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

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:

  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.

04 同仓库更多 Skills

kbarbel640-del
kbarbel640-del/skills

crowd-prompting

A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.

内容创作者
★ 1
kbarbel640-del
kbarbel640-del/skills

dilemm-ai

Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).

Skill与智能体开发
★ 1
kbarbel640-del
kbarbel640-del/skills

arxiv-paper-reviews

Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.

资料检索与研究
★ 1
kbarbel640-del
kbarbel640-del/skills

arxiv-paper-reviews

Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.

资料检索与研究
★ 1
kbarbel640-del
kbarbel640-del/skills

git-summary

Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.

★ 1
kbarbel640-del
kbarbel640-del/skills

agent-constitution

Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.

律师与法务Skill与智能体开发
★ 1