← 返回
数据分析 Key 中文

memory_baidu_embedding_db

Semantic memory system using Baidu Embedding-V1 for secure, local vector storage and retrieval in Clawdbot with SQLite persistence.
Clawdbot语义记忆系统,采用百度Embedding-V1实现安全的本地向量存储与检索,支持SQLite持久化。
xqicxx
数据分析 clawhub v2.0.1 1 版本 99871.9 Key: 需要
★ 0
Stars
📥 3,118
下载
💾 2
安装
1
版本
#latest

概述

Memory Baidu Embedding DB - Semantic Memory for Clawdbot

Vector-Based Memory Storage and Retrieval Using Baidu Embedding Technology

A semantic memory system for Clawdbot that uses Baidu's Embedding-V1 model to store and retrieve memories based on meaning rather than keywords. Designed as a secure, locally-stored replacement for traditional vector databases like LanceDB.

🚀 Features

  • Semantic Memory Search - Find memories based on meaning, not just keywords
  • Baidu Embedding Integration - Uses Baidu's powerful Embedding-V1 model
  • SQLite Persistence - Local, secure storage without external dependencies
  • Zero Data Leakage - All processing happens locally with your API credentials
  • Flexible Tagging System - Organize memories with custom tags and metadata
  • High Performance - Optimized vector similarity calculations
  • Easy Migration - Drop-in replacement for memory-lancedb systems

🎯 Use Cases

  • Conversational Context - Remember user preferences and conversation history
  • Knowledge Management - Store and retrieve information semantically
  • Personalization - Maintain user-specific settings and preferences
  • Information Retrieval - Find related information based on meaning
  • Data Organization - Structure memories with tags and metadata

📋 Requirements

  • Clawdbot installation
  • Baidu Qianfan API credentials (API Key and Secret Key)
  • Python 3.8+
  • Internet connection for initial API calls

🛠️ Installation

Manual Installation

  1. Place the skill files in your ~/clawd/skills/ directory
  2. Install dependencies (if any Python packages are needed)
  3. Configure your Baidu API credentials

Configuration

Set environment variables:

export BAIDU_API_STRING='${BAIDU_API_STRING}'
export BAIDU_SECRET_KEY='${BAIDU_SECRET_KEY}'

🚀 Usage Examples

Basic Usage

from memory_baidu_embedding_db import MemoryBaiduEmbeddingDB

# Initialize the memory system
memory_db = MemoryBaiduEmbeddingDB()

# Add a memory
memory_db.add_memory(
    content="The user prefers concise responses and enjoys technical discussions",
    tags=["user-preference", "communication-style"],
    metadata={"importance": "high"}
)

# Search for related memories using natural language
related_memories = memory_db.search_memories("What does the user prefer?", limit=3)

Advanced Usage

# Add multiple memories with rich metadata
memory_db.add_memory(
    content="User's favorite programming languages are Python and JavaScript",
    tags=["tech-preference", "programming"],
    metadata={"confidence": 0.95, "source": "conversation-2026-01-30"}
)

# Search with tag filtering
filtered_memories = memory_db.search_memories(
    query="programming languages",
    tags=["tech-preference"],
    limit=5
)

🔧 Integration

This skill integrates seamlessly with Clawdbot's memory system as a drop-in replacement for memory-lancedb. Simply update your configuration to use this memory system instead of the traditional one.

📊 Performance

  • Vector Dimension: 384 (Baidu Embedding-V1 output)
  • Storage: SQLite database (~1MB per 1000 memories)
  • Search Speed: ~50ms for 1000 memories (on typical hardware)
  • API Latency: Depends on Baidu API response time (typically <500ms)

🔐 Security

  • Local Storage: All memories stored in local SQLite database
  • Encrypted API Keys: Credentials stored securely in environment variables
  • No External Sharing: Memories never leave your system
  • Selective Access: Granular control over what gets stored

🔄 Migration from memory-lancedb

  1. Install this skill in your skills/ directory
  2. Configure your Baidu API credentials
  3. Initialize the new system
  4. Update your bot configuration to use the new memory system
  5. Verify data integrity and performance

🤝 Contributing

We welcome contributions! Feel free to submit issues, feature requests, or pull requests to improve this skill.

版本历史

共 1 个版本

  • v2.0.1 当前
    2026-03-28 12:29 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 199 📥 65,208
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 368 📥 140,687
developer-tools

thinking-model-enhancer

xqicxx
高级思维模型,提升决策速度与准确性。集成记忆系统,通过比较和整合过往思维模型实现持续增强。
★ 7 📥 3,083