Matthew Sensintaffar

Chromadb Memory Pub

AI 智慧體v1.2.1
作者:Matthew Sensintaffar更新於 2026-05-11共 6 個版本 · 最新版本釋出於 2026-02-15chromadb-memory@clawhub_msensintaffar/chromadb-memory
上下文管理記憶增強工具呼叫#Chromadb#Auto Recall#Local#Ollama#Self Hosted

據 AlphaMoat 統計,截至 2026-10,Chromadb Memory Pub 累計下載 14,149 次、獲 18 個星標,按累計下載量在本次參與排名的 10,914 個 AI 技能中排名第 1,985 位,在「AI 智慧體」分類(1,632 個)中排名第 272 位。

列表預設按累計下載量排序,也可按星標排序;詳情頁排名按累計下載量計算。

累計下載
1.4萬
星標
18
全站下載量排名
#1,985
全站前 19% · 「AI 智慧體」前 17%
平台累計下載星標評論
ClawHub ↗5883161
SkillHub ↗1.4萬18—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

每輪對話前用使用者訊息檢索 ChromaDB 並自動注入相關上下文,也提供手動語義搜尋的檢索工具。嵌入走本地 Ollama,向量存在 ChromaDB,不依賴雲端介面,但需要先跑起 ChromaDB 與嵌入模型並寫入索引。 記憶內容會儲存在本機,之後可能在其他回合被檢索;請排除金鑰並檢查保留內容。

資料釋出於 2026-10-29

可以用來做什麼

  • 給助手加上跨會話記住歷史結論的能力
  • 按語義檢索自己已入庫的資料片段

什麼時候用

  • 希望記憶留在本機、不走雲端服務時
  • 需要每輪自動帶出相關舊上下文時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

幫我查一下之前記過的關於部署方案的片段
把這次討論的結論整理進我的長期記憶庫

月度資料趨勢

累計下載1.4萬
58841萬1.5萬2026-03 · 累計下載 64962026-05 · 累計下載 74342026-06 · 累計下載 76462026-07 · 累計下載 78752026-08 · 累計下載 79742026-09 · 累計下載 88832026-10 · 累計下載 1.4萬26-0326-0926-10
星標18
1517182026-03 · 星標 152026-05 · 星標 182026-06 · 星標 182026-07 · 星標 182026-08 · 星標 182026-09 · 星標 182026-10 · 星標 1826-0326-0926-10

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-101.4萬—18
2026-098883—18
2026-087974+1.3%18
2026-077875+3.0%18
2026-067646+2.9%18
2026-057434—18
2026-036496—15

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

3.6 KB · ClawHub v1.2.1
---
name: chromadb-memory
description: Long-term memory via ChromaDB with local Ollama embeddings. Auto-recall injects relevant context every turn. No cloud APIs required — fully self-hosted.
version: 1.2.0
author: matts
homepage: https://github.com/openclaw/openclaw
metadata:
  openclaw:
    emoji: "🧠"
    requires:
展開全部(共 124 行)
      bins: ["curl"]
    category: "memory"
tags:
  - memory
  - chromadb
  - ollama
  - vector-search
  - local
  - self-hosted
  - auto-recall
---

# ChromaDB Memory

Long-term semantic memory backed by ChromaDB and local Ollama embeddings. Zero cloud dependencies.

## What It Does

- **Auto-recall**: Before every agent turn, queries ChromaDB with the user's message and injects relevant context automatically
- **`chromadb_search` tool**: Manual semantic search over your ChromaDB collection
- **100% local**: Ollama (nomic-embed-text) for embeddings, ChromaDB for vector storage

## Prerequisites

1. **ChromaDB** running (Docker recommended):
   ```bash
   docker run -d --name chromadb -p 8100:8000 chromadb/chroma:latest
   ```

2. **Ollama** with an embedding model:
   ```bash
   ollama pull nomic-embed-text
   ```

3. **Indexed documents** in ChromaDB. Use any ChromaDB-compatible indexer to populate your collection.

## Install

```bash
# 1. Copy the plugin extension
mkdir -p ~/.openclaw/extensions/chromadb-memory
cp {baseDir}/scripts/index.ts ~/.openclaw/extensions/chromadb-memory/
cp {baseDir}/scripts/openclaw.plugin.json ~/.openclaw/extensions/chromadb-memory/

# 2. Add to your OpenClaw config (~/.openclaw/openclaw.json):
```

```json
{
  "plugins": {
    "entries": {
      "chromadb-memory": {
        "enabled": true,
        "config": {
          "chromaUrl": "http://localhost:8100",
          "collectionName": "longterm_memory",
          "ollamaUrl": "http://localhost:11434",
          "embeddingModel": "nomic-embed-text",
          "autoRecall": true,
          "autoRecallResults": 3,
          "minScore": 0.5
        }
      }
    }
  }
}
```

```bash
# 4. Restart the gateway
openclaw gateway restart
```

## Config Options

| Option | Default | Description |
|--------|---------|-------------|
| `chromaUrl` | `http://localhost:8100` | ChromaDB server URL |
| `collectionName` | `longterm_memory` | Collection name (auto-resolves UUID, survives reindexing) |
| `collectionId` | — | Collection UUID (optional fallback) |
| `ollamaUrl` | `http://localhost:11434` | Ollama API URL |
| `embeddingModel` | `nomic-embed-text` | Ollama embedding model |
| `autoRecall` | `true` | Auto-inject relevant memories each turn |
| `autoRecallResults` | `3` | Max auto-recall results per turn |
| `minScore` | `0.5` | Minimum similarity score (0-1) |

## How It Works

1. You send a message
2. Plugin embeds your message via Ollama (nomic-embed-text, 768 dimensions)
3. Queries ChromaDB for nearest neighbors
4. Results above `minScore` are injected into the agent's context as `<chromadb-memories>`
5. Agent responds with relevant long-term context available

## Token Cost

Auto-recall adds ~275 tokens per turn worst case (3 results × ~300 chars + wrapper). Against a 200K+ context window, this is negligible.

## Tuning

- **Too noisy?** Raise `minScore` to 0.6 or 0.7
- **Missing context?** Lower `minScore` to 0.4, increase `autoRecallResults` to 5
- **Want manual only?** Set `autoRecall: false`, use `chromadb_search` tool

## Architecture

```
User Message → Ollama (embed) → ChromaDB (query) → Context Injection
                                                  ↓
                                          Agent Response
```

No OpenAI. No cloud. Your memories stay on your hardware.

「AI 智慧體」分類下的熱門技能

資料月份:2026-10 · 下載/星標數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。