alicloud-ai-search-milvus
Use AliCloud Milvus (serverless) with PyMilvus to create collections, insert vectors, and run filtered similarity search. Optimized for Claude Code/Codex vector retrieval flows.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/cinience/alicloud-ai-search-milvusCategory: provider
AliCloud Milvus (Serverless) via PyMilvus
This skill uses standard PyMilvus APIs to connect to AliCloud Milvus and run vector search.
Prerequisites
- Install SDK (recommended in a venv to avoid PEP 668 limits):
python3 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pymilvus
- Provide connection via environment variables:
MILVUS_URI(e.g.http://<host>:19530)MILVUS_TOKEN(<username>:<password>)MILVUS_DB(default:default)
Quickstart (Python)
import os
from pymilvus import MilvusClient
client = MilvusClient(
uri=os.getenv("MILVUS_URI"),
token=os.getenv("MILVUS_TOKEN"),
db_name=os.getenv("MILVUS_DB", "default"),
)
# 1) Create a collection
client.create_collection(
collection_name="docs",
dimension=768,
)
# 2) Insert data
items = [
{"id": 1, "vector": [0.01] * 768, "source": "kb", "chunk": 0},
{"id": 2, "vector": [0.02] * 768, "source": "kb", "chunk": 1},
]
client.insert(collection_name="docs", data=items)
# 3) Search
query_vectors = [[0.01] * 768]
res = client.search(
collection_name="docs",
data=query_vectors,
limit=5,
filter='source == "kb" and chunk >= 0',
output_fields=["source", "chunk"],
)
print(res)
Script quickstart
python skills/ai/search/alicloud-ai-search-milvus/scripts/quickstart.py
Environment variables:
MILVUS_URIMILVUS_TOKENMILVUS_DB(optional)MILVUS_COLLECTION(optional)MILVUS_DIMENSION(optional)
Optional args: --collection, --dimension, --limit, --filter.
Notes for Claude Code/Codex
- Insert is async; wait a few seconds before searching newly inserted data.
- Keep vector
dimensionaligned with your embedding model. - Use filters to enforce tenant scoping or dataset partitions.
Error handling
- Auth errors: check
MILVUS_TOKENand instance permissions. - Dimension mismatch: ensure all vectors match collection dimension.
- Network errors: verify VPC/public access settings on the instance.
Validation
mkdir -p output/alicloud-ai-search-milvus
for f in skills/ai/search/alicloud-ai-search-milvus/scripts/*.py; do
python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/alicloud-ai-search-milvus/validate.txt
Pass criteria: command exits 0 and output/alicloud-ai-search-milvus/validate.txt is generated.
Output And Evidence
- Save artifacts, command outputs, and API response summaries under
output/alicloud-ai-search-milvus/. - Include key parameters (region/resource id/time range) in evidence files for reproducibility.
Workflow
- Confirm user intent, region, identifiers, and whether the operation is read-only or mutating.
- Run one minimal read-only query first to verify connectivity and permissions.
- Execute the target operation with explicit parameters and bounded scope.
- Verify results and save output/evidence files.
References
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-cinience-alicloud-ai-search-milvus": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
volcengine-compute-ecs
Manage Volcengine ECS instances and related resources. Use when users need instance inventory, lifecycle operations, troubleshooting, or automation templates for ECS.
alicloud-ai-search-opensearch
Use OpenSearch vector search edition via the Python SDK (ha3engine) to push documents and run HA/SQL searches. Ideal for RAG and vector retrieval pipelines in Claude Code/Codex.
alicloud-storage-oss-ossutil
Alibaba Cloud OSS CLI (ossutil 2.0) skill. Install, configure, and operate OSS from the command line based on the official ossutil overview.
alicloud-platform-openapi-product-api-discovery
Discover and reconcile Alibaba Cloud product catalogs from Ticket System, Support & Service, and BSS OpenAPI; fetch OpenAPI product/version/API metadata; and summarize API coverage to plan new skills. Use when you need a complete product list, product-to-API mapping, or coverage/gap reports for skill generation.
alicloud-ai-image-qwen-image
Generate images with Model Studio DashScope SDK using Qwen Image generation models (qwen-image, qwen-image-plus, qwen-image-max and snapshots). Use when implementing or documenting image.generate requests/responses, mapping prompt/negative_prompt/size/seed/reference_image, or integrating image generation into the video-agent pipeline.