█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

seekdb

एजेंट स्टेट के लिए MySQL-compatible search database: vector, full-text और relational data एक ही SQL engine में, साथ में copy-on-write sandboxes जिन्हें आप fork और merge कर सकते हैं

Vector Databasesओपन सोर्स
भाषा
C++
लाइसेंस
Apache-2.0
$pip install -U pyseekdb
संक्षेप में

seekdb क्या है?

seekdb एजेंट स्टेट के लिए MySQL-compatible search database: vector, full-text और relational data एक ही SQL engine में, साथ में copy-on-write sandboxes जिन्हें आप fork और merge कर सकते हैं. यह Retrieval & Knowledge (RAG) टूल्स की Vector Databases श्रेणी में आता है; ओपन सोर्स है, C++ में लिखा गया है और Apache-2.0 लाइसेंस के तहत है।

सारांश

seekdb, OceanBase टीम का एक open-source search database है, जो OceanBase SQL engine पर बना है और सीधे agent workloads के लिए डिज़ाइन किया गया है। यह एक ही engine में vector, full-text, structured और semi-structured data स्टोर करता है, उन सबको एक ही SQL statement में query करता है, MySQL wire protocol को सपोर्ट करता है, और तीन तरीकों से चल सकता है: embedded in-process, single-node server के रूप में, या OceanBase distributed cluster के अंदर। Python SDK का नाम `pyseekdb` है।

Diagram of the write path: user DML goes to transaction commit, redo log and an immediate return, while an asynchronous Change Stream feeds a fetcher, dispatcher and worker pool that update a delta HNSW index which drains into a snapshot HNSW index; queries read both.
The Change Stream pipeline: commits return before the index is built, and queries read the delta and snapshot indexes together.seekdb README ↗

इसकी केंद्रीय design समस्या agent traffic का स्वरूप है: लगातार writes, जिनके कुछ milliseconds बाद एक read आता है। seekdb index construction को write path से अलग करता है, एक asynchronous index pipeline के ज़रिए, जिसे वह Change Stream कहता है। DML commit index build का इंतज़ार किए बिना लौट आता है, जबकि एक fetcher, dispatcher और worker pool redo log को consume करके delta HNSW index अपडेट करते हैं। Queries fine-grained read locks के तहत incremental delta index और snapshot index, दोनों को पढ़ती हैं, इसलिए नए लिखे गए vectors तुरंत searchable हो जाते हैं।

दूसरी खास विशेषता branching है। `FORK DATABASE` बिना किसी data copy के पूरे database का snapshot कुछ ही सेकंड में ले लेता है, ताकि agent sandbox के अंदर लिख सके, query कर सके और चीज़ें तोड़ भी सके। `MERGE TABLE … STRATEGY` FAIL, THEIRS या OURS conflict strategy के साथ काम वापस commit करता है, और `DROP DATABASE` उसे फेंक देता है। यह application-layer save और restore के बजाय kernel-level copy-on-write है।

क्योंकि यह MySQL protocol को बनाए रखता है, आसपास का ecosystem मुफ़्त में मिल जाता है: SQLAlchemy और कोई भी MySQL driver काम करते हैं, जैसे LangChain, LlamaIndex और Dify। प्रोजेक्ट अपने द्वारा दिए गए benchmark को प्रकाशित करता है, यानी 768 dimensions पर Cohere 10M dataset के लिए VectorDBBench का StreamingPerformanceCase, और उसे दोबारा चलाने के लिए harness भी।

Bar chart comparing seekdb v1.3.0, Elasticsearch v9.3.3 and Milvus v2.6.9 on VectorDBBench's StreamingPerformanceCase: 1,523 QPS against 470 and 142, 21.7 ms concurrent P99 against 53.6 ms and 153.6 ms, and 1.1x P99 jitter against 10.3x and 9.7x.
The VectorDBBench StreamingPerformanceCase result seekdb publishes, on the Cohere 10M dataset at 768 dimensions.seekdb README ↗

यह क्या करता है

  • एक ही SQL statement में hybrid search: vector distance, full-text `MATCH … AGAINST` और scalar filters, सब एक ही execution plan में
  • Asynchronous Change Stream index pipeline, two-level HNSW (incremental delta + snapshot) के साथ, ताकि writes index construction का इंतज़ार किए बिना commit हों
  • `FORK DATABASE` / `MERGE TABLE` / `DROP DATABASE` copy-on-write sandboxes, agent exploration और rollback के लिए
  • MySQL-compatible, full ACID के साथ: SQLAlchemy, किसी भी MySQL driver, और LangChain, LlamaIndex व Dify के साथ काम करता है
  • एक ही engine से तीन deployment रूप: embedded library, single-node server, या OceanBase distributed cluster
  • `pyseekdb`, एक Python SDK जिसमें collection API (`get_or_create_collection`, `upsert`, `query`) और built-in embedding functions हैं

शुरू करें

Embedded mode के लिए सिर्फ़ Python SDK चाहिए; server modes Docker image, binary installer और Homebrew tap के रूप में आते हैं।

Python SDK इंस्टॉल करें

