---
title: MongoDB
---

You can use MongoDB as a data store. This creates three new collections in the database - which are configureable.

<Note>
MongoDB is also supported as a vector database. This is separate from that.
</Note>

## Install MongoDB addon

```bash
npm install @llm-tools/embedjs-mongodb
```

## Usage
<CodeGroup>
```ts Partial example
import { RAGApplicationBuilder } from '@llm-tools/embedjs';
import { MongoStore } from '@llm-tools/embedjs-mongodb';

const app = await new RAGApplicationBuilder()
.setStore(new MongoStore({ ... }))
```
</CodeGroup>

<Snippet file="missing-store-tip.mdx" />
