Ananke.Qdrant
0.2.0
dotnet add package Ananke.Qdrant --version 0.2.0
NuGet\Install-Package Ananke.Qdrant -Version 0.2.0
<PackageReference Include="Ananke.Qdrant" Version="0.2.0" />
<PackageVersion Include="Ananke.Qdrant" Version="0.2.0" />
<PackageReference Include="Ananke.Qdrant" />
paket add Ananke.Qdrant --version 0.2.0
#r "nuget: Ananke.Qdrant, 0.2.0"
#:package Ananke.Qdrant@0.2.0
#addin nuget:?package=Ananke.Qdrant&version=0.2.0
#tool nuget:?package=Ananke.Qdrant&version=0.2.0
Ananke.Qdrant
Qdrant vector database provider for Ananke — IKnowledgeStore and IKnowledgeCatalog implementations with dense vector search, metadata filtering, automatic collection management, and time-decay–aware catalog.
Install
dotnet add package Ananke.Qdrant
Requires a running Qdrant instance. Quickest way:
docker run -p 6333:6333 -p 6334:6334 qdrant/qdrant
Quick start
Knowledge store (chunk-level vector search)
using Ananke.Orchestration.Knowledge;
using Ananke.Qdrant;
using Qdrant.Client;
var client = new QdrantClient("localhost", 6334);
var embedder = OpenAIEmbeddingModel.Create(apiKey);
// Creates the "knowledge" collection automatically on first use
var store = new QdrantKnowledgeStore(client, embedder);
// Ingest documents via the standard pipeline
var processor = new DocumentProcessor(httpClient, extractors, chunker, store);
await processor.ProcessAsync(pdfStream, "application/pdf", "design-patterns.pdf");
// Semantic search
var results = await store.SearchAsync("factory method pattern", new SearchOptions { TopK = 5 });
Knowledge catalog (document-level discovery + time decay)
The catalog maintains one entry per source document in a separate Qdrant collection (knowledge_catalog). Each entry is enriched with LLM-extracted keywords, a category, and a summary — enabling agents to discover what's in the knowledge base before deep-searching individual chunks.
var catalog = new QdrantKnowledgeCatalog(client, embedder);
// Optional: LLM-based keyword/category/summary extraction on ingest
var extractor = new CatalogKeywordExtractor(agentModel);
// Wrap any IKnowledgeStore — catalog updates happen automatically on upsert/delete
var catalogStore = new CatalogAwareKnowledgeStore(
store, catalog, extractor,
new TimeDecayOptions { HalfLifeDays = 90, FloorWeight = 0.3f });
// Use catalogStore as a drop-in IKnowledgeStore replacement.
// Upserts now auto-maintain the catalog with timestamps + LLM-enriched metadata.
// Searches now apply time-decay reranking (newer documents score higher).
Time-decay behavior: a chunk's final score = vectorSimilarity × decayWeight(age). With a 90-day half-life and 0.3 floor: a document indexed today scores at 100 %, 90 days ago at 50 %, and anything older than ~270 days bottoms out at 30 %. Between equally relevant documents on the same topic, the fresher one always wins.
Agent tools
Give agents both chunk-level search and document-level discovery:
// Chunk-level search (existing)
var searchTools = KnowledgeSearchTool.Create("knowledge", catalogStore,
description: "Search indexed engineering documents.");
// Document-level catalog browsing and discovery (new)
var catalogTools = KnowledgeCatalogTools.Create(catalog);
// Merge into a single toolkit — agent gets search + browse + discover
searchTools.Merge(catalogTools);
The agent now has three tools:
| Tool | What it does |
|---|---|
search_engineering_docs |
Semantic search over individual text chunks |
browse_catalog |
List all indexed documents with keywords, categories, and timestamps |
discover_sources |
Semantic search over document summaries to find relevant sources |
This enables two-phase discovery: the agent first discovers which documents are relevant via the catalog, then deep-searches within those sources for specific information.
What it registers
| Service | Qdrant collection | Description |
|---|---|---|
QdrantKnowledgeStore |
knowledge (configurable) |
Chunk-level embeddings for semantic search |
QdrantKnowledgeCatalog |
knowledge_catalog (configurable) |
Document-level summaries for catalog discovery |
Both collections are created automatically on first use with cosine distance.
Configuration
// Custom collection names and vector dimensions
var store = new QdrantKnowledgeStore(
client, embedder,
collectionName: "my_docs", // default: "knowledge"
vectorSize: 3072); // default: 1536 (text-embedding-3-small)
var catalog = new QdrantKnowledgeCatalog(
client, embedder,
collectionName: "my_docs_catalog", // default: "knowledge_catalog"
vectorSize: 3072);
Demo
The LongTermMemoryDemo shows the full pipeline end-to-end:
# In-memory store (no infrastructure needed)
dotnet run
# Qdrant-backed store
docker compose up -d && dotnet run -- --qdrant
# Qdrant + knowledge catalog with time decay
docker compose up -d && dotnet run -- --qdrant --catalog
Related packages
| Package | What it adds |
|---|---|
Ananke.Orchestration |
Core: workflows, agents, knowledge pipeline, in-memory store |
Ananke.Orchestration.OpenAI |
OpenAI chat models + embedding models |
Ananke.Documents |
Document extractors (PDF, Markdown) for the knowledge pipeline |
Ananke |
Meta-package — includes everything |
Documentation
Full docs, demos, and architecture: github.com/sevensamurai/Ananke
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Ananke.Orchestration (>= 0.2.0)
- Qdrant.Client (>= 1.17.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.