`pyseekdb` Python client है। Embedded mode में यह engine को in-process चलाता है, इसलिए कोई server शुरू करने की ज़रूरत नहीं होती।

bashbash
pip install -U pyseekdb
Animated terminal capture of the project's 30-second demo, starting with the pip install of the pyseekdb SDK.
The README's 30-second try: install pyseekdb and run the demo script — no server, no schema, no embedding setup.seekdb README ↗

Agent memory लिखें और पढ़ें

एक client को local file की ओर इंगित करें, collection बनाएं, फिर observations को upsert करें और उन्हें query करके वापस पढ़ें। चूंकि index pipeline asynchronous है, एक step पर लिखा गया document अगले step पर retrieve किया जा सकता है।

pythonpython
import pyseekdb

client = pyseekdb.Client(path="./agent_state.db")
memory = client.get_or_create_collection(name="episodic")

for step in agent.run():
    # Persist the observation
    memory.upsert(ids=[step.id], documents=[step.observation])

    # Retrieve relevant context — milliseconds after the write
    relevant = memory.query(query_texts=step.next_query, n_results=5)

    agent.act(relevant)

या Docker से server चलाएं

Server image MySQL protocol को 2881 पर और RPC port को 2886 पर expose करता है। Volume mount करें ताकि data directory restart के बाद भी बनी रहे।

bashbash
docker run -d \
  --name seekdb \
  -p 2881:2881 \
  -p 2886:2886 \
  -v ./data:/var/lib/oceanbase \
  oceanbase/seekdb:latest

Hybrid table बनाएं और उसे query करें

किसी table में HNSW index वाला VECTOR column हो सकता है, और साथ में FULLTEXT index भी; फिर एक SELECT similarity, full-text match और scalar predicates, तीनों को मिला देता है।

sqlsql
CREATE TABLE articles (
  id        INT PRIMARY KEY,
  title     TEXT,
  content   TEXT,
  embedding VECTOR(384),
  FULLTEXT INDEX idx_fts (content) WITH PARSER ik,
  VECTOR   INDEX idx_vec (embedding) WITH (DISTANCE=l2, TYPE=hnsw, LIB=vsag)
) ORGANIZATION = HEAP;

SELECT id, title,
       l2_distance(embedding, '[0.12, 0.34, ...]') AS dist
FROM articles
WHERE MATCH(content) AGAINST('quarterly report')
ORDER BY dist APPROXIMATE
LIMIT 10;

Sandbox fork करें, फिर merge या discard करें

`FORK DATABASE` कुछ सेकंड में लिया गया copy-on-write snapshot है। Agent को fork के अंदर काम करने दें, फिर जो tables रखने हों उन्हें merge करें (conflicts कैसे resolve हों, यह FAIL, THEIRS या OURS तय करते हैं), या पूरा database drop कर दें।

sqlsql
FORK DATABASE agent_state TO agent_sandbox_42;

USE agent_sandbox_42;
INSERT INTO memory (session_id, embedding, content) VALUES (...);

MERGE TABLE agent_sandbox_42.memory INTO agent_state.memory STRATEGY THEIRS;
-- ...or throw it away:
DROP DATABASE agent_sandbox_42;

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

कब इस्तेमाल करें

  • ऐसे मामले में इसे चुनें जहां agent को durable memory चाहिए जो उसी loop में writable और searchable हो, बिना अलग vector store और relational database के
  • इसे तब चुनें जब आप speculative agent work को किसी branch में अलग रखना चाहते हों, जिसे merge किया जा सके या फेंका जा सके, न कि उसे हाथ से reconcile करना पड़े
  • RAG के लिए इसे चुनें, जहां query में vector similarity, keyword match और access-control filters एक ही plan में साथ resolve होने चाहिए
  • इसे तब चुनें जब MySQL-compatible, ACID engine किसी और custom database की तुलना में चलाना और embed करना आसान हो

How seekdb compares

seekdb alongside other open-source vector databases tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
Supabase★ 116kManaged Postgres backend whose Vector toolkit (pgvector) stores, indexes, and queries embeddings next to transactional data.
Redis Cloud★ 77.9kFully-managed Redis with built-in vector search, offering low-latency similarity and hybrid queries over any embeddings.
Milvus★ 46.8kअरबों embeddings में बड़े पैमाने पर खोज के लिए एक ओपन सोर्स वेक्टर डेटाबेस
FAISS★ 42kdense vectors पर कुशल similarity search और clustering के लिए लाइब्रेरी
Qdrant★ 35.9kRust में लिखा, समृद्ध payload फ़िल्टरिंग वाला सिमेंटिक सर्च के लिए वेक्टर सर्च इंजन
Chroma★ 29.8kओपन सोर्स एम्बेडिंग डेटाबेस, जो रिट्रीवल और RAG फ़ीचर बनाने में मदद करता है
pgvector★ 23.9kPostgres के लिए ओपन सोर्स वेक्टर similarity search
seekdb★ 3.3kएजेंट स्टेट के लिए MySQL-compatible search database: vector, full-text और relational data एक ही SQL engine में, साथ में copy-on-write sandboxes जिन्हें आप fork और merge कर सकते हैं