Ananke.Orchestration.Knowledge
0.8.3
dotnet add package Ananke.Orchestration.Knowledge --version 0.8.3
NuGet\Install-Package Ananke.Orchestration.Knowledge -Version 0.8.3
<PackageReference Include="Ananke.Orchestration.Knowledge" Version="0.8.3" />
<PackageVersion Include="Ananke.Orchestration.Knowledge" Version="0.8.3" />
<PackageReference Include="Ananke.Orchestration.Knowledge" />
paket add Ananke.Orchestration.Knowledge --version 0.8.3
#r "nuget: Ananke.Orchestration.Knowledge, 0.8.3"
#:package Ananke.Orchestration.Knowledge@0.8.3
#addin nuget:?package=Ananke.Orchestration.Knowledge&version=0.8.3
#tool nuget:?package=Ananke.Orchestration.Knowledge&version=0.8.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."
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 }
});
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
});
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 |
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) |
IKnowledgeCatalog |
InMemoryKnowledgeCatalog |
QdrantKnowledgeCatalog (Ananke.Qdrant) |
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.8.3)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)
NuGet packages (3)
Showing the top 3 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.Qdrant
Qdrant vector database provider for Ananke — IKnowledgeStore implementation with dense vector search, metadata filtering, and automatic collection management. |
|
|
Ananke.Documents
Document extractors for the Ananke knowledge pipeline. Implements IDocumentExtractor for PDF, Markdown, and plain text content. |
GitHub repositories
This package is not used by any popular GitHub repositories.