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.0rc1.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.0rc1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zeno_qdrant-1.0.0rc1.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.0rc1.tar.gz
Algorithm Hash digest
SHA256 8de64ced5e5590dd37fd4cf76d3c9bf1f9c7363f3aa2fc6396295643fad2a706
MD5 df00aad890883401994d95d22c9644b1
BLAKE2b-256 fe9a77c4d0f2bd184414e34346d3094294c208e0761fcf04b4f67329c4dca5a2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zeno_qdrant-1.0.0rc1-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.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 d4d0c63cdf10c15bb969505b2df53635d1e527aee811103896991eeca35dd26e
MD5 70aea0e861d47753bbce076cc082db72
BLAKE2b-256 ba2691c9f0afcd7946ed292e231968b0c7987ad8065ccf11cbf4e6991a0dc41d

See more details on using hashes here.

Provenance

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