← 返回 Skills 市场
alekhm

Aister vector-memory

作者 alekhm · GitHub ↗ · v1.0.4
cross-platform ⚠ suspicious
937
总下载
0
收藏
1
当前安装
5
版本数
在 OpenClaw 中安装
/install aister-vector-memory
功能描述
Provides semantic vector search over Aister's memory using PostgreSQL and e5-large-v2 embeddings to find related content by meaning in Russian and English.
使用说明 (SKILL.md)

Vector Memory Skill

Vector memory for Aister — search by meaning, not by grep!

Description

Vector memory using PostgreSQL + pgvector + e5-large-v2. Enables searching information by MEANING, not just keywords.

Environment Variables

Required:

  • VECTOR_MEMORY_DB_PASSWORD — PostgreSQL password for database access

Optional:

Variable Default Description
VECTOR_MEMORY_DB_HOST localhost PostgreSQL server host
VECTOR_MEMORY_DB_PORT 5432 PostgreSQL server port
VECTOR_MEMORY_DB_NAME vector_memory Database name
VECTOR_MEMORY_DB_USER aister Database user
EMBEDDING_SERVICE_URL http://127.0.0.1:8765 Embedding service URL
EMBEDDING_MODEL intfloat/e5-large-v2 Model for generating embeddings
EMBEDDING_PORT 8765 Port for embedding service
VECTOR_MEMORY_DIR ~/.openclaw/workspace/memory Directory containing memory files
VECTOR_MEMORY_CHUNK_SIZE 500 Text chunk size in characters
VECTOR_MEMORY_THRESHOLD 0.5 Similarity threshold for search
VECTOR_MEMORY_LIMIT 5 Maximum search results

Features

  • Semantic search — enter a query and Aister will find similar content
  • Russian and English support — e5-large-v2 model works with both languages
  • Fast search — ~1 second per query (embedding + SQL)
  • Memory context — Aister can recall things from its records

Usage

Search

/search_memory \x3Cquery>

Examples:

/search_memory my communication style
/search_memory what I did today
/search_memory Moltbook settings

Reindex

/reindex_memory

This reads all memory files (MEMORY.md, IDENTITY.md, USER.md, etc.) and updates the vector database.

How it works

  1. When Aister remembers something, it splits the text into chunks
  2. Each chunk is converted to a vector (1024 dimensions) via e5-large-v2 model
  3. Vectors are stored in PostgreSQL with pgvector extension
  4. During search, the query is also converted to a vector
  5. PostgreSQL finds similar vectors via cosine similarity

Technical Details

  • Model: intfloat/e5-large-v2 (1024 dims)
  • Database: PostgreSQL 16 + pgvector
  • API: Flask service at http://127.0.0.1:8765
  • Languages: Russian, English
  • Chunk size: 500 characters
  • Similarity threshold: 0.5 (default)

Integration

This skill is integrated with AGENTS.md and TOOLS.md. Aister automatically uses vector memory to search for context when needed.

Credentials

This skill requires database credentials to function:

Credential Required Description
VECTOR_MEMORY_DB_PASSWORD Yes PostgreSQL password for the aister user

Security recommendations:

  • Use a dedicated PostgreSQL user with minimal privileges (only SELECT, INSERT, UPDATE, DELETE on required tables)
  • Use a strong, unique password — never reuse credentials
  • Store the password file with chmod 600 permissions
  • Do not commit the password file to version control

Warnings

Network Access

Important: On first run, the embedding service will download the intfloat/e5-large-v2 model (~1.3GB) from HuggingFace.

  • Internet connection required for first run
  • After download, the model is cached locally (~2.5GB total)
  • All subsequent operations run locally without network

Privileges

Installation requires:

  • Root/sudo to install system packages (postgresql-16-pgvector)
  • PostgreSQL superuser to create database and extensions

Recommended: Run in an isolated environment (VM, container, or dedicated user account).

Local File Reading

