← 返回
未分类 Key 中文

Bud Semantic Memory

Vector-based semantic search for OpenClaw memories. Indexes memory files and enables meaning-based search instead of keyword matching. Uses ChromaDB for loca...
针对OpenClaw记忆的基于向量语义搜索。索引记忆文件,实现基于含义而非关键词匹配的搜索。使用ChromaDB进行本...
stigg86
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 116
下载
💾 0
安装
1
版本
#latest

概述

Semantic Memory 🧠

Search your memories by meaning, not keywords. Uses vector embeddings to find relevant information even when you don't remember the exact words.

Built on ChromaDB for fast, private, local vector search.


Setup

# Index existing memories
python3 ~/.openclaw/semantic-memory/semantic_memory.py index

Usage

# Index all memory files (run after installing or to refresh)
python3 ~/.openclaw/semantic-memory/semantic_memory.py index

# Search memories by meaning
python3 ~/.openclaw/semantic-memory/semantic_memory.py search "what did we decide about the trading bot"

# Add a new memory
python3 ~/.openclaw/semantic-memory/semantic_memory.py add "Remember to check the OANDA bot logs daily"

# Show stats
python3 ~/.openclaw/semantic-memory/semantic_memory.py stats

How It Works

  1. Indexing — Reads all .md files from ~/.openclaw/workspace/memory/, generates vector embeddings via Gemini API, stores in ChromaDB
  1. Search — Converts your query to a vector, finds most similar memories using cosine similarity
  1. Results — Returns relevant memories ranked by semantic similarity

Examples

Before (keyword search)

Query: "GBP USD trades"

Results: Only exact matches for "GBP USD"

After (semantic search)

Query: "What pairs did we trade on OANDA?"

Results: Finds GBP/USD, EUR/USD, USD/JPY etc. even without exact phrase match


Requirements

  • ChromaDB — Local vector database (pip install chromadb)
  • Gemini API key — For generating embeddings (optional, falls back to text search)
  • Get key at: https://makersuite.google.com/app/apikey
  • Save to: ~/.openclaw/credentials/gemini.json as {"api_key": "YOUR_KEY"}

Without Gemini key, uses simple text search as fallback.


Memory Sources

Automatically indexes:

  • ~/.openclaw/workspace/memory/*.md — Daily memory files
  • Manual adds via add command

Files

~/.openclaw/semantic-memory/
├── semantic_memory.py   # Main script
├── memory.log           # Log file
└── data/                # ChromaDB storage

Integration

Add to cron for automatic indexing:

# Re-index daily at 4am
0 4 * * * python3 ~/.openclaw/semantic-memory/semantic_memory.py index

Or call from other skills to search memories:

import subprocess
result = subprocess.run(
    ['python3', '/home/umbrel/.openclaw/semantic-memory/semantic_memory.py', 
     'search', 'trading decisions'],
    capture_output=True, text=True
)

Why This Matters

Regular search: "找 exactly this word"

Semantic search: "找 this meaning"

Even if I don't remember "OANDA bot flip setting", I might find "bot was losing because FLIP was disabled" — semantic search bridges that gap.


Dependencies

  • chromadb — Vector database (installed with pip)
  • gemini API key — For embeddings (optional)
  • Python 3.8+

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-06-06 07:09

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

Betting Research

stigg86
多源体育博彩研究工具,聚合赔率、球队状态、往绩交锋、天气情况和伤病数据,以发现价值投注机会。
★ 0 📥 372

Fridge Chef

stigg86
识别冰箱食材,标记即将过期物品,推荐3-5道使用现有食材的简易菜谱,并可根据需求提供详细烹饪步骤。
★ 0 📥 138

Premier League Scores

stigg86
通过ESPN API获取英超联赛实时比分、进球球员、犯规和直播频道信息。当用户询问英超比赛比分时使用。
★ 0 📥 423