docs/SEEKDB_INTEGRATION.md
This document describes how to use OceanBase SeekDB as the vector database backend for LangBot's knowledge base feature.
OceanBase SeekDB is an AI-native search database that unifies relational, vector, text, JSON and GIS in a single engine, enabling hybrid search and in-database AI workflows. It's developed by OceanBase and released under Apache 2.0 license.
SeekDB support is automatically included when you install LangBot. The required dependency pyseekdb is listed in pyproject.toml.
If you need to install it manually:
pip install pyseekdb
| Platform | Status | Notes |
|---|---|---|
| Linux | ✅ Supported | Full embedded mode support via pylibseekdb |
| macOS | ❌ Not Supported | pylibseekdb is Linux-only; use server mode instead |
| Windows | ❌ Not Supported | pylibseekdb is Linux-only; use server mode instead |
Important: Embedded mode requires the pylibseekdb library, which is only available on Linux. If you're on macOS or Windows, you must use server mode.
| Platform | Status | Notes |
|---|---|---|
| Linux | ✅ Supported | Full Docker support |
| macOS | ⚠️ Known Issue | Docker container initialization failure - See Issue #36 |
| Windows | ⚠️ Untested | Should work but not yet tested |
macOS Users: Currently, SeekDB Docker containers have an initialization issue on macOS (oceanbase/seekdb#36). Until this is resolved, we recommend:
| Platform | Status | Notes |
|---|---|---|
| All Platforms | ✅ Supported | Connect to SeekDB running on a remote Linux server |
Recommendation for macOS/Windows users: Deploy SeekDB on a Linux server and connect via server mode configuration.
Embedded mode runs SeekDB directly within the LangBot process, storing data locally. This is the simplest setup and requires no external services.
Edit your config.yaml:
vdb:
use: seekdb
seekdb:
mode: embedded
path: './data/seekdb' # Path to store SeekDB data
database: 'langbot' # Database name
Server mode connects to a remote SeekDB server or OceanBase server. This is recommended for production deployments.
vdb:
use: seekdb
seekdb:
mode: server
host: 'localhost'
port: 2881
database: 'langbot'
user: 'root'
password: '' # Can also use SEEKDB_PASSWORD env var
If you're using OceanBase with seekdb capabilities:
vdb:
use: seekdb
seekdb:
mode: server
host: 'localhost'
port: 2881
tenant: 'sys' # OceanBase tenant name
database: 'langbot'
user: 'root'
password: ''
| Parameter | Required | Default | Description |
|---|---|---|---|
mode | No | embedded | Deployment mode: embedded or server |
path | No | ./data/seekdb | Data directory for embedded mode |
database | No | langbot | Database name |
host | No | localhost | Server host (server mode only) |
port | No | 2881 | Server port (server mode only) |
user | No | root | Username (server mode only) |
password | No | '' | Password (server mode only) |
tenant | No | None | OceanBase tenant (optional, server mode only) |
Once configured, SeekDB will be used automatically for all knowledge base operations in LangBot:
No code changes are required - just update your configuration!
The SeekDB adapter is implemented in src/langbot/pkg/vector/vdbs/seekdb.py and follows the same VectorDatabase interface as Chroma and Qdrant adapters.
Key methods:
add_embeddings(): Add vectors with metadata to a collectionsearch(): Perform vector similarity searchdelete_by_file_id(): Delete vectors by file ID metadataget_or_create_collection(): Manage collectionsdelete_collection(): Remove entire collectionsIf you see: ImportError: pyseekdb is not installed
Solution:
pip install pyseekdb
Error:
RuntimeError: Embedded Client is not available because pylibseekdb is not available.
Please install pylibseekdb (Linux only) or use RemoteServerClient (host/port) instead.
Cause: pylibseekdb is only available on Linux platforms.
Solution: Use server mode instead:
vdb:
use: seekdb
seekdb:
mode: server
host: 'your-seekdb-server-ip'
port: 2881
database: 'langbot'
user: 'root'
password: ''
Alternative: Use ChromaDB or Qdrant, which work on all platforms:
vdb:
use: chroma # or qdrant
Symptoms:
docker run -d -p 2881:2881 oceanbase/seekdb:latest
# Container exits immediately with code 30
Error in logs:
[ERROR] Code: Agent.SeekDB.Not.Exists
Message: initialize failed: init agent failed: SeekDB not exists in current directory.
Cause: This is a known issue with SeekDB Docker containers on macOS. See oceanbase/seekdb#36.
Status: Under investigation by OceanBase team.
Workaround Options:
If SeekDB server is not reachable, check:
ps aux | grep observernc -zv localhost 2881For large datasets:
SeekDB is licensed under Apache License 2.0.