Token导航 LogoToken导航

Agent Skill · 研究检索

milvus(milvus 数据库)

milvus 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

milvus 是研究检索类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为接触敏感数据;许可证为 MIT-0,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 17,074。

总安装 6,819周安装 287GitHub Stars 公开资料未说明下载 2,388核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.0.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:milvus(milvus 数据库)
来源仓库:https://github.com/lumina2025/milvus
安装命令:
openclaw skills install milvus
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install milvus

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

使用 pymilvus 操作 Milvus 矢量数据库 — 通过 Python 代码进行集合、矢量搜索、混合搜索、索引、RBAC、分区等。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install milvus;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

milvus 怎么安装?

在终端执行 openclaw skills install milvus。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

milvus 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

milvus 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

milvus 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

milvus 用的人多吗?

公开数据是累计安装 6,819 次,近一周安装 287 次,下载 2,388 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

milvus 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
milvus

milvus 数据库 · 本页

6,819—接触敏感数据MIT-0通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
milvus
version
1.0.0
description
Operate Milvus vector database with pymilvus — collections, vector search, hybrid search, indexes, RBAC, partitions, and more via Python code.
tags
["milvus", "vector-database", "pymilvus", "semantic-search", "rag", "embeddings"]
metadata
openclaw
emoji
\F9E0
homepage
https://github.com/milvus-io/pymilvus
primaryEnv
MILVUS_URI
requires
bins
os
install
package
pymilvus
bins
[]

Milvus Vector Database Skill

Operate Milvus vector databases directly through Python code using the pymilvus SDK. This skill covers the full lifecycle — connecting, schema design, collection management, vector CRUD, search, hybrid search, indexing, partitions, databases, and RBAC.

When to Use

Use this skill when the user wants to:

  • Connect to a Milvus instance (local, standalone, cluster, or Milvus Lite)
  • Create collections with custom schemas
  • Insert, upsert, search, query, get, or delete vectors
  • Perform hybrid search with reranking
  • Manage indexes, partitions, databases
  • Set up users, roles, and access control (RBAC)
  • Build RAG pipelines, semantic search, or recommendation systems with Milvus

Requirements

  • Python 3.8+
  • pymilvus (pip install pymilvus)
  • A running Milvus instance, or use Milvus Lite (embedded, file-based) for development

Capabilities Overview

AreaWhat You Can Do
ConnectionConnect to Milvus Lite, Standalone, Cluster, or Zilliz Cloud
CollectionsCreate (quick or custom schema), list, describe, drop, rename, load, release
VectorsInsert, upsert, search, hybrid search, query, get, delete
IndexesCreate (AUTOINDEX, HNSW, IVF_FLAT, etc.), list, describe, drop
PartitionsCreate, list, load, release, drop
DatabasesCreate, list, switch, drop
RBACUsers, roles, privileges management

Connection

from pymilvus import MilvusClient

# Milvus Lite (embedded, file-based — great for dev/test)
client = MilvusClient(uri="./milvus_demo.db")

# Standalone / Cluster Milvus
client = MilvusClient(uri="http://localhost:19530", token="root:Milvus")

# Zilliz Cloud
client = MilvusClient(
    uri="https://in03-xxxx.api.gcp-us-west1.zillizcloud.com:19530",
    token="your_api_key"
)

Parameters:

ParameterTypeDescription
uristr"./file.db" for Milvus Lite, "http://host:19530" for server
tokenstrAPI key or "username:password"
userstrUsername (alternative to token)
passwordstrPassword (alternative to token)
db_namestrTarget database (default: "default")
timeoutfloatOperation timeout in seconds

Async Client

from pymilvus import AsyncMilvusClient

async with AsyncMilvusClient(uri="http://localhost:19530") as client:
    results = await client.search(...)

Collection Management

Quick Create (auto schema + auto index + auto load)

client.create_collection(
    collection_name="my_collection",
    dimension=768,
    metric_type="COSINE"  # Optional: "COSINE" (default), "L2", "IP"
)

This automatically creates:

  • id field (INT64, primary key, auto_id)
  • vector field (FLOAT_VECTOR, dim=dimension)
  • AUTOINDEX on vector field
  • Collection is auto-loaded

Custom Schema Create

from pymilvus import DataType

# Step 1: Define schema
schema = client.create_schema(auto_id=False, enable_dynamic_field=True)
schema.add_field("id", DataType.INT64, is_primary=True)
schema.add_field("text", DataType.VARCHAR, max_length=512)
schema.add_field("embedding", DataType.FLOAT_VECTOR, dim=768)

