Install the Python client library:
pip install actian-vectorai-client.Get collection state
Useget_state() to retrieve the current VDE state for a collection.
Get collection statistics
Useget_stats() to inspect vector counts and storage usage.
get_stats() returns these fields.
total_vectors: Total number of vectors in the collection.indexed_vectors: Number of vectors currently indexed.deleted_vectors: Number of deleted vectors not yet reclaimed.storage_bytes: Collection storage size in bytes.index_memory_bytes: Index memory use in bytes.
Flush a collection
VectorAI DB writes data changes to disk asynchronously for performance. Flushing forces pending writes to be persisted immediately.Optimize a collection
Optimization compacts storage and reclaims space from deleted vectors.Rebuild an index
Userebuild_index() for a simple rebuild. It returns true when the server accepts or completes the rebuild request.
Monitor rebuild progress
Usetrigger_rebuild(wait=False) when you need a task ID and progress reporting.
List rebuild tasks
list_rebuild_tasks() returns a tuple containing the task list and the total count.
task_id: Unique identifier for the rebuild task.collection_name: Name of the collection being rebuilt.state: Current task state.progress: Completion percentage from 0 to 100.current_phase: Current rebuild phase.started_at: Timestamp when the task started.