---
sidebar_label: Dify
slug: /dify
---

# Integrate seekdb vector search with Dify

seekdb supports vector data storage, vector indexing, and embedding-based vector search. You can store vectorized data in seekdb for further search.

Dify is an open-source Large Language Model (LLM) application development platform. Combining Backend as Service (BaaS) and LLMOps concepts, it enables developers to quickly build production-ready generative AI applications. Even non-technical users can participate in defining AI applications and managing data operations.

Dify includes essential technologies for building LLM applications: support for hundreds of models, an intuitive prompt orchestration interface, a high-quality RAG engine, a robust agent framework, flexible workflow orchestration, along with user-friendly interfaces and APIs. This eliminates redundant development efforts, enabling developers to focus on innovation and business needs.

This topic describes how to integrate the vector search capability of seekdb with Dify.

## Prerequisites

* Before deploying Dify, ensure that your machine meets the following minimum system requirements:

  * CPU: 2 cores
  * Memory: 4 GB

* This integration tutorial runs on Docker container platform. Ensure you have set up the [Docker platform](https://docs.docker.com/get-started/get-docker/).

* You have deployed seekdb.

## Step 1: Obtain the database connection information

Contact the seekdb deployment personnel or administrator to obtain the database connection string. For example:

```sql
mysql -h$host -P$port -u$user_name -p$password -D$database_name
```

**Parameters:**

* `$host`: The IP address for connecting to the seekdb database.
* `$port`: The port for connecting to the seekdb database. The default value is `2881`.
* `$database_name`: The name of the database to access.

    :::tip

    The user connecting to the database must have the `CREATE`, `INSERT`, `DROP`, and `SELECT` privileges on the database.

    :::

* `$user_name`: The database account.
* `$password`: The password for the account.

## Step 2: Deploy Dify

### Method 1

For Dify deployment, refer to [Deploy with Docker Compose](https://docs.dify.ai/getting-started/install-self-hosted/docker-compose) with these modifications:

* Change the `VECTOR_STORE` variable value to `oceanbase` in `.env` file.
* Start services using `docker compose --profile oceanbase up -d`.

### Method 2

Alternatively, you can refer to [Dify on MySQL](https://github.com/oceanbase/dify-on-mysql) to quickly start the Dify service.

To start the service, run the following commands:

```shell
cd docker
bash setup-mysql-env.sh
docker compose up -d
```

## Step 3: Use Dify

For information about connecting LLMs in Dify, refer to [Model Configuration](https://docs.dify.ai/guides/model-configuration).