Skip to main content

Qdrant-backed KnowledgeStore adapter for Zeno.

Project description

zeno-qdrant

Qdrant-backed KnowledgeStore adapter for Zeno.

Persists facts and documents in either a local on-disk Qdrant store (no server needed) or a remote Qdrant instance. Each row carries a user_id payload field so query-time filters enforce multi-tenant isolation at the database layer. Plugs into the ThreeLayer memory binder as the knowledge and (optionally) the user_memory backing.

Install

uv add 'zeno-framework[qdrant]'
# or, without the AI package:
uv add zeno-qdrant

Features

  • Native async client (qdrant-client's AsyncQdrantClient) — no thread-pool wrapping
  • Local file store via path= (single-process, embedded use cases) or remote server via url= and api_key=
  • Bundled FastEmbed (BAAI/bge-small-en-v1.5, 384-dim) for the default embedding path; no external embedding service required
  • user_id-scoped search via Qdrant's Filter + FieldCondition payload filter (S7 isolation enforced server-side)
  • Lazy collection auto-creation on first add()

Minimal usage

import asyncio
from pathlib import Path

from zeno.agent import Agent
from zeno.app import ZenoApp
from zeno.builtin_tools import recall, remember
from zeno.channels.cli import CliChannel
from zeno.qdrant import QdrantKnowledgeStore
from zeno.memory.sqlite.conversation_store import SqliteConversationStore
from zeno.memory.sqlite.session_store import SqliteSessionStore
from zeno.memory.three_layer import ThreeLayer
from zeno.memory.vector_backed.user_memory_store import VectorBackedUserMemoryStore
from zeno.testing import FakeProvider

async def main() -> None:
    data_dir = Path("./.zeno")
    data_dir.mkdir(exist_ok=True)

    # Local on-disk store — no server required.
    knowledge = QdrantKnowledgeStore(path=data_dir / "qdrant")
    # Or talk to a remote cluster:
    # knowledge = QdrantKnowledgeStore(url="https://...", api_key="...")

    memory = ThreeLayer(
        session=SqliteSessionStore(data_dir / "sessions.db"),
        user_memory=VectorBackedUserMemoryStore(knowledge_store=knowledge),
        knowledge=knowledge,
        conversation=SqliteConversationStore(data_dir / "conversations.db"),
    )

    app = ZenoApp(
        agent=Agent(
            name="root",
            instructions="Use `recall` to look things up and `remember` to store facts.",
            tools=[recall, remember],
        ),
        channels=[CliChannel()],
        provider=FakeProvider(),
        memory=memory,
    )
    await app.run()

asyncio.run(main())

Pass exactly one of path= or url= — passing both (or neither) raises ValueError at construction so the failure surfaces before the first turn rather than mid-search.

Testing

uv run pytest packages/zeno-qdrant

Tests use a temporary local Qdrant directory. The contract suite shared with zeno-chroma guarantees both adapters honour the same KnowledgeStore semantics — swap one for the other with no test changes.

Part of the Zeno framework.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zeno_qdrant-1.0.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zeno_qdrant-1.0.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file zeno_qdrant-1.0.0.tar.gz.

File metadata

  • Download URL: zeno_qdrant-1.0.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zeno_qdrant-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f5fd1ccd065006edab98b9ea592e649baedb1c616754426c59e885bd8c16f9a2
MD5 937a9b916de652bcaa068b0a92d4ed64
BLAKE2b-256 bc0d11e2f269cf9a43f3efb05fdf65552fbc3f79812c05eac299121948eca1f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for zeno_qdrant-1.0.0.tar.gz:

Publisher: publish.yml on nkootstra/zeno

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zeno_qdrant-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: zeno_qdrant-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zeno_qdrant-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5516985d02650a78ee8b7e57f5bf459cfc122e58632e4234f4df96538f1f7b33
MD5 29de5f504276356fde7155378af6338b
BLAKE2b-256 59c5ffa15d4e0a7c9ea161d6b57661a1971d7da7a42d15493e02009f6ef07625

See more details on using hashes here.

Provenance

The following attestation bundles were made for zeno_qdrant-1.0.0-py3-none-any.whl:

Publisher: publish.yml on nkootstra/zeno

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page