---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/vector/contract/interfaces/VectorStore.md
---

# Interface: VectorStore()

Defined in: [batteries/vector/contract.ts:21](https://github.com/NHTIO/ADK/blob/v1.20260607.0/src/batteries/vector/contract.ts#L21)

## Extends

* [`PlanSink`](../../builder/interfaces/PlanSink.md).[`SchemaExecutor`](../../schema/interfaces/SchemaExecutor.md)

```ts
VectorStore(collection: string): VectorQueryBuilder;
```

Defined in: [batteries/vector/contract.ts:26](https://github.com/NHTIO/ADK/blob/v1.20260607.0/src/batteries/vector/contract.ts#L26)

## Parameters

| Parameter    | Type     |
| ------------ | -------- |
| `collection` | `string` |

## Returns

[`VectorQueryBuilder`](../../builder/classes/VectorQueryBuilder.md)

## Properties

| Property                                          | Modifier   | Type                                                                           | Defined in                                                                                                              |
| ------------------------------------------------- | ---------- | ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
|  `capabilities` | `readonly` | [`VectorStoreCapabilities`](../../types/interfaces/VectorStoreCapabilities.md) | [batteries/vector/contract.ts:22](https://github.com/NHTIO/ADK/blob/v1.20260607.0/src/batteries/vector/contract.ts#L22) |
|  `schema`             | `public`   | [`VectorSchemaBuilder`](../../schema/classes/VectorSchemaBuilder.md)           | [batteries/vector/contract.ts:27](https://github.com/NHTIO/ADK/blob/v1.20260607.0/src/batteries/vector/contract.ts#L27) |

## Methods

### close()

```ts
close(): Promise<void>;
```

Defined in: [batteries/vector/contract.ts:25](https://github.com/NHTIO/ADK/blob/v1.20260607.0/src/batteries/vector/contract.ts#L25)

#### Returns

`Promise`<`void`>

***

### connect()

```ts
connect(): Promise<void>;
```

Defined in: [batteries/vector/contract.ts:24](https://github.com/NHTIO/ADK/blob/v1.20260607.0/src/batteries/vector/contract.ts#L24)

#### Returns

`Promise`<`void`>

***

### createCollection()

```ts
createCollection(spec: CollectionSpec, ifNotExists: boolean): Promise<void>;
```

Defined in: [batteries/vector/schema.ts:11](https://github.com/NHTIO/ADK/blob/v1.20260607.0/src/batteries/vector/schema.ts#L11)

#### Parameters

| Parameter     | Type                                                        |
| ------------- | ----------------------------------------------------------- |
| `spec`        | [`CollectionSpec`](../../plan/interfaces/CollectionSpec.md) |
| `ifNotExists` | `boolean`                                                   |

#### Returns

`Promise`<`void`>

#### Inherited from

[`SchemaExecutor`](../../schema/interfaces/SchemaExecutor.md).[`createCollection`](../../schema/interfaces/SchemaExecutor.md#createcollection)

***

### dropCollection()

```ts
dropCollection(collection: string, ifExists: boolean): Promise<void>;
```

Defined in: [batteries/vector/schema.ts:12](https://github.com/NHTIO/ADK/blob/v1.20260607.0/src/batteries/vector/schema.ts#L12)

#### Parameters

| Parameter    | Type      |
| ------------ | --------- |
| `collection` | `string`  |
| `ifExists`   | `boolean` |

#### Returns

`Promise`<`void`>

#### Inherited from

[`SchemaExecutor`](../../schema/interfaces/SchemaExecutor.md).[`dropCollection`](../../schema/interfaces/SchemaExecutor.md#dropcollection)

***

### executeDelete()

```ts
executeDelete(plan: DeletePlan): Promise<void>;
```

Defined in: [batteries/vector/builder.ts:49](https://github.com/NHTIO/ADK/blob/v1.20260607.0/src/batteries/vector/builder.ts#L49)

#### Parameters

| Parameter | Type                                                |
| --------- | --------------------------------------------------- |
| `plan`    | [`DeletePlan`](../../plan/interfaces/DeletePlan.md) |

#### Returns

`Promise`<`void`>

#### Inherited from

[`PlanSink`](../../builder/interfaces/PlanSink.md).[`executeDelete`](../../builder/interfaces/PlanSink.md#executedelete)

***

### executeSearch()

```ts
executeSearch(plan: SearchPlan): Promise<VectorMatch[]>;
```

Defined in: [batteries/vector/builder.ts:47](https://github.com/NHTIO/ADK/blob/v1.20260607.0/src/batteries/vector/builder.ts#L47)

#### Parameters

| Parameter | Type                                                |
| --------- | --------------------------------------------------- |
| `plan`    | [`SearchPlan`](../../plan/interfaces/SearchPlan.md) |

#### Returns

`Promise`<[`VectorMatch`](../../types/interfaces/VectorMatch.md)\[]>

#### Inherited from

[`PlanSink`](../../builder/interfaces/PlanSink.md).[`executeSearch`](../../builder/interfaces/PlanSink.md#executesearch)

***

### executeUpsert()

```ts
executeUpsert(plan: UpsertPlan): Promise<void>;
```

Defined in: [batteries/vector/builder.ts:48](https://github.com/NHTIO/ADK/blob/v1.20260607.0/src/batteries/vector/builder.ts#L48)

#### Parameters

| Parameter | Type                                                |
| --------- | --------------------------------------------------- |
| `plan`    | [`UpsertPlan`](../../plan/interfaces/UpsertPlan.md) |

#### Returns

`Promise`<`void`>

#### Inherited from

[`PlanSink`](../../builder/interfaces/PlanSink.md).[`executeUpsert`](../../builder/interfaces/PlanSink.md#executeupsert)

***

### hasCollection()

```ts
hasCollection(collection: string): Promise<boolean>;
```

Defined in: [batteries/vector/schema.ts:13](https://github.com/NHTIO/ADK/blob/v1.20260607.0/src/batteries/vector/schema.ts#L13)

#### Parameters

| Parameter    | Type     |
| ------------ | -------- |
| `collection` | `string` |

#### Returns

`Promise`<`boolean`>

#### Inherited from

[`SchemaExecutor`](../../schema/interfaces/SchemaExecutor.md).[`hasCollection`](../../schema/interfaces/SchemaExecutor.md#hascollection)

***

### isAvailable()

```ts
isAvailable(): boolean;
```

Defined in: [batteries/vector/contract.ts:23](https://github.com/NHTIO/ADK/blob/v1.20260607.0/src/batteries/vector/contract.ts#L23)

#### Returns

`boolean`

***

### renameCollection()

```ts
renameCollection(from: string, to: string): Promise<void>;
```

Defined in: [batteries/vector/schema.ts:14](https://github.com/NHTIO/ADK/blob/v1.20260607.0/src/batteries/vector/schema.ts#L14)

#### Parameters

| Parameter | Type     |
| --------- | -------- |
| `from`    | `string` |
| `to`      | `string` |

#### Returns

`Promise`<`void`>

#### Inherited from

[`SchemaExecutor`](../../schema/interfaces/SchemaExecutor.md).[`renameCollection`](../../schema/interfaces/SchemaExecutor.md#renamecollection)

***

### transaction()

```ts
transaction(fn: (tx: VectorStore) => Promise<void>): Promise<void>;
```

Defined in: [batteries/vector/contract.ts:28](https://github.com/NHTIO/ADK/blob/v1.20260607.0/src/batteries/vector/contract.ts#L28)

#### Parameters

| Parameter | Type                                         |
| --------- | -------------------------------------------- |
| `fn`      | (`tx`: `VectorStore`) => `Promise`<`void`> |

#### Returns

`Promise`<`void`>
