Skip to Content
We are live but in Staging πŸŽ‰
Quickstart

Quickstart

From nothing to a working vector search in a few minutes. You’ll allocate a database (control plane), then use the Milvus SDK for everything else (data plane).

Before you start

  • A Dodil IAM service account (a client_id + client_secret) and an access token from it β€” get one with the client-credentials flowΒ  (or dodil login). That same token authenticates both the control plane and the Milvus connection; see Auth and Access.
  • The dodil CLI (for the quickest path) β€” see Install the CLIΒ . Or call the control-plane API directly.
  • pip install pymilvus for the SDK steps.

1. Allocate a database

dodil vbase db create my-vectors

Allocation is asynchronous β€” the database starts in CREATING and becomes RUNNING within moments. (Over the API: AllocateDatabase then poll GetService until RUNNING.)

2. Get its connection details

dodil vbase db use <service-id>

This resolves the database’s endpoint, port, and db_name (via GetServiceAccess) and stores them so the CLI β€” and you β€” can connect.

3. Connect the Milvus SDK

from pymilvus import MilvusClient client = MilvusClient( uri="https://<endpoint>:443", # endpoint + port from step 2 token="<IAM access token>", # your IAM token is your Milvus token db_name="<db_name>", # the allocated database )

See Connecting with the Milvus SDK for the full contract (TLS, tokens, other languages).

# create a collection with a 768-dim vector client.create_collection(collection_name="docs", dimension=768) # insert a few vectors client.insert(collection_name="docs", data=[ {"id": 1, "vector": [0.1] * 768, "text": "hello"}, {"id": 2, "vector": [0.2] * 768, "text": "world"}, ]) # search hits = client.search( collection_name="docs", data=[[0.15] * 768], limit=3, output_fields=["text"], ) print(hits)

That’s standard Milvus 2.6 β€” collections, indexes, and search are all the Milvus SDK. For schemas, custom indexes (HNSW/IVF), hybrid + BM25 search, and more, see the Recipes and the Milvus docsΒ .

Next