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.

See also

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.2.tar.gz (5.4 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.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zeno_qdrant-1.0.2.tar.gz
  • Upload date:
  • Size: 5.4 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.2.tar.gz
Algorithm Hash digest
SHA256 19bc48fb9115d8e6e3d676ecd8f850a53f332a8c27f54d1d5be5c51399b47355
MD5 5e9dd1e910254a975120dd9edbc41827
BLAKE2b-256 5478444d120b55d365365378f0a6a06f20a3a82b1aad000193c9a010bd103b52

See more details on using hashes here.

Provenance

The following attestation bundles were made for zeno_qdrant-1.0.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: zeno_qdrant-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 41f3686db7c6e4e8611989fa285698f5ba60ed8b5cc195577aa6735d688c6189
MD5 6bb60838e9f2a51e5842b0da408e24a1
BLAKE2b-256 94ecb08563df02000cf05d7d5a55feebf56ca801a673ea770b0e9606b23daadd

See more details on using hashes here.

Provenance

The following attestation bundles were made for zeno_qdrant-1.0.2-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