Vectors commands

22 commands. Each entry gives the invocation and an example, in the interface you pick; open the details for parameters, return shape and error codes.

batch_delete

Delete multiple vectors by key.

db.vectors.delete_many(collection: 'str', keys: 'Sequence[str]') -> 'BatchResult'

Deletes multiple vector keys and returns one positional mutation result per input key.

To see the complete help for this command, run:

help(db.vectors.delete_many)

Example

_ = db.vectors.create_collection("docs", 3, metric="cosine")_ = db.vectors.upsert_many("docs", [{"key": "a", "vector": [1.0, 0.0, 0.0]}, {"key": "b", "vector": [0.0, 1.0, 0.0]}])_ = db.vectors.delete_many("docs", ["a", "b"])db.vectors.count("docs")
View details →

batch_exists

Check existence for multiple vector keys.

No CLI or Python spelling in this release. Wire type vector_batch_exists.

Checks several vector keys in one collection and returns positional boolean status values. The response preserves the input order.

View details →

batch_get

Read multiple vectors by key.

db.vectors.get_many(collection: 'str', keys: 'Sequence[str]') -> 'BatchResult'

Reads several vector keys and returns positional item results. Each item records found or missing state.

To see the complete help for this command, run:

help(db.vectors.get_many)

Example

_ = db.vectors.create_collection("docs", 3, metric="cosine")_ = db.vectors.upsert_many("docs", [{"key": "a", "vector": [1.0, 0.0, 0.0]}, {"key": "b", "vector": [0.0, 1.0, 0.0]}])[i.result.value.key for i in db.vectors.get_many("docs", ["a", "b"]).items]
View details →

batch_upsert

Upsert multiple vectors in one itemwise batch.

db.vectors.upsert_many(collection: 'str', entries: 'Any') -> 'BatchResult'

Writes multiple vector entries and returns positional mutation results. Valid items share commit facts where the engine applies them together.

To see the complete help for this command, run:

help(db.vectors.upsert_many)

Example

_ = db.vectors.create_collection("docs", 3, metric="cosine")_ = db.vectors.upsert_many("docs", [{"key": "a", "vector": [1.0, 0.0, 0.0]}, {"key": "b", "vector": [0.0, 1.0, 0.0]}])db.vectors.count("docs")
View details →

count

Count visible vectors in a collection.

strata vector count

Counts vectors visible in the selected collection, branch, and space.

To see the complete help for this command, run:

strata vector count --help

Example

strata vector collection create docs 3 --metric cosinestrata vector upsert docs a [1.0,0.0,0.0]strata vector upsert docs b [0.0,1.0,0.0]strata vector count docs
View details →

delete

Delete one vector key.

strata vector delete

Deletes one visible vector entry from a collection. Missing keys are represented as no-op mutation acknowledgements.

To see the complete help for this command, run:

strata vector delete --help

Example

strata vector collection create docs 3 --metric cosinestrata vector upsert docs a [1.0,0.0,0.0]strata vector delete docs astrata vector exists docs a
View details →

delete_all

Delete all vectors in a collection.

strata vector delete-all

Deletes all vectors visible in the selected collection while preserving the collection itself.

To see the complete help for this command, run:

strata vector delete-all --help

Example

strata vector collection create docs 3 --metric cosinestrata vector upsert docs a [1.0,0.0,0.0]strata vector delete-all docsstrata vector count docs
View details →

delete_by_filter

Delete vectors matching a metadata filter.

strata vector delete-by-filter

Scans the collection for visible vectors matching the metadata filter and deletes the matching rows as a bulk mutation.

To see the complete help for this command, run:

strata vector delete-by-filter --help

Example

strata vector collection create docs 3 --metric cosinestrata vector upsert docs a [1.0,0.0,0.0] --metadata {"tag":"keep"}strata vector upsert docs b [0.0,1.0,0.0] --metadata {"tag":"drop"}strata vector delete-by-filter docs --filter {"conditions":[{"field":"tag","op":"eq","value":{"type":"string","value":"drop"}}]}strata vector count docs
View details →

exists

Check whether one vector key exists.

strata vector exists

Returns a boolean status for one vector key without loading the embedding.

To see the complete help for this command, run:

strata vector exists --help

Example

strata vector collection create docs 3 --metric cosinestrata vector upsert docs a [1.0,0.0,0.0]strata vector exists docs astrata vector exists docs absent
View details →

get

Read one vector by key.

strata vector get

Reads one visible vector entry. The optional timestamp reads the vector visible at that point in time when retained history allows it.

To see the complete help for this command, run:

strata vector get --help

Example

strata vector collection create docs 3 --metric cosinestrata vector upsert docs a [1.0,0.0,0.0]strata vector get docs astrata vector get docs absent
View details →

history

Read retained vector history for one key.

strata vector history

Returns retained history rows for one vector key, including vector revision facts and tombstones when present.

To see the complete help for this command, run:

strata vector history --help

Example

strata vector collection create docs 3 --metric cosinestrata vector history docs absent
View details →

keys

List vector keys in a collection.

strata vector keys

Lists visible vector keys with optional prefix and cursor arguments.

To see the complete help for this command, run:

strata vector keys --help

Example

strata vector collection create docs 3 --metric cosinestrata vector upsert docs a [1.0,0.0,0.0]strata vector upsert docs b [0.0,1.0,0.0]strata vector keys docs
View details →

query

Search a vector collection.

strata vector query

Runs vector search through the engine planner and returns the best matches with scores and optional metadata.

To see the complete help for this command, run:

strata vector query --help

Example

strata vector collection create docs 3 --metric cosinestrata vector upsert docs a [1.0,0.0,0.0]strata vector upsert docs b [0.0,1.0,0.0]strata vector query docs [1.0,0.0,0.0] --k 2
View details →

sample

Sample vectors with values and version facts.

strata vector sample

Returns a deterministic representative sample of vectors from a collection: the total live count and up to `count` entries (default 10), evenly strided over the ordered keys. Latest state only.

To see the complete help for this command, run:

strata vector sample --help

Example

strata vector collection create docs 3 --metric cosinestrata vector upsert docs a [1.0,0.0,0.0]strata vector upsert docs b [0.0,1.0,0.0]strata vector sample docs
View details →

scan

Scan vectors with values and version facts.

strata vector scan

Scans visible vectors in a collection starting at an optional key. Each item includes the key, embedding, metadata, and commit metadata exposed by the executor output.

To see the complete help for this command, run:

strata vector scan --help

Example

strata vector collection create docs 3 --metric cosinestrata vector upsert docs a [1.0,0.0,0.0]strata vector upsert docs b [0.0,1.0,0.0]strata vector scan docs
View details →

upsert

Insert or replace one vector.

strata vector upsert

Upserts one vector key with a dense embedding and optional metadata. The vector dimension must match the collection configuration.

To see the complete help for this command, run:

strata vector upsert --help

Example

strata vector collection create docs 3 --metric cosinestrata vector upsert docs a [1.0,0.0,0.0] --metadata {"tag":"x"}strata vector exists docs a
View details →

Collections

collection create

Create a vector collection with a dimension and metric.

strata vector collection create

Creates a collection for dense vectors. The dimension and metric become part of the collection contract for future upserts and queries.

To see the complete help for this command, run:

strata vector collection create --help

Example

strata vector collection create docs 3 --metric cosinestrata vector collection stats docs
View details →

collection delete

Delete a vector collection.

strata vector collection delete

Deletes the selected vector collection from the current branch and space. The current wire response is a transitional boolean status.

To see the complete help for this command, run:

strata vector collection delete --help

Example

strata vector collection create temp 3 --metric cosinestrata vector collection delete tempstrata vector collection list
View details →

collection list

List vector collections.

strata vector collection list

Lists vector collections visible in the selected branch and space, including collection dimension, metric, and count facts.

To see the complete help for this command, run:

strata vector collection list --help

Example

strata vector collection create docs 3 --metric cosinestrata vector collection list
View details →

collection stats

Read facts for one vector collection.

strata vector collection stats

Reads collection-level facts for one vector collection. The current wire response uses the collection-list output with one item.

To see the complete help for this command, run:

strata vector collection stats --help

Example

strata vector collection create docs 3 --metric cosinestrata vector collection stats docs
View details →

Indexes

index query

Search vectors and return index diagnostics.

db.vectors.index_query(collection: 'str', vector: 'Sequence[float]', *, k: 'int' = 10, filter: 'Any' = None, as_of: 'Optional[int]' = None, as_of_time: 'Optional[TimeLike]' = None) -> 'Tuple[list, Any]'

Runs vector search and includes planner diagnostics such as index policy, source usage, artifact status, and fallback facts.

To see the complete help for this command, run:

help(db.vectors.index_query)

Example

_ = db.vectors.create_collection("docs", 3, metric="cosine")_ = db.vectors.upsert("docs", "a", [1.0, 0.0, 0.0])_ = db.vectors.upsert("docs", "b", [0.0, 1.0, 0.0])[m.key for m in db.vectors.index_query("docs", [1.0, 0.0, 0.0], k=2)[0]]
View details →

Metadata

metadata update

Patch metadata for one vector.

strata vector update-metadata

Applies a top-level metadata patch to one visible vector. Missing vectors return a no-op mutation acknowledgement.

To see the complete help for this command, run:

strata vector update-metadata --help

Example

strata vector collection create docs 3 --metric cosinestrata vector upsert docs a [1.0,0.0,0.0] --metadata {"tag":"x"}strata vector update-metadata docs a {"tag":"z"}strata vector get docs a
View details →