Copy as Markdown[View as Markdown](/docs/sdk/functions/addDataStoreToAgent.md)

***

# Function: addDataStoreToAgent()

> **addDataStoreToAgent**(`directory`): (`id`, `direction`, `dataStore`, `version`?) => `Promise`<`void`>

Defined in: agents.ts:155

## Parameters[​](#parameters "Direct link to Parameters")

| Parameter   | Type     |
| ----------- | -------- |
| `directory` | `string` |

## Returns[​](#returns "Direct link to Returns")

`Function`

### Parameters[​](#parameters-1 "Direct link to Parameters")

| Parameter            | Type                                     |
| -------------------- | ---------------------------------------- |
| `id`                 | `string`                                 |
| `direction`          | `string`                                 |
| `dataStore`          | { `id`: `string`; `version`: `string`; } |
| `dataStore.id`       | `string`                                 |
| `dataStore.version`? | `string`                                 |
| `version`?           | `string`                                 |

### Returns[​](#returns-1 "Direct link to Returns")

`Promise`<`void`>
