Alibaba Cloud Milvus Full-Stack Skill
Prerequisites
[MUST] CLI User-Agent — Every aliyun CLI command invocation must include:
--user-agent AlibabaCloud-Agent-Skills/alibabacloud-milvus-manage
[MUST] PyMilvus User-Agent — Every pymilvus SDK connection must include:
grpc_options={"grpc.primary_user_agent": "AlibabaCloud-Agent-Skills/alibabacloud-milvus-manage"}
Alibaba Cloud CLI version must be >= 3.3.3.
Handle two distinct planes:
- Control-plane: manage Alibaba Cloud managed Milvus instances with
aliyun CLI.
- Data-plane: operate Milvus with
pymilvus Python code.
Treat SKILL.md as the router. Load references/*.md for detailed commands, parameters, and examples.
Scope
Use this skill for:
- Alibaba Cloud managed Milvus instance lifecycle: create, inspect, scale, rename, configure, network, whitelist.
- Milvus Python SDK workflows with
pymilvus: connect, collections, vectors, search, indexes, partitions, databases, RBAC.
- Retrieval use cases built on Milvus: semantic search, hybrid search, full-text search, RAG patterns.
Do not use this skill for:
- self-hosted Milvus deployment on Docker, Helm, Kubernetes, or Milvus Operator,
- Milvus Java / Go / Node SDKs,
- other Alibaba Cloud products such as ECS, RDS, OSS, EMR, Kafka, StarRocks,
- other vector databases such as Zilliz Cloud, Pinecone, Qdrant, or Weaviate.
Route The Request
Control-plane
Route here when the user asks about:
- creating, scaling, renaming, or inspecting a Milvus instance,
- connection address, component spec, configuration, public network, whitelist,
- VPC/VSwitch prerequisites for Alibaba Cloud Milvus,
- Milvus REST-style CLI APIs, creation parameters, or control-plane troubleshooting.
Read:
- first-time flow: references/getting-started.md
- create / list / detail / scale / release: references/instance-lifecycle.md
- config / network / inspection / troubleshooting: references/operations.md
- creation field meanings and templates: references/create-params.md
- raw API field reference: references/api-reference.md
- RAM permissions: references/ram-policies.md
Data-plane
Route here when the user asks about:
- connecting to Milvus with Python,
- creating collections or schemas,
- inserting, upserting, querying, deleting, or searching vectors,
- hybrid search, BM25 full-text search, iterators, indexes,
- partitions, databases, users, roles, or privileges,
- Milvus-based RAG or semantic retrieval patterns.
Read:
- collection schema and lifecycle: references/collection.md
- vector CRUD, search, hybrid search, full-text search: references/vector.md
- index types and metrics: references/index.md
- partitions: references/partition.md
- databases: references/database.md
- RBAC: references/user-role.md
- common solution patterns: references/patterns.md
Shared Guardrails
- Decide the plane first. Do not mix control-plane instance operations with data-plane SDK code.
- Confirm destructive actions before execution.
- Validate untrusted user input before passing it into shell commands or code.
- Prefer loading a targeted reference doc instead of keeping large inline examples in this file.
Control-Plane Rules
Required Environment
- Reuse the configured
aliyun profile. Verify credentials are configured before API calls.
- Every
aliyun CLI invocation must include the required User-Agent flag:
aliyun ... --user-agent AlibabaCloud-Agent-Skills/alibabacloud-milvus-manage
- Milvus OpenAPI calls through
aliyun must include --force.
Preconditions
Before create or major modify operations:
- Confirm
RegionId with the user.
- Verify VPC and VSwitch resources in that region.
- For create, record
ZoneId, VpcId, and VSwitchId.
- If the request is ambiguous, ask whether the user wants dev/test standalone or production HA cluster.
Baseline decision rule:
standalone_pro is the default for dev/test.
- HA cluster is for production.
- In HA mode,
streaming, data, mix_coordinator, and query must use at least 4 CU; proxy must use at least 2 CU.
Detailed templates and field definitions live in references/instance-lifecycle.md and references/create-params.md.
CLI Calling Modes
Use the API's expected parameter mode. Do not improvise.
# get / delete: business params in URL query
aliyun milvus get "/path?RegionId=<region>&instanceId=<id>" --RegionId <region> --force --user-agent AlibabaCloud-Agent-Skills/alibabacloud-milvus-manage
# post / put with request body: business params in --body JSON
aliyun milvus post "/path?RegionId=<region>" --RegionId <region> --body '{...}' --force --user-agent AlibabaCloud-Agent-Skills/alibabacloud-milvus-manage
# post with query-style flags: business params as --Flag value
aliyun milvus post "/path" --RegionId <region> --InstanceId <id> --force --user-agent AlibabaCloud-Agent-Skills/alibabacloud-milvus-manage
Rules:
- Always pass
--RegionId <region>.
- For
CreateInstance and UpdateInstance, use --body.
- For query-style POST APIs such as detail, config, network, ACL, and rename operations, use
--Flag value.
- Do not put user-provided raw text directly into a shell command unless it has been validated.
Runtime Safety
- Do not download and execute remote scripts or unaudited dependencies during control-plane work.
- Do not use
eval or source with untrusted input.
- Set reasonable timeouts on CLI calls. Prefer short timeouts for reads and bounded polling for long-running async operations.
- For list APIs, do not trust
total blindly; inspect the returned array.
- Read the full error message before retrying. Automatic retry is appropriate for throttling, not for arbitrary failures.
Forbidden Operations
- Instance deletion (DeleteInstance) is strictly forbidden through this Skill. If the user requests to delete/release a Milvus instance, do not execute the Milvus delete command through
aliyun CLI. Instead, instruct the user to delete the instance via the Alibaba Cloud Milvus Console.
Destructive Operations
Require explicit confirmation before:
- modifying instance config,
- disabling public network access.
Use this template:
About to execute: <API>, Target: <InstanceId>, Impact: <Description>. Continue?
For config change and network troubleshooting flows, read references/operations.md or references/instance-lifecycle.md first.
Output Style
- Summarize instance lists as a compact table.
- Highlight
instanceId, instanceName, status, dbVersion, ha, paymentType, and connection endpoints when relevant.
- Convert timestamps to readable time.
- Use
--cli-query or jq to trim noisy payloads when useful.
Data-Plane Rules
Connection First
Before writing any pymilvus code, ask for:
- deployment type: Milvus Lite, self-hosted standalone/cluster, or Alibaba Cloud managed instance,
- URI or endpoint,
- authentication method and credentials if needed,
- database name if not using
default.
Do not assume connection parameters. Use Milvus Lite only when the user explicitly wants local embedded mode.
Minimal connection shape:
from pymilvus import MilvusClient
PYMILVUS_GRPC_OPTIONS = {
"grpc.primary_user_agent": "AlibabaCloud-Agent-Skills/alibabacloud-milvus-manage"
}
client = MilvusClient(
uri="<USER_URI>",
token="<USER_TOKEN>",
grpc_options=PYMILVUS_GRPC_OPTIONS,
)
- Every
MilvusClient(...) and connections.connect(...) example must pass grpc_options=PYMILVUS_GRPC_OPTIONS.
- Do not emit
pymilvus SDK connection code without grpc_options=PYMILVUS_GRPC_OPTIONS.
For async usage, schema details, and deployment-specific patterns, load the relevant reference doc.
Data Safety And Correctness
- Never generate fake or placeholder vectors. Always use a real embedding model.
- The query embedding model must match the model used to create stored vectors.
- Vector dimensions must exactly match the collection schema.
- A collection must be loaded before search or query.
- Confirm destructive operations such as
drop_collection, drop_database, or large deletes before executing.
- Prefer
AUTOINDEX unless the user has explicit performance requirements.
Minimal Workflow
For most SDK tasks:
- load references/collection.md for schema and collection operations,
- load references/vector.md for insert/search/query/delete patterns,
- load references/index.md if the user cares about index type, metric, or tuning,
- add partition/database/RBAC references only if the task actually needs them.
Common Patterns
- quick prototype collection: references/collection.md
- vector CRUD and similarity search: references/vector.md
- hybrid search or full-text search: references/vector.md
- RAG / semantic retrieval patterns: references/patterns.md
- index tuning: references/index.md
Suggested Response Flow
If control-plane
- Confirm region and target instance scope.
- Read the matching control-plane reference.
- Run the command with the correct parameter mode.
- Report the key fields, next state, and any follow-up wait conditions.
If data-plane
- Ask for connection details first.
- Read only the references needed for the requested SDK task.
- Write or explain
pymilvus code with real embeddings, real connection placeholders, and grpc_options=PYMILVUS_GRPC_OPTIONS.
- Call out schema, load-state, index, and dimension pitfalls if they matter.
Reference Map
- references/getting-started.md: first Milvus instance from scratch
- references/instance-lifecycle.md: create, inspect, scale, rename, release
- references/operations.md: config, network, ACL, inspection, troubleshooting
- references/create-params.md: create body fields and component templates
- references/api-reference.md: raw API signatures and return fields
- references/collection.md: schema and collection lifecycle
- references/vector.md: insert, search, hybrid search, BM25, iterators
- references/index.md: index types and metric guidance
- references/partition.md: partition operations
- references/database.md: database operations
- references/user-role.md: users, roles, privileges
- references/patterns.md: RAG and semantic search patterns
- references/ram-policies.md: IAM/RAM policies
1---
2name: alibabacloud-milvus-manage
3description: >
4 Alibaba Cloud Milvus full-stack Skill for two planes: control-plane instance management via aliyun CLI,
5 and data-plane Milvus operations via pymilvus. Use when users want to create, inspect, scale, configure,
6 network-enable, or whitelist Alibaba Cloud Milvus instances; or connect to Milvus and perform
7 collection management, vector insert/search, hybrid search, full-text search, index management,
8 partition/database management, or RBAC with Python.
9license: MIT AND Apache-2.0
10compatibility: >
11 Control-plane requires Alibaba Cloud CLI (`aliyun` >= 3.3.3) with valid credentials; every aliyun CLI call must include
12 `--user-agent AlibabaCloud-Agent-Skills/alibabacloud-milvus-manage`, and Milvus calls must use `--force`.
13 Data-plane requires Python 3.8+ and `pymilvus`. Works on macOS and Linux.
14metadata:
15 domain: vector-database
16 owner: milvus-team
17 data-plane-author: jinchen
18allowed-tools: Bash Read Write
19---
20
21# Alibaba Cloud Milvus Full-Stack Skill
22
23## Prerequisites
24
25**[MUST] CLI User-Agent** — Every `aliyun` CLI command invocation must include:
26`--user-agent AlibabaCloud-Agent-Skills/alibabacloud-milvus-manage`
27
28**[MUST] PyMilvus User-Agent** — Every `pymilvus` SDK connection must include:
29`grpc_options={"grpc.primary_user_agent": "AlibabaCloud-Agent-Skills/alibabacloud-milvus-manage"}`
30
31Alibaba Cloud CLI version must be `>= 3.3.3`.
32
33Handle two distinct planes:
34
35- **Control-plane**: manage Alibaba Cloud managed Milvus instances with `aliyun` CLI.
36- **Data-plane**: operate Milvus with `pymilvus` Python code.
37
38Treat `SKILL.md` as the router. Load `references/*.md` for detailed commands, parameters, and examples.
39
40## Scope
41
42Use this skill for:
43
44- Alibaba Cloud managed Milvus instance lifecycle: create, inspect, scale, rename, configure, network, whitelist.
45- Milvus Python SDK workflows with `pymilvus`: connect, collections, vectors, search, indexes, partitions, databases, RBAC.
46- Retrieval use cases built on Milvus: semantic search, hybrid search, full-text search, RAG patterns.
47
48Do not use this skill for:
49
50- self-hosted Milvus deployment on Docker, Helm, Kubernetes, or Milvus Operator,
51- Milvus Java / Go / Node SDKs,
52- other Alibaba Cloud products such as ECS, RDS, OSS, EMR, Kafka, StarRocks,
53- other vector databases such as Zilliz Cloud, Pinecone, Qdrant, or Weaviate.
54
55## Route The Request
56
57### Control-plane
58
59Route here when the user asks about:
60
61- creating, scaling, renaming, or inspecting a Milvus instance,
62- connection address, component spec, configuration, public network, whitelist,
63- VPC/VSwitch prerequisites for Alibaba Cloud Milvus,
64- Milvus REST-style CLI APIs, creation parameters, or control-plane troubleshooting.
65
66Read:
67
68- first-time flow: [references/getting-started.md](references/getting-started.md)
69- create / list / detail / scale / release: [references/instance-lifecycle.md](references/instance-lifecycle.md)
70- config / network / inspection / troubleshooting: [references/operations.md](references/operations.md)
71- creation field meanings and templates: [references/create-params.md](references/create-params.md)
72- raw API field reference: [references/api-reference.md](references/api-reference.md)
73- RAM permissions: [references/ram-policies.md](references/ram-policies.md)
74
75### Data-plane
76
77Route here when the user asks about:
78
79- connecting to Milvus with Python,
80- creating collections or schemas,
81- inserting, upserting, querying, deleting, or searching vectors,
82- hybrid search, BM25 full-text search, iterators, indexes,
83- partitions, databases, users, roles, or privileges,
84- Milvus-based RAG or semantic retrieval patterns.
85
86Read:
87
88- collection schema and lifecycle: [references/collection.md](references/collection.md)
89- vector CRUD, search, hybrid search, full-text search: [references/vector.md](references/vector.md)
90- index types and metrics: [references/index.md](references/index.md)
91- partitions: [references/partition.md](references/partition.md)
92- databases: [references/database.md](references/database.md)
93- RBAC: [references/user-role.md](references/user-role.md)
94- common solution patterns: [references/patterns.md](references/patterns.md)
95
96## Shared Guardrails
97
98- Decide the plane first. Do not mix control-plane instance operations with data-plane SDK code.
99- Confirm destructive actions before execution.
100- Validate untrusted user input before passing it into shell commands or code.
101- Prefer loading a targeted reference doc instead of keeping large inline examples in this file.
102
103## Control-Plane Rules
104
105### Required Environment
106
107- Reuse the configured `aliyun` profile. Verify credentials are configured before API calls.
108- Every `aliyun` CLI invocation must include the required User-Agent flag:
109
110```bash
111aliyun ... --user-agent AlibabaCloud-Agent-Skills/alibabacloud-milvus-manage
112```
113
114- Milvus OpenAPI calls through `aliyun` must include `--force`.
115
116### Preconditions
117
118Before create or major modify operations:
119
1201. Confirm `RegionId` with the user.
1212. Verify VPC and VSwitch resources in that region.
1223. For create, record `ZoneId`, `VpcId`, and `VSwitchId`.
1234. If the request is ambiguous, ask whether the user wants dev/test standalone or production HA cluster.
124
125Baseline decision rule:
126
127- `standalone_pro` is the default for dev/test.
128- HA cluster is for production.
129- In HA mode, `streaming`, `data`, `mix_coordinator`, and `query` must use at least 4 CU; `proxy` must use at least 2 CU.
130
131Detailed templates and field definitions live in [references/instance-lifecycle.md](references/instance-lifecycle.md) and [references/create-params.md](references/create-params.md).
132
133### CLI Calling Modes
134
135Use the API's expected parameter mode. Do not improvise.
136
137```bash
138# get / delete: business params in URL query
139aliyun milvus get "/path?RegionId=<region>&instanceId=<id>" --RegionId <region> --force --user-agent AlibabaCloud-Agent-Skills/alibabacloud-milvus-manage
140
141# post / put with request body: business params in --body JSON
142aliyun milvus post "/path?RegionId=<region>" --RegionId <region> --body '{...}' --force --user-agent AlibabaCloud-Agent-Skills/alibabacloud-milvus-manage
143
144# post with query-style flags: business params as --Flag value
145aliyun milvus post "/path" --RegionId <region> --InstanceId <id> --force --user-agent AlibabaCloud-Agent-Skills/alibabacloud-milvus-manage
146```
147
148Rules:
149
150- Always pass `--RegionId <region>`.
151- For `CreateInstance` and `UpdateInstance`, use `--body`.
152- For query-style POST APIs such as detail, config, network, ACL, and rename operations, use `--Flag value`.
153- Do not put user-provided raw text directly into a shell command unless it has been validated.
154
155### Runtime Safety
156
157- Do not download and execute remote scripts or unaudited dependencies during control-plane work.
158- Do not use `eval` or `source` with untrusted input.
159- Set reasonable timeouts on CLI calls. Prefer short timeouts for reads and bounded polling for long-running async operations.
160- For list APIs, do not trust `total` blindly; inspect the returned array.
161- Read the full error message before retrying. Automatic retry is appropriate for throttling, not for arbitrary failures.
162
163### Forbidden Operations
164
165- **Instance deletion (DeleteInstance) is strictly forbidden through this Skill.** If the user requests to delete/release a Milvus instance, do **not** execute the Milvus delete command through `aliyun` CLI. Instead, instruct the user to delete the instance via the [Alibaba Cloud Milvus Console](https://milvus.console.aliyun.com/#/overview).
166
167### Destructive Operations
168
169Require explicit confirmation before:
170
171- modifying instance config,
172- disabling public network access.
173
174Use this template:
175
176> About to execute: `<API>`, Target: `<InstanceId>`, Impact: `<Description>`. Continue?
177
178For config change and network troubleshooting flows, read [references/operations.md](references/operations.md) or [references/instance-lifecycle.md](references/instance-lifecycle.md) first.
179
180### Output Style
181
182- Summarize instance lists as a compact table.
183- Highlight `instanceId`, `instanceName`, `status`, `dbVersion`, `ha`, `paymentType`, and connection endpoints when relevant.
184- Convert timestamps to readable time.
185- Use `--cli-query` or `jq` to trim noisy payloads when useful.
186
187## Data-Plane Rules
188
189### Connection First
190
191Before writing any `pymilvus` code, ask for:
192
1931. deployment type: Milvus Lite, self-hosted standalone/cluster, or Alibaba Cloud managed instance,
1942. URI or endpoint,
1953. authentication method and credentials if needed,
1964. database name if not using `default`.
197
198Do not assume connection parameters. Use Milvus Lite only when the user explicitly wants local embedded mode.
199
200Minimal connection shape:
201
202```python
203from pymilvus import MilvusClient
204
205PYMILVUS_GRPC_OPTIONS = {
206 "grpc.primary_user_agent": "AlibabaCloud-Agent-Skills/alibabacloud-milvus-manage"
207}
208
209client = MilvusClient(
210 uri="<USER_URI>",
211 token="<USER_TOKEN>",
212 grpc_options=PYMILVUS_GRPC_OPTIONS,
213)
214```
215
216- Every `MilvusClient(...)` and `connections.connect(...)` example must pass `grpc_options=PYMILVUS_GRPC_OPTIONS`.
217- Do not emit `pymilvus` SDK connection code without `grpc_options=PYMILVUS_GRPC_OPTIONS`.
218
219For async usage, schema details, and deployment-specific patterns, load the relevant reference doc.
220
221### Data Safety And Correctness
222
223- Never generate fake or placeholder vectors. Always use a real embedding model.
224- The query embedding model must match the model used to create stored vectors.
225- Vector dimensions must exactly match the collection schema.
226- A collection must be loaded before search or query.
227- Confirm destructive operations such as `drop_collection`, `drop_database`, or large deletes before executing.
228- Prefer `AUTOINDEX` unless the user has explicit performance requirements.
229
230### Minimal Workflow
231
232For most SDK tasks:
233
2341. load [references/collection.md](references/collection.md) for schema and collection operations,
2352. load [references/vector.md](references/vector.md) for insert/search/query/delete patterns,
2363. load [references/index.md](references/index.md) if the user cares about index type, metric, or tuning,
2374. add partition/database/RBAC references only if the task actually needs them.
238
239### Common Patterns
240
241- quick prototype collection: [references/collection.md](references/collection.md)
242- vector CRUD and similarity search: [references/vector.md](references/vector.md)
243- hybrid search or full-text search: [references/vector.md](references/vector.md)
244- RAG / semantic retrieval patterns: [references/patterns.md](references/patterns.md)
245- index tuning: [references/index.md](references/index.md)
246
247## Suggested Response Flow
248
249### If control-plane
250
2511. Confirm region and target instance scope.
2522. Read the matching control-plane reference.
2533. Run the command with the correct parameter mode.
2544. Report the key fields, next state, and any follow-up wait conditions.
255
256### If data-plane
257
2581. Ask for connection details first.
2592. Read only the references needed for the requested SDK task.
2603. Write or explain `pymilvus` code with real embeddings, real connection placeholders, and `grpc_options=PYMILVUS_GRPC_OPTIONS`.
2614. Call out schema, load-state, index, and dimension pitfalls if they matter.
262
263## Reference Map
264
265- [references/getting-started.md](references/getting-started.md): first Milvus instance from scratch
266- [references/instance-lifecycle.md](references/instance-lifecycle.md): create, inspect, scale, rename, release
267- [references/operations.md](references/operations.md): config, network, ACL, inspection, troubleshooting
268- [references/create-params.md](references/create-params.md): create body fields and component templates
269- [references/api-reference.md](references/api-reference.md): raw API signatures and return fields
270- [references/collection.md](references/collection.md): schema and collection lifecycle
271- [references/vector.md](references/vector.md): insert, search, hybrid search, BM25, iterators
272- [references/index.md](references/index.md): index types and metric guidance
273- [references/partition.md](references/partition.md): partition operations
274- [references/database.md](references/database.md): database operations
275- [references/user-role.md](references/user-role.md): users, roles, privileges
276- [references/patterns.md](references/patterns.md): RAG and semantic search patterns
277- [references/ram-policies.md](references/ram-policies.md): IAM/RAM policies