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 ↗5,883161
SkillHub ↗1.4万18—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

每轮对话前用用户消息检索 ChromaDB 并自动注入相关上下文,也提供手动语义搜索的检索工具。嵌入走本地 Ollama,向量存在 ChromaDB,不依赖云端接口,但需要先跑起 ChromaDB 与嵌入模型并写入索引。 记忆内容会储存在本机,之后可能在其他回合被检索;请排除密钥并检查保留内容。

资料发布于 2026-10-29

可以用来做什么

  • 给助手加上跨会话记住历史结论的能力
  • 按语义检索自己已入库的资料片段

什么时候用

  • 希望记忆留在本机、不走云端服务时
  • 需要每轮自动带出相关旧上下文时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

帮我查一下之前记过的关于部署方案的片段
把这次讨论的结论整理进我的长期记忆库

月度数据趋势

累计下载1.4万
5,8841.0万1.5万2026-03 · 累计下载 6,4962026-05 · 累计下载 7,4342026-06 · 累计下载 7,6462026-07 · 累计下载 7,8752026-08 · 累计下载 7,9742026-09 · 累计下载 8,8832026-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-098,883—18
2026-087,974+1.3%18
2026-077,875+3.0%18
2026-067,646+2.9%18
2026-057,434—18
2026-036,496—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),按月更新。口径说明见数据方法。