Ananke.Orchestration.Knowledge
0.9.3
dotnet add package Ananke.Orchestration.Knowledge --version 0.9.3
NuGet\Install-Package Ananke.Orchestration.Knowledge -Version 0.9.3
<PackageReference Include="Ananke.Orchestration.Knowledge" Version="0.9.3" />
<PackageVersion Include="Ananke.Orchestration.Knowledge" Version="0.9.3" />
<PackageReference Include="Ananke.Orchestration.Knowledge" />
paket add Ananke.Orchestration.Knowledge --version 0.9.3
#r "nuget: Ananke.Orchestration.Knowledge, 0.9.3"
#:package Ananke.Orchestration.Knowledge@0.9.3
#addin nuget:?package=Ananke.Orchestration.Knowledge&version=0.9.3
#tool nuget:?package=Ananke.Orchestration.Knowledge&version=0.9.3
Ananke.Orchestration.Knowledge
Knowledge pipeline for Ananke — vector knowledge stores, document ingestion, chunking, embedding abstractions, knowledge catalogs, and optional cross-document linking.
Install
dotnet add package Ananke.Orchestration.Knowledge
Note: If you use
Ananke.Orchestration, this package is already included as a transitive dependency.
Quick start
Semantic search
using Ananke.Orchestration.Knowledge;
// InMemoryKnowledgeStore for dev/test; QdrantKnowledgeStore for production
var store = new InMemoryKnowledgeStore(embeddingModel);
await store.UpsertAsync([
new KnowledgeDocument { Id = "doc-1", Text = "Ananke is a .NET agent orchestration library." },
new KnowledgeDocument { Id = "doc-2", Text = "Workflows are built with a fluent graph-as-code API." },
]);
var results = await store.SearchAsync("how do I build a workflow?");
// results[0].Text => "Workflows are built with a fluent graph-as-code API."
Filters
A KnowledgeFilter limits search, listing and delete to documents whose metadata matches. Each entry is one value a
key must hold; a key in AnyOf may hold several, and a document matches when its value is any of them. A document
matches when every entry and every AnyOf key holds; one value per key works as it always has. AnyOf is
experimental (ANNKEEXP004).
var results = await store.SearchAsync("chip shortage", new SearchOptions
{
Filter = new KnowledgeFilter
{
["kind"] = "news",
AnyOf = { ["outlet"] = ["TechCrunch", "The Verge"] },
},
});
The in-memory, Postgres and Qdrant stores apply it in SearchAsync, ListAsync and DeleteAsync;
EntityScopedKnowledgeStore, CatalogAwareKnowledgeStore and LinkedKnowledgeStore pass it on unchanged. A key whose
AnyOf list is empty matches no document. On every store, id (an entry or in AnyOf) matches the chunk's id, not a
metadata key. DeleteAsync with an empty filter (no entries, no AnyOf) throws ArgumentException and deletes
nothing: name what to delete, by source for instance.
Document ingestion pipeline
using Ananke.Orchestration.Knowledge;
using Ananke.Orchestration.Knowledge.Documents;
var processor = new DocumentProcessor(
new HttpClient(),
[new PdfExtractor(), new MarkdownExtractor()], // from Ananke.Documents
new SlidingWindowChunker(),
knowledgeStore);
await using var stream = File.OpenRead("architecture.pdf");
var result = await processor.ProcessAsync(stream, "application/pdf", sourceId: "arch-doc");
// result.ChunkCount => 42
Knowledge catalog (two-phase discovery)
using Ananke.Orchestration.Knowledge.Catalog;
var catalog = new InMemoryKnowledgeCatalog(embeddingModel);
// Wrap any store to auto-update catalog on upsert/delete
var catalogStore = new CatalogAwareKnowledgeStore(innerStore, catalog, enricher);
// Phase 1: discover relevant sources
var sources = await catalog.BrowseAsync(new CatalogBrowseOptions { Query = "deployment" });
// Phase 2: deep-search within matched sources
var chunks = await catalogStore.SearchAsync("kubernetes deployment", new SearchOptions
{
Filter = new KnowledgeFilter { ["source"] = sources[0].Source }
});
The documents a document links to
#pragma warning disable ANNKEEXP004
var processor = new DocumentProcessor(http, extractors, chunker, store)
{
Hyperlinks = new HyperlinkOptions(), // relative links resolve against the document's source id
};
var linked = await new LinkedDocumentReader(store, catalog).ListAsync("plans/oauth.md");
// linked[0].Source => "findings/audit.md", with its EffectiveAt and SupersededBy
How they are stored: with DocumentProcessor.Hyperlinks set, each hyperlink of a section (ExtractedSection.Links)
that HyperlinkOptions.Resolve maps to a source id is written into the metadata of every chunk of that section, as
entity:document:{source id} = document:{source id}. The default, HyperlinkOptions.ResolveRelative, resolves a
relative link against the document's own source id and leaves out external URLs and links within the document. The
links go with the document's chunks when it is indexed again, like the rest of their metadata. Off unless set.
How they are read: LinkedDocumentReader.ListAsync(source) lists the chunks of that source through
IListableKnowledgeStore, takes the distinct entity:document: keys, and returns each target newest first, with its
date and what supersedes it from the catalog when one is given, else from the target's own chunks. No model call.
KnowledgeCatalogTools.CreateLinks(reader) (in Ananke.Orchestration) exposes it as the list_linked_documents tool.
Cross-document linking
using Ananke.Orchestration.Knowledge.Linking;
// Opt-in via DI — decorates IKnowledgeStore with graph-expanded search
services.AddKnowledgeLinking(options =>
{
options.AutoLinkOnIngest = true; // LLM-based post-ingestion linking
options.SimilarityThreshold = 0.7f; // link documents above this score
});
LinkedKnowledgeStore adds a linked chunk only when the search's filter matches it, and reads it through the inner
store's listing when the inner store lists (IListableKnowledgeStore), so the query is embedded once per search. It
lists through its inner store too. Its DeleteAsync removes the links of the chunks it deletes before the chunks:
the ids a filter names, and, when the inner store lists, every chunk the filter matches.
Key types
| Type | Kind | Purpose |
|---|---|---|
IKnowledgeStore |
Interface | Vector-indexed store — SearchAsync, UpsertAsync, DeleteAsync |
InMemoryKnowledgeStore |
Class | In-process implementation for dev/test |
IKnowledgeCatalog |
Interface | Document-level metadata catalog for two-phase discovery |
InMemoryKnowledgeCatalog |
Class | In-process catalog implementation |
CatalogAwareKnowledgeStore |
Class | Decorator — auto-updates catalog on store operations |
IDocumentExtractor |
Interface | Extracts structured text from files (PDF, Markdown, etc.) |
IDocumentChunker |
Interface | Splits text into embedding-sized chunks |
SlidingWindowChunker |
Class | Sliding window chunker with configurable overlap |
DocumentProcessor |
Class | Orchestrates the full extract → chunk → embed → store pipeline |
DocumentSummarizer |
Class | Uses an LLM to generate knowledge base descriptions |
HyperlinkOptions |
Record | How DocumentProcessor stores a section's hyperlinks as links to other documents |
LinkedDocumentReader |
Class | Lists the documents a document links to, from the stored links |
DocumentLinkExtractor |
Class | Discovers semantic links between documents via LLM |
LinkedKnowledgeStore |
Class | Decorator — expands search results through document link graph |
KnowledgeBase |
Class | Combines a store, catalog entry, and description into a named unit |
InMemoryEmbedder |
Class | Deterministic character-hash embedder for testing |
What this package is responsible for
- semantic search over embedded document chunks via
IKnowledgeStore - document ingestion via
DocumentProcessor - document-level discovery via
IKnowledgeCatalog - optional reranking and enrichment through
CatalogAwareKnowledgeStore - optional graph-expanded retrieval through
LinkedKnowledgeStore - grouping multiple stores plus one catalog through
KnowledgeBase
This package does not depend on the workflow engine. It can be used independently in ingestion services, background jobs, and standalone search applications.
The pipeline
1. IDocumentExtractor.ExtractAsync(stream) → structured text + sections
2. IDocumentChunker.Chunk(text) → DocumentChunk[]
3. IEmbeddingModel.EmbedBatchAsync(chunks) → float[][] vectors
4. IKnowledgeStore.UpsertAsync(documents) → indexed in vector store
5. IKnowledgeStore.SearchAsync(query) → ranked KnowledgeChunk[]
Optional enrichment layers compose via decoration:
IKnowledgeStore
└─ CatalogAwareKnowledgeStore (auto-catalogs on upsert)
└─ LinkedKnowledgeStore (graph-expanded search)
Package boundaries
Ananke.Orchestration.Knowledgeowns the knowledge, catalog, document, embedding, and linking contracts/implementations.Ananke.Documentssupplies concrete extractors such asPdfExtractorandMarkdownExtractor.Ananke.Orchestrationdepends on this package and contains the bridge types that expose knowledge stores and catalogs asToolKittools.
This split allows vector-store and ingestion integrations to depend on the knowledge pipeline without pulling in workflow execution.
Implementations
| Interface | In-memory (this package) | Distributed |
|---|---|---|
IKnowledgeStore |
InMemoryKnowledgeStore |
QdrantKnowledgeStore (Ananke.Qdrant), PostgresKnowledgeStore (Ananke.Postgres) |
IKnowledgeCatalog |
InMemoryKnowledgeCatalog |
QdrantKnowledgeCatalog (Ananke.Qdrant), PostgresKnowledgeCatalog (Ananke.Postgres) |
IDocumentLinkGraph |
InMemoryDocumentLinkGraph |
— |
IDocumentExtractor |
— | PdfExtractor, MarkdownExtractor (Ananke.Documents) |
IEmbeddingModel |
InMemoryEmbedder |
OpenAIEmbeddingModel, GeminiEmbeddingModel |
Dependencies
Ananke.Abstractions— forIAgentModel,IEmbeddingModel, and shared agent/message contractsMicrosoft.Extensions.DependencyInjection.Abstractions— DI extension supportMicrosoft.Extensions.Logging.Abstractions— logging abstractions for processing components
This package has no dependency on Ananke.Orchestration — it is independent of the workflow engine.
Related packages
| Package | What it adds |
|---|---|
Ananke.Orchestration |
ToolKit bridge — registers knowledge search as agent-callable tools |
Ananke.Documents |
PdfExtractor and MarkdownExtractor for DocumentProcessor |
Ananke.Qdrant |
Distributed vector store implementations via Qdrant |
Ananke.Orchestration.OpenAI |
OpenAIEmbeddingModel for production embeddings |
Ananke.Orchestration.Google |
GeminiEmbeddingModel for production embeddings |
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.Abstractions (= 0.9.3)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Ananke.Orchestration.Knowledge:
| Package | Downloads |
|---|---|
|
Ananke.Orchestration
Workflow orchestration engine for .NET - fluent graph-as-code builder, AgentJob with tool calling, checkpointing, tracing, and LLM provider abstractions. |
|
|
Ananke.Documents
Document extractors for the Ananke knowledge pipeline. Implements IDocumentExtractor for PDF, Markdown, and plain text content. |
|
|
Ananke.Qdrant
Qdrant vector database provider for Ananke — IKnowledgeStore implementation with dense vector search, metadata filtering, and automatic collection management. |
|
|
Ananke.Postgres
PostgreSQL provider for Ananke — IKnowledgeStore and IKnowledgeCatalog on Postgres with pgvector for embedding search, full-text search for keywords, hybrid ranking, jsonb metadata filters and real deletes. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.9.3 | 89 | 11/24/2026 |
| 0.9.2 | 166 | 11/20/2026 |
| 0.9.1 | 243 | 11/3/2026 |
| 0.9.0 | 326 | 9/22/2026 |
| 0.8.9 | 372 | 8/18/2026 |
| 0.8.8 | 367 | 8/3/2026 |
| 0.8.7 | 344 | 7/19/2026 |
| 0.8.6 | 374 | 6/22/2026 |
| 0.8.5 | 361 | 6/15/2026 |
| 0.8.4 | 403 | 5/29/2026 |
| 0.8.3 | 362 | 5/17/2026 |
| 0.8.2 | 371 | 5/15/2026 |
| 0.8.1 | 390 | 5/9/2026 |
| 0.8.0 | 370 | 5/9/2026 |
| 0.7.2 | 254 | 4/12/2026 |
| 0.7.1 | 237 | 4/11/2026 |
| 0.7.0 | 246 | 4/11/2026 |
| 0.6.0 | 251 | 4/10/2026 |