← 返回
未分类 中文

evrmem

Local Chinese semantic memory search and storage using text2vec embeddings and ChromaDB, supporting RAG-based context augmentation for AI agents.
本地中文语义记忆搜索与存储,使用 text2vec 嵌入和 ChromaDB,为 AI 代理提供基于 RAG 的上下文增强。
zhzgao zhzgao 来源
未分类 clawhub v0.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 297
下载
💾 0
安装
1
版本
#latest

概述

evrmem Skill

Name

evrmem

Description

Local Chinese Vector Memory System. Provides semantic memory search and storage for AI agents using local Chinese embedding models (text2vec) and ChromaDB. Supports RAG-based context augmentation.

When to Use

Use this skill when the user asks to:

  • "Search memories" or "Find related memories"
  • "Save this to memory"
  • "Remember this information"
  • "Search my knowledge base"
  • "Find past notes about X"
  • "Add this to my memory"
  • "What do I know about X"
  • "RAG retrieval" or "context augmentation"
  • Query or recall previous learnings

Prerequisites

Install evrmem and initialize:

pip install evrmem
evrmem init

For China users (mirror):

set HF_ENDPOINT=https://hf-mirror.com   # Windows
# or
export HF_ENDPOINT=https://hf-mirror.com   # Linux/Mac
evrmem init

Core Workflow

1. Semantic Search (Most Common)

from qmd.core.vector_db import vector_db

results = vector_db.search("React form warning", top_k=5)
for r in results:
    print(f"[{r['distance']:.3f}] {r['content'][:80]}")

Or via CLI:

evrmem search "React form warning"
evrmem search "deployment issue" --project myproject

2. Add Memory

memory_id = vector_db.add_memory(
    "React StrictMode causes Form.useForm warning",
    metadata={"project": "mes-demo", "tags": "react,antd"}
)

Or via CLI:

evrmem add "Important finding about X" --project myproject --tags react,bug

3. Structured Query

# Query by project
evrmem query --project mes-demo

# Query by tag
evrmem query --tag react

# List all projects
evrmem query --list-projects

# List all tags
evrmem query --list-tags

4. RAG Retrieval

result = vector_db.rag("how to fix the form warning", top_k=3)
print(result["context"])

Or via CLI:

evrmem rag "how to fix the form warning"
evrmem rag "how to fix the form warning" --prompt

5. Statistics

evrmem stats

Configuration

Create ~/.evrmem/config.yaml:

vector_db:
  persist_directory: "~/.evrmem/data/qmd_memory"

embedding:
  model_name: "shibing624/text2vec-base-chinese"
  device: "cpu"  # or "cuda"
  cache_folder: "~/.evrmem/models"

rag:
  top_k: 5
  min_similarity: 0.5

logging:
  level: "WARNING"

Environment Variables

| Variable | Description | Default |

|----------|-------------|---------|

| EVREM_DATA_DIR | Data directory | ~/.evrmem/data/qmd_memory |

| EVREM_MODEL_NAME | HuggingFace model name | shibing624/text2vec-base-chinese |

| EVREM_LOCAL_MODEL | Local model path (highest priority) | - |

| EVREM_DEVICE | Device for inference | cpu |

| EVREM_TOP_K | Default retrieval count | 5 |

| EVREM_MIN_SIM | Minimum similarity threshold | 0.5 |

| EVREM_LOG_LEVEL | Logging level | WARNING |

| EVREM_LOCAL_FILES_ONLY | Disable network access | false |

| HF_ENDPOINT | HuggingFace mirror endpoint | - |

Response Format

When reporting search results, use this format:

## evrmem Search Results

**Query:** "user query"
**Results:** N memories found

| Score | Project | Content |
|-------|---------|---------|
| 0.723 | mes-demo | React StrictMode causes Form.useForm warning... |
| 0.681 | docs | Deployment script timeout issue... |

### Top Match
**Project:** mes-demo | **Tags:** react,antd

> React StrictMode causes Form.useForm warning...

When adding memory:

## Memory Saved

**ID:** abc123
**Project:** mes-demo
**Tags:** react
**Content:** React StrictMode causes Form.useForm warning...

Use `evrmem search "React StrictMode"` to retrieve later.

Installation for Agent

If evrmem is not installed:

import subprocess
subprocess.run(["pip", "install", "evrmem"], check=True)
# Initialize on first use (downloads ~400MB model)
subprocess.run(["evrmem", "init"], check=True)

For China users, set mirror before init:

import os
os.environ["HF_ENDPOINT"] = "https://hf-mirror.com"
subprocess.run(["evrmem", "init"], check=True)

Edge Cases

  • Model download fails: Set HF_ENDPOINT=https://hf-mirror.com before evrmem init
  • NumPy errors: Run pip install "numpy<2" --force-reinstall
  • Offline/air-gapped: Download model on connected machine, copy ~/.evrmem/models to offline machine, set EVREM_LOCAL_FILES_ONLY=true
  • Empty search results: Try broader terms or check if memories exist with evrmem query --list-projects
  • Similarity too low: Adjust --top-k or lower EVREM_MIN_SIM threshold
  • Slow search: Use CPU by default; set EVREM_DEVICE=cuda if GPU available

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-07 18:53 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,398 📥 323,233
dev-programming

Console Patrol

zhzgao
自动扫描Web 应用的控制台错误和警告,提供针对 React、Ant Design 和 Element 等框架的诊断及修复建议。
★ 0 📥 343
ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,110 📥 833,593