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

Uploaded Python 3

File details

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

File metadata

  • Download URL: zeno_qdrant-1.0.0rc2.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.0rc2.tar.gz
Algorithm Hash digest
SHA256 47b0b333c3e5ce7180593056e518d5afc4291c97fdf2d1545e28c74f9169a9c0
MD5 f16036c6fed9149ec7c58a12712c31eb
BLAKE2b-256 a0baff742f82af80d064ac3d8e62e10e3db814d187ed14b044c7b554bae2fc08

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zeno_qdrant-1.0.0rc2-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.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 5dc2a36c87a0a057555527ce72fae1e112a8c71cd79fd737ada116cc7898ccbd
MD5 f7c92ba8c3107405e895148412a37cf3
BLAKE2b-256 cb6feac516ec00bae9185d396d61e2f0b0d136ac2e96de0afa9d5b626a5c41be

See more details on using hashes here.

Provenance

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