# Step 2: Define index
index_params = client.prepare_index_params()
index_params.add_index(
    field_name="embedding",
    index_type="AUTOINDEX",
    metric_type="COSINE"
)

# Step 3: Create collection
client.create_collection(
    collection_name="my_collection",
    schema=schema,
    index_params=index_params
)

Supported Data Types

Scalar types:

DataTypeNotes
DataType.BOOLBoolean
DataType.INT8 / INT16 / INT32 / INT64Integers
DataType.FLOAT / DOUBLEFloating point
DataType.VARCHARString (requires max_length)
DataType.JSONJSON object
DataType.ARRAYArray (requires element_type, max_capacity)

Vector types:

DataTypeNotes
DataType.FLOAT_VECTORFloat32 vector (requires dim)
DataType.FLOAT16_VECTORFloat16 vector (requires dim)
DataType.BFLOAT16_VECTORBFloat16 vector (requires dim)
DataType.BINARY_VECTORBinary vector (requires dim)
DataType.SPARSE_FLOAT_VECTORSparse vector (no dim needed)

add_field Parameters

schema.add_field(
    field_name="my_field",
    datatype=DataType.VARCHAR,
    is_primary=False,
    auto_id=False,
    max_length=256,          # Required for VARCHAR
    dim=768,                 # Required for vector types (except sparse)
    element_type=DataType.INT64,  # Required for ARRAY
    max_capacity=100,        # Required for ARRAY
    nullable=False,
    default_value=None,
    is_partition_key=False,
    description=""
)

Other Collection Operations

# List all collections
collections = client.list_collections()

# Describe a collection
info = client.describe_collection(collection_name="my_collection")

# Check if collection exists
exists = client.has_collection(collection_name="my_collection")

# Rename a collection
client.rename_collection(old_name="old_name", new_name="new_name")

# Drop a collection
client.drop_collection(collection_name="my_collection")

# Load collection into memory (required before search/query)
client.load_collection(collection_name="my_collection")

# Release collection from memory
client.release_collection(collection_name="my_collection")

# Get load state
state = client.get_load_state(collection_name="my_collection")

# Get collection statistics
stats = client.get_collection_stats(collection_name="my_collection")

Collection Guidance

  • Quick create is best for prototyping; use custom schema for production.
  • A collection must be loaded before search or query operations.
  • Before dropping a collection, confirm with the user — this deletes all data.
  • Use enable_dynamic_field=True to allow inserting fields not defined in the schema.

Vector Operations

Target collection must exist and be loaded.

Insert

data = [
    {"id": 1, "text": "AI advances", "embedding": [0.1, 0.2, ...]},
    {"id": 2, "text": "ML basics", "embedding": [0.3, 0.4, ...]},
]
res = client.insert(collection_name="my_collection", data=data)
# Returns: {"insert_count": 2, "ids": [1, 2]}

Upsert (insert or update if PK exists)

res = client.upsert(collection_name="my_collection", data=data)
# Returns: {"upsert_count": 2}

Search (vector similarity)

results = client.search(
    collection_name="my_collection",
    data=[[0.1, 0.2, ...]],           # List of query vectors
    anns_field="embedding",             # Vector field name
    limit=10,                           # Top-K
    output_fields=["text", "id"],       # Fields to return
    filter='age > 20 and status == "active"',  # Optional scalar filter
    search_params={
        "metric_type": "COSINE",
        "params": {"nprobe": 10}        # Index-specific params
    }
)
# Returns: List[List[dict]]
# Each hit: {"id": ..., "distance": ..., "entity": {"text": ...}}

Hybrid Search (multi-vector with reranking)

from pymilvus import AnnSearchRequest, RRFRanker, WeightedRanker

req1 = AnnSearchRequest(
    data=[[0.1, 0.2, ...]],
    anns_field="dense_embedding",
    param={"metric_type": "COSINE", "params": {"nprobe": 10}},
    limit=10
)
req2 = AnnSearchRequest(
    data=[{1: 0.5, 100: 0.3}],          # Sparse vector
    anns_field="sparse_embedding",
    param={"metric_type": "IP"},
    limit=10
)

# RRF reranking
results = client.hybrid_search(
    collection_name="my_collection",
    reqs=[req1, req2],
    ranker=RRFRanker(k=60),
    limit=10,
    output_fields=["text"]
)

# Or weighted reranking
results = client.hybrid_search(
    collection_name="my_collection",
    reqs=[req1, req2],
    ranker=WeightedRanker(0.7, 0.3),
    limit=10
)

Query (filter-based retrieval)

results = client.query(
    collection_name="my_collection",
    filter='id in [1, 2, 3]',
    output_fields=["text", "embedding"],
    limit=100
)

Get (by primary key)

results = client.get(
    collection_name="my_collection",
    ids=[1, 2, 3],
    output_fields=["text"]
)

Delete

# By primary keys
client.delete(collection_name="my_collection", ids=[1, 2, 3])

# By filter expression
client.delete(collection_name="my_collection", filter='status == "obsolete"')

Filter Expression Syntax

ExpressionExample
Comparisonage > 20
Equalitystatus == "active"
IN listid in [1, 2, 3]
AND/ORage > 20 and status == "active"
String matchtext like "hello%"
Array containsARRAY_CONTAINS(tags, "ml")
JSON fieldjson_field["key"] > 100
Match allid > 0

Vector Guidance

  • The data parameter in search must match the collection's vector dimension exactly.
  • For text-to-vector search, convert text to vectors using an embedding model first.
  • For large inserts, batch data into chunks (e.g., 1000 rows per batch).
  • Always specify output_fields to control which fields are returned.

Index Management

Create Index

index_params = client.prepare_index_params()

# Vector index
index_params.add_index(
    field_name="embedding",
    index_type="HNSW",               # See index types table below
    metric_type="COSINE",            # "COSINE", "L2", "IP"
    params={"M": 16, "efConstruction": 256}
)

# Optional: scalar index
index_params.add_index(
    field_name="text",
    index_type=""                    # Auto-select for scalars
)

client.create_index(
    collection_name="my_collection",
    index_params=index_params
)

Common Index Types

Index TypeForKey ParamsNotes
AUTOINDEXDense vectorsAuto-tunedRecommended for most cases
FLATDense vectorsNoneBrute force, 100% recall
IVF_FLATDense vectorsnlistGood balance
IVF_SQ8Dense vectorsnlistCompressed, less memory
HNSWDense vectorsM, efConstructionHigh recall, more memory
DISKANNDense vectorsNoneDisk-based, large datasets
SPARSE_INVERTED_INDEXSparse vectorsdrop_ratio_buildFor sparse vectors
SPARSE_WANDSparse vectorsdrop_ratio_buildFaster sparse search

Metric Types

MetricDescriptionUse With
"COSINE"Cosine similarity (larger = more similar)Dense vectors
"L2"Euclidean distance (smaller = more similar)Dense vectors
"IP"Inner product (larger = more similar)Dense & Sparse vectors

Other Index Operations

# List indexes
indexes = client.list_indexes(collection_name="my_collection")

# Describe an index
info = client.describe_index(collection_name="my_collection", index_name="my_index")

# Drop an index
client.drop_index(collection_name="my_collection", index_name="my_index")

Index Guidance

  • AUTOINDEX is recommended for most use cases.
  • An index is required before loading a collection.
  • After creating an index, load the collection before searching.
  • Sparse vectors only support "IP" metric type.

Partition Management

# Create a partition
client.create_partition(collection_name="my_collection", partition_name="partition_A")

# List partitions
partitions = client.list_partitions(collection_name="my_collection")
# Returns: ["_default", "partition_A"]

# Check if partition exists
exists = client.has_partition(collection_name="my_collection", partition_name="partition_A")

# Load specific partitions
client.load_partitions(collection_name="my_collection", partition_names=["partition_A"])

# Release specific partitions
client.release_partitions(collection_name="my_collection", partition_names=["partition_A"])

# Drop a partition
client.drop_partition(collection_name="my_collection", partition_name="partition_A")

Partition Guidance

  • Every collection has a _default partition.
  • Use is_partition_key=True on a field to enable automatic partitioning by field value.
  • A partition must be loaded before search.
  • Before dropping a partition, confirm with the user — all data in it will be deleted.

Database Management

# Create a database
client.create_database(db_name="my_database")

# List all databases
databases = client.list_databases()
# Returns: ["default", "my_database"]

# Switch to a database
client.using_database(db_name="my_database")

# Drop a database (must drop all collections first)
client.drop_database(db_name="my_database")

# Or connect to a specific database at init
client = MilvusClient(uri="http://localhost:19530", db_name="my_database")

Database Guidance

  • Every Milvus instance has a "default" database.
  • Before dropping a database, all collections in it must be dropped first.

User & Role Management (RBAC)

User Operations

# Create a user
client.create_user(user_name="analyst", password="SecureP@ss123")

# List users
users = client.list_users()

# Describe a user (shows assigned roles)
info = client.describe_user(user_name="analyst")

# Update password
client.update_password(user_name="analyst", old_password="SecureP@ss123", new_password="NewP@ss456")

# Grant role to user
client.grant_role(user_name="analyst", role_name="read_only")

# Revoke role from user
client.revoke_role(user_name="analyst", role_name="read_only")

# Drop a user
client.drop_user(user_name="analyst")

Role Operations

# Create a role
client.create_role(role_name="read_only")

# List roles
roles = client.list_roles()

# Grant privilege (v2 API — recommended)
client.grant_privilege_v2(
    role_name="read_only",
    privilege="Search",                 # e.g., "Search", "Insert", "Query", "Delete"
    collection_name="my_collection",    # Use "*" for all collections
    db_name="default"                   # Use "*" for all databases
)

# Built-in privilege groups
client.grant_privilege_v2(
    role_name="admin_role",
    privilege="ClusterAdmin",           # See privilege groups below
    collection_name="*",
    db_name="*"
)

# Revoke privilege
client.revoke_privilege_v2(
    role_name="read_only",
    privilege="Search",
    collection_name="my_collection",
    db_name="default"
)

# Describe role (see granted privileges)
info = client.describe_role(role_name="read_only")

# Drop a role
client.drop_role(role_name="read_only")

Built-in Privilege Groups

GroupScope
ClusterAdminFull cluster access
ClusterReadOnlyRead-only cluster access
ClusterReadWriteRead-write cluster access
DatabaseAdminFull database access
DatabaseReadOnlyRead-only database access
DatabaseReadWriteRead-write database access
CollectionAdminFull collection access
CollectionReadOnlyRead-only collection access
CollectionReadWriteRead-write collection access

Common Individual Privileges

Search, Query, Insert, Delete, Upsert, CreateIndex, DropIndex, CreateCollection, DropCollection, Load, Release, CreatePartition, DropPartition

RBAC Guidance

  • Recommended workflow: create role → grant privileges → create user → assign role.
  • Use "*" for collection_name/db_name to grant on all resources.
  • Before dropping a user or role, confirm with the user.

Common Patterns

RAG Pipeline Pattern

from pymilvus import MilvusClient, DataType

# 1. Connect
client = MilvusClient(uri="http://localhost:19530")

# 2. Create collection
schema = client.create_schema(auto_id=True, enable_dynamic_field=True)
schema.add_field("id", DataType.INT64, is_primary=True)
schema.add_field("text", DataType.VARCHAR, max_length=2048)
schema.add_field("embedding", DataType.FLOAT_VECTOR, dim=768)
schema.add_field("source", DataType.VARCHAR, max_length=256)

index_params = client.prepare_index_params()
index_params.add_index(field_name="embedding", index_type="AUTOINDEX", metric_type="COSINE")

client.create_collection(collection_name="knowledge_base", schema=schema, index_params=index_params)

# 3. Insert documents (after embedding with your model)
client.insert("knowledge_base", data=[
    {"text": "chunk text...", "embedding": [...], "source": "doc1.pdf"},
])

# 4. Retrieve relevant context
results = client.search(
    collection_name="knowledge_base",
    data=[query_embedding],
    limit=5,
    output_fields=["text", "source"],
    search_params={"metric_type": "COSINE"}
)

Quick Semantic Search Pattern

# Simplest possible setup
client = MilvusClient(uri="./search.db")
client.create_collection(collection_name="docs", dimension=768)
client.insert("docs", data=[{"id": i, "vector": emb, "text": txt} for i, (emb, txt) in enumerate(zip(embeddings, texts))])
results = client.search("docs", data=[query_vector], limit=10, output_fields=["text"])

General Guidance

  • Always check if pymilvus is installed: pip install pymilvus.
  • For quick prototyping, use Milvus Lite (uri="./file.db") — no server needed.
  • A collection must be loaded into memory before search/query.
  • The vector dimension in search data must exactly match the collection schema.
  • For text queries, users need an embedding model to convert text to vectors first. Suggest pymilvus[model] for built-in embedding support.
  • Before any destructive operation (drop collection, drop database, delete vectors), always confirm with the user.
  • Use enable_dynamic_field=True when the schema may evolve.
  • For large-scale inserts, batch data into chunks of ~1000 rows.
  • Prefer AUTOINDEX unless the user has specific performance requirements.

平台分布

OpenClaw

73.79%
按下载量换算1,762

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills