Skip to content

VectorStoreCore

Core read/write contract for persistent vector storage and similarity search (REQ-16).

Every vector-store adapter — including edge/serverless adapters that cannot manage indexes at runtime (Cloudflare Vectorize, Upstash Vector) — MUST implement this interface.

Index lifecycle (create/delete) is split out as VectorStoreIndexAdmin (REQ-17) so edge adapters that provision indexes out-of-band don’t have to ship silent no-ops or throwing stubs.

Callers that need admin capabilities gate with hasIndexAdmin(store).

describeIndex(indexName): Promise<IndexStats>;

Get statistics about an index.

Parameter Type

indexName

string

Promise<IndexStats>


listIndexes(): Promise<string[]>;

List all index names in this vector store.

Edge adapters that are provisioned as a single logical index return that index’s name (typically ['default']).

Promise<string[]>


query(indexName, params): Promise<VectorQueryResult[]>;

Query an index for vectors similar to the given query vector.

Parameter Type

indexName

string

params

VectorQueryParams

Promise<VectorQueryResult[]>


upsert(indexName, entries): Promise<void>;

Insert or update vector entries in an index. If an entry with the same ID exists, it is overwritten.

Parameter Type

indexName

string

entries

VectorEntry[]

Promise<void>