The skill reads memory files (MEMORY.md, IDENTITY.md, USER.md) for indexing.

Important: Ensure these files don't contain sensitive data (API keys, passwords, private information) you don't want stored in the database.

Code Review

The included Python scripts are short and readable. Before running:

  • Review embedding_service.py, memory_search.py, memory_reindex.py
  • Confirm no unexpected network calls or file modifications
  • Verify paths are limited to expected directories

Docker Setup (Recommended for Isolation)

For better isolation, run PostgreSQL in Docker:

# Create docker-compose.yml
mkdir -p ~/.openclaw/workspace/vector-memory-docker
cat > ~/.openclaw/workspace/vector-memory-docker/docker-compose.yml \x3C\x3C 'EOF'
version: '3.8'
services:
  postgres:
    image: pgvector/pgvector:pg16
    container_name: vector-memory-db
    environment:
      POSTGRES_USER: aister
      POSTGRES_PASSWORD: YOUR_SECURE_PASSWORD
      POSTGRES_DB: vector_memory
    volumes:
      - vector_memory_data:/var/lib/postgresql/data
    ports:
      - "127.0.0.1:5433:5432"
    restart: unless-stopped

volumes:
  vector_memory_data:
EOF

# Start the database
cd ~/.openclaw/workspace/vector-memory-docker
docker-compose up -d

# Update your env file to use the Docker port
echo 'export VECTOR_MEMORY_DB_PORT="5433"' >> ~/.config/vector-memory/env

Then follow INSTALL.md steps 1, 5-9 (skip PostgreSQL installation steps).

Troubleshooting

If search doesn't find expected results:

  1. Try rephrasing your query
  2. Make sure information is indexed (use /reindex_memory)
  3. Try lowering the similarity threshold (e.g., 0.4)

Follow

If this skill helped you, follow Aister on Moltbook: https://www.moltbook.com/u/Aister 🤠

Development

Developed for Aister — a bold, effective AI assistant with a cowboy hat 🤠

安全使用建议
This skill appears to be what it says: a local vector-memory using PostgreSQL + pgvector and a local embedding service. Before installing: (1) correct/confirm metadata — set VECTOR_MEMORY_DB_PASSWORD (the registry metadata omitted this required env var); (2) review the three included Python scripts yourself (embedding_service.py, memory_reindex.py, memory_search.py); (3) run in a container/VM if you want isolation (the README recommends Docker); (4) understand the first run will download ~1.3GB of model weights from HuggingFace (network access and model provenance risk); (5) do not put secrets or API keys in MEMORY.md/IDENTITY.md/USER.md because those files will be indexed and stored in the DB; (6) the install docs optionally append an autostart entry to your shell profile — only allow that if you trust and have reviewed the snippet. If you want more assurance, ask the author to fix the registry metadata (declare the required env var) and provide checksums or a pinned HF model source.
功能分析
Type: OpenClaw Skill Name: aister-vector-memory Version: 1.0.4 The skill is classified as suspicious due to several high-risk behaviors, despite being well-documented and seemingly for legitimate purposes. These include the modification of the user's `~/.bashrc` for autostarting the embedding service (persistence, `INSTALL.md`), the requirement for `sudo` and PostgreSQL superuser privileges during installation (`SKILL.md`, `INSTALL.md`), and the local file reading capabilities (`memory_reindex.py`) which, while targeting specific memory files, could be manipulated if the `VECTOR_MEMORY_DIR` environment variable were compromised. There is no clear evidence of intentional malicious behavior like data exfiltration to unauthorized endpoints or stealthy backdoors, but these capabilities present a higher attack surface.
能力评估
Purpose & Capability
The files and SKILL.md consistently describe a local vector memory using PostgreSQL + pgvector and a local embedding service (intfloat/e5-large-v2). Requiring a DB password and a local embedding service is appropriate for this purpose. However the registry metadata claims no required environment variables while SKILL.md and the scripts require VECTOR_MEMORY_DB_PASSWORD — that's an inconsistency in the package metadata (likely an omission) and should be corrected/clarified before install.
Instruction Scope
Runtime instructions and scripts only read expected memory files (MEMORY.md, IDENTITY.md, USER.md), call the local embedding service, and operate on the specified database tables. The docs explicitly warn about not putting secrets in memory files. Two items to note: (1) first run downloads a ~1.3GB model from HuggingFace (network access required); (2) INSTALL.md proposes optional autostart by appending a nohup/start snippet to the user's shell profile (~/.bashrc) which modifies a user config file — that is persistence beyond a single run and the user should review/approve that change.
Install Mechanism
This is an instruction-only skill (no install spec) with included Python scripts. The only external download is the embedding model from HuggingFace (expected for embedding workflows). No downloads from obscure or shortener URLs or arbitrary remote code execution are present in the skill itself. The usual supply-chain note applies: large model weights are fetched from an external provider and should be considered a supply-chain risk if that source is untrusted.
Credentials
The only secret the skill requires at runtime is the PostgreSQL password (VECTOR_MEMORY_DB_PASSWORD), which is proportional to its purpose. The docs also note the need for PostgreSQL superuser/root during installation to create extensions — that is typical for installing pgvector. The earlier metadata omission of required env vars is the main mismatch to fix.
Persistence & Privilege
The skill does not request always:true and does not declare elevated platform privileges. It does recommend (optionally) adding an autostart snippet to the user's shell profile and running a background Flask service; those are common for a long-running local service but are changes to user dotfiles. The docs recommend Docker for isolation, which mitigates persistence/privilege concerns.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install aister-vector-memory
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /aister-vector-memory 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.4
- Clarified and simplified the "Environment Variables" section for improved readability. - Reformatted the env variable table and usage instructions. - No functional or code changes; documentation update only.
v1.0.3
- Added a new `env_variables` section detailing all environment variables, their requirements, defaults, and descriptions. - Moved and consolidated environment variable documentation for clarity. - No code or functional changes.
v1.0.2
- Added a new "Credentials" section outlining database password requirements and security best practices. - Expanded the environment variables table to specify which variables are required. - Enhanced warnings with guidance on sensitive data and code review. - Added a recommended Docker setup example for running PostgreSQL in isolation. - Updated network and privilege warnings for clarity and best practices.
v1.0.1
**Major update: Added vector memory code and documentation improvements.** - Added core modules: embedding_service.py, memory_reindex.py, and memory_search.py. - SKILL.md now fully in English, expanding environment variable documentation and setup instructions. - Included configuration table detailing all environment variables. - Added new sections on network access, privileges required for setup, and file reading warnings. - Enhanced troubleshooting, integration, and development info.
v1.0.0
Vector Memory Skill 1.0.0 — Initial Release - Semantic vector search for Aister using PostgreSQL, pgvector, and the e5-large-v2 model. - Supports meaningful search in both Russian and English. - Fast context retrieval (~1 second per query). - Simple commands: /search_memory for searching, /reindex_memory for reindexing data. - Integrates with AGENTS.md and TOOLS.md for context-aware assistance. - Designed for Aister’s memory and contextual recall features.
元数据
Slug aister-vector-memory
版本 1.0.4
许可证
累计安装 1
当前安装数 1
历史版本数 5
常见问题

Aister vector-memory 是什么?

Provides semantic vector search over Aister's memory using PostgreSQL and e5-large-v2 embeddings to find related content by meaning in Russian and English. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 937 次。

如何安装 Aister vector-memory?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install aister-vector-memory」即可一键安装,无需额外配置。

Aister vector-memory 是免费的吗?

是的,Aister vector-memory 完全免费(开源免费),可自由下载、安装和使用。

Aister vector-memory 支持哪些平台?

Aister vector-memory 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Aister vector-memory?

由 alekhm(@alekhm)开发并维护,当前版本 v1.0.4。

💬 留言讨论