---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/vector/factory/functions/createVectorStore.md
---

# Function: createVectorStore()

```ts
function createVectorStore<O>(
  config: CreateVectorStoreConfig<O>,
): Promise<CallableVectorStore>;
```

Defined in: [batteries/vector/factory.ts:41](https://github.com/NHTIO/ADK/blob/v1.20260607.0/src/batteries/vector/factory.ts#L41)

Build a callable store. Validate config; resolve the `client` (class | sync resolver | async
resolver) to a BaseVectorStore subclass ctor; optional availability gate; construct; return
asCallable(). Async so that `client: () => import('…')` can lazily load the adapter (and its
driver) only when the store is actually created.

## Type Parameters

| Type Parameter                                                                             | Default type                                                                 |
| ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------- |
| `O` *extends* [`BaseVectorStoreOptions`](../../types/interfaces/BaseVectorStoreOptions.md) | [`BaseVectorStoreOptions`](../../types/interfaces/BaseVectorStoreOptions.md) |

## Parameters

| Parameter | Type                                                                         |
| --------- | ---------------------------------------------------------------------------- |
| `config`  | [`CreateVectorStoreConfig`](../interfaces/CreateVectorStoreConfig.md)<`O`> |

## Returns

`Promise`<[`CallableVectorStore`](../../contract/type-aliases/CallableVectorStore.md)>
