OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Cloud

  • Overview
  • Schema evolution
    • Liquibase
    • Flyway
  • Data ingestion
    • Canal
    • dbt
    • Debezium
    • Flink
    • Glue
    • Informatica Cloud
    • Kafka
    • Maxwell
    • SeaTunnel
    • DataWorks
    • NiFi
  • SQL development
    • DataGrip
    • DBeaver
    • Navicat
    • TablePlus
  • Orchestration
    • DolphinScheduler
    • Linkis
    • Airflow
  • Visualization
    • Grafana
    • Power BI
    • Quick BI
    • Superset
    • Tableau
  • Observability
    • Datadog
    • Prometheus
  • Database management
    • Bytebase
  • AI
    • LlamaIndex
    • Dify
    • LangChain
    • Tongyi Qianwen
    • OpenAI
    • n8n
    • Trae
    • SpringAI
    • Cline
    • Cursor
    • Continue
    • Toolbox
    • CamelAI
    • Firecrawl
    • Hugging Face
    • Ollama
    • Google Gemini
    • Cloudflare Workers AI
    • Qoder
    • OpenCode
    • Claude Code
    • GitHub Copilot
    • Codex
    • Jina AI
    • Augment Code
    • Claude Code
    • Kiro
  • Development tools
    • Cloudflare Workers
    • Vercel

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Cloud

Integrate OceanBase Cloud vector with Dify

Last Updated:2026-09-04 07:03:30

Prerequisites
Deploy Dify
Use Dify
Step 1: Obtain the database connection information
Step 2: Connect Large Language Model

OceanBase has provided native vector database capabilities since version V4.3.3, including vector data storage, indexing, and embedding retrieval - enabling efficient storage and querying of vectorized data.

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 demonstrates how to integrate OceanBase Cloud's vector search capabilities with Dify's AI application platform.

Prerequisites

  • A transactional cluster instance of the MySQL compatible mode is available in your environment.

  • To use a cluster instance, you first need to create a tenant by referring to Create a tenant.

  • You have created a MySQL-compatible tenant, a database, and an account, and granted the read and write permissions to the database account. For more information, see Create an account and Create a database (MySQL compatible mode).

  • You have been granted the project admin or instance admin role to perform read and write operations on instances in the project. If you do not have the required permissions, contact the organization admin.

  • This integration tutorial runs on Docker container platform. Ensure you have set up the Docker platform.

Deploy Dify

For Dify deployment, refer to Docker Compose Deployment with these modifications:

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

Use Dify

Step 1: Obtain the database connection information

  1. Log in to the OceanBase Cloud console.

  2. In the instance list page, expand the the information of the target instance.

  3. Select Connect > Get Connection String under the target tenant.

  4. In the pop-up window, select Public Network as the connection method.

  5. Follow the prompts in the pop-up window to obtain the public endpoint and the connection string.

Step 2: Connect Large Language Model

For connecting LLMs in Dify, refer to Model.

Previous topic

LlamaIndex
Last

Next topic

LangChain
Next
on this page
Prerequisites
Deploy Dify
Use Dify
Step 1: Obtain the database connection information
Step 2: Connect Large Language Model