oceanbase/seekdb
The AI-Native Search Database. Best for agent storage, it unifies vector, text, structured, and semi-structured data into a single engine. This all-in-one database makes agents smarter, easier to run, and more stable.
🌊 seekdb – A State Store for AI Agents
What it is – seekdb is an open‑source, MySQL‑compatible database that combines traditional relational storage with vector and full‑text search. It is built on the OceanBase SQL engine and can run embedded in a process, as a single‑node server, or in a distributed OceanBase cluster.
Why it matters for AI – Modern AI agents need to:
- Write continuously (store observations, embeddings, logs) and read back within milliseconds.
- Branch and experiment safely (think of “sandbox” environments for planning).
- Retrieve using a mix of vector similarity, keyword search, and relational filters – all in a single SQL query.
seekdb provides these capabilities out of the box, letting developers focus on the agent logic rather than building glue code between a relational DB, a vector engine, and a full‑text index.
🔑 Core Features
| Feature | What it does |
|---|---|
| Hybrid Search | One SQL statement can combine VECTOR similarity (l2_distance, cosine, etc.), FULLTEXT keyword matching, and scalar predicates. No client‑side merging required. |
| Async Index Pipeline (Change Stream) | Writes commit immediately; a background pipeline updates a delta HNSW index, so newly inserted vectors are searchable in the next query without a P99 latency spike. |
| Two‑Level HNSW | Incremental (delta) + snapshot indexes give fast writes and stable high‑throughput reads. |
| Copy‑on‑Write (COW) Sandboxes | FORK DATABASE creates an instant snapshot of the whole DB; agents can experiment, then MERGE TABLE or DROP DATABASE to accept or discard changes. |
| MySQL‑compatible protocol | Works with any MySQL driver, SQLAlchemy, LangChain, LlamaIndex, Dify, etc. |
| Deployment Flexibility | Embedded library, Docker image, binary install, or cloud‑hosted instance (zero‑install curl). |
| Performance | Benchmarks claim ~1,500 QPS with 21 ms P99 latency – roughly 10× Milvus and 3× Elasticsearch on the same workload. |
🚀 Getting Started (quickest path)
# Python SDK – the recommended way for AI/ML projects
pip install -U pyseekdb
import pyseekdb
client = pyseekdb.Client(path="./agent_state.db")
mem = client.get_or_create_collection(name="episodic")
# write an observation
mem.upsert(ids=[1], documents=["User said hello"], embeddings=[[0.1, 0.2, …]])
# retrieve relevant context a few ms later
results = mem.query(query_texts=["hello"], n_results=5)
print(results)
For a full server deployment you can run the Docker image:
docker run -d -p 2881:2881 -p 2886:2886 \
-v $(pwd)/data:/var/lib/oceanbase \
oceanbase/seekdb:latest
All installation options (cloud instance, binary, Homebrew) are described in the README and the official docs.
📚 Typical Use Cases
- Agentic AI memory – continuous write‑then‑read loops for personal assistants, autonomous bots, or workflow automation.
- RAG / Knowledge bases – store documents with embeddings and run vector + keyword + filter queries in one go.
- Semantic code search – index code snippets as vectors, combine with text search, and isolate projects via sandbox databases.
- Enterprise AI layer – add a vector‑enabled AI front‑end to existing MySQL‑based applications without migrating data.
- Edge / on‑device AI – embed the binary in a device; the COW sandbox lets local agents experiment safely.
🤝 Ecosystem & Integrations
seekdb ships with a Python SDK (pyseekdb) and integrates with the major LLM‑app frameworks:
- LangChain, LlamaIndex, Dify, LangGraph, Coze, Spring‑AI‑Alibaba, FastGPT, Jina AI, Ragas, Instructor, Baseten, and more.
These integrations are mostly PRs that add a
VectorStoreimplementation, so developers can drop aseekdbclient into existing pipelines.
📄 License & Community
- License: Apache License 2.0 (permissive, commercial‑friendly).
- Community: Discord, GitHub Discussions, issue tracker, and a contributor guide. The project is backed by OceanBase, the database powering large‑scale services at Alibaba, Alipay, DiDi, etc.
Bottom line – seekdb is a purpose‑built, high‑performance state store that lets AI agents treat a database like a mutable knowledge graph: write fast, query instantly, and experiment safely with sandboxed forks. It bridges the gap between traditional relational databases and modern vector search engines, all under a familiar MySQL interface.
Related
- Project
- Project
- Project
- Project
- Project