Skip to content

Microservices

Target Architecture — Final-State Design

This page enumerates the final-state microservice topology of the Knowledge Platform. Each service is an independently deployable .NET 10 / ASP.NET Core application following Clean Architecture + DDD, messaging over MassTransit on Azure Service Bus, persisting via ConnectSoft.Extensions.PersistenceModel.*, and instrumented with ConnectSoft.Extensions.Observability (Serilog + OpenTelemetry + Application Insights).

The Knowledge Platform comprises 22 microservices in the ConnectSoft.Factory.Knowledge.* namespace. Each owns its aggregates and store, exposes behaviour through REST/gRPC and the canonical event envelope, and scales independently per tenant load. Services never share a database; cross-service knowledge flows as events.

Service Catalog

Microservice Responsibility APIs Key Events Aggregate Roots Store
KnowledgeGraphService Maintain the typed knowledge graph and produce neighbourhood projections POST /knowledge/graph/query KnowledgeNodeUpserted, KnowledgeEdgeUpserted, GraphProjectionUpdated KnowledgeNode, KnowledgeEdge, GraphProjection PostgreSQL / Azure SQL (NHibernate)
MetadataIndexService Structured metadata index for filtered retrieval POST /knowledge/search/metadata MetadataIndexed MemoryRecord (index view) PostgreSQL / Azure SQL
VectorMemoryService Manage vector collections; semantic + hybrid retrieval POST /knowledge/search/semantic, POST /knowledge/search/hybrid VectorDocumentUpserted, VectorDocumentDeleted VectorDocument, VectorChunk Qdrant (Azure AI Search alt.)
EmbeddingService Generate and refresh embeddings via ConnectSoft.Extensions.AI.* (internal gRPC) EmbeddingCompleted, EmbeddingFailed, EmbeddingRefreshed EmbeddingJob Qdrant + SQL
ArtifactMemoryService Store artifact bodies, versions, and snapshots with lineage POST /knowledge/ingest/artifact ArtifactIngested, ArtifactVersionCreated, ArtifactSnapshotCaptured ArtifactMemory, ArtifactVersion, ArtifactSnapshot Azure Blob (+ SQL metadata)
ContextBuilderService Assemble governed, budgeted Context Packages POST /knowledge/context/build, GET /knowledge/context/{contextPackageId} ContextBuildRequested, ContextPackageBuilt ContextBuildRequest, ContextPackage, ContextSource Redis (+ SQL)
CodebaseKnowledgeService Index repositories; extract symbols; build dependency graph POST /knowledge/ingest/repository RepositoryIndexed, CodeSymbolExtracted, CodeDependencyGraphBuilt CodeRepository, CodeSymbol, CodeIndexJob SQL + Qdrant
DocumentationKnowledgeService Ingest and chunk documentation and design docs POST /knowledge/ingest/documentation DocumentationIndexed (shared VectorDocument, MemoryRecord) Qdrant + SQL
TemplateKnowledgeService Register template knowledge for reuse and matching (internal) TemplateKnowledgeRegistered (shared KnowledgePattern) Azure DevOps Git + SQL
LibraryKnowledgeService Index reusable libraries and their public surface (internal) LibraryIndexed (shared CodeRepository, CodeSymbol) SQL + Qdrant
PromptMemoryService Capture prompt templates, versions, and run history POST /knowledge/ingest/prompt PromptTemplateRegistered, PromptVersionPublished, PromptRunRecorded PromptTemplate, PromptVersion, PromptRun Azure DevOps Git + SQL
DecisionMemoryService Record architectural decisions and their alternatives (internal) DecisionRecorded, DecisionAlternativeAdded DecisionRecord, DecisionAlternative Azure DevOps Git + SQL
RuntimeMemoryService Ingest runtime signals, incidents, and feedback POST /knowledge/ingest/runtime-signal RuntimeSignalRecorded, IncidentMemoryCaptured, FeedbackItemRecorded RuntimeSignal, IncidentMemory, FeedbackItem App Insights / OTEL + SQL
PatternCatalogService Promote recurring solutions into versioned patterns (internal) KnowledgePatternDiscovered, PatternVersionPublished KnowledgePattern, PatternVersion Azure DevOps Git + SQL
KnowledgeIngestionService Front-door ingestion orchestration and dedup POST /knowledge/ingest/artifact (orchestrator) MemoryRecordCreated, ArtifactIngested MemoryRecord PostgreSQL / Azure SQL
KnowledgeQualityService Assess knowledge against quality rules (internal) KnowledgeQualityAssessed, QualityRuleViolated KnowledgeQualityAssessment, QualityRule PostgreSQL / Azure SQL
MemoryPolicyService Evaluate access policy; record decisions and audits POST /knowledge/access/evaluate MemoryAccessEvaluated, MemoryAccessDenied MemoryAccessPolicy, MemoryAccessDecision, MemoryAccessAudit PostgreSQL / Azure SQL
MemoryClassificationService Classify memory and assign sensitivity POST /knowledge/classify MemoryClassified MemoryClassification PostgreSQL / Azure SQL
MemoryRedactionService Redact sensitive content from served knowledge POST /knowledge/redact MemoryRedacted (operates on MemoryClassification, MemoryRecord) SQL + Azure Blob
KnowledgeReplayService Replay knowledge and signal timelines for analysis (internal) KnowledgeReplayStarted, KnowledgeReplayCompleted (operates on RuntimeSignal, MemoryRecord) OTEL + SQL
KnowledgeSearchService Unified search facade across vector, metadata, and graph POST /knowledge/search/semantic, /hybrid, /metadata, POST /knowledge/graph/query KnowledgeSearchExecuted (query facade — owns none) Qdrant + SQL (read)
KnowledgeStudioBff Backend-for-frontend for the Knowledge Studio experience (aggregates public APIs) (read facade — owns none) Redis (read cache)

Search facade vs. owning services

The four /knowledge/search/* and /knowledge/graph/query endpoints are published by KnowledgeSearchService as a thin facade and delegate to the owning services (VectorMemoryService, MetadataIndexService, KnowledgeGraphService). This keeps a single, governed query surface while preserving aggregate ownership. All four endpoints are also documented under their owning service for completeness in APIs.

Service Interaction

flowchart TB
    AM["Agent Mesh"] -->|"BuildContextPackage"| CB["ContextBuilderService"]
    Studio["Knowledge Studio UI"] --> BFF["KnowledgeStudioBff"]
    BFF --> Search["KnowledgeSearchService"]

    CB --> Search
    CB --> KG["KnowledgeGraphService"]
    CB --> Gov["MemoryPolicyService"]
    CB --> Redact["MemoryRedactionService"]
    CB --> Cache[("Redis")]

    Search --> VM["VectorMemoryService"]
    Search --> MI["MetadataIndexService"]
    Search --> KG

    Ingest["KnowledgeIngestionService"] --> Classify["MemoryClassificationService"]
    Ingest --> Embed["EmbeddingService"]
    Ingest --> Art["ArtifactMemoryService"]
    Ingest --> KG
    Ingest --> MI
    Ingest --> Quality["KnowledgeQualityService"]
    Embed --> VM

    Code["CodebaseKnowledgeService"] --> Embed
    Code --> KG
    Lib["LibraryKnowledgeService"] --> KG
    Docs["DocumentationKnowledgeService"] --> Embed
    Prompt["PromptMemoryService"] --> KG
    Decision["DecisionMemoryService"] --> KG
    Pattern["PatternCatalogService"] --> KG
    Template["TemplateKnowledgeService"] --> Pattern
    Runtime["RuntimeMemoryService"] --> KG
    Replay["KnowledgeReplayService"] --> Runtime

    Gov --> KG
    Gov --> VM
    Gov --> Art
Hold "Alt" / "Option" to enable pan & zoom

Cross-Cutting Service Concerns

  • Persistence — relational aggregates use ConnectSoft.Extensions.PersistenceModel.NHibernate against Azure SQL / PostgreSQL; vector and blob access use dedicated adapters.
  • Messaging — every service hosts MassTransit consumers and publishes domain/integration events in the canonical envelope; sagas coordinate multi-step ingestion.
  • AIEmbeddingService, MemoryClassificationService, and KnowledgeQualityService use ConnectSoft.Extensions.AI.*; agent-facing surfaces are exposed via ConnectSoft.Extensions.ModelContextProtocol (MCP) so agents in the Agent Mesh (Microsoft Agent Framework) can call knowledge tools.
  • ObservabilityConnectSoft.Extensions.Observability provides Serilog structured logs, OTEL traces/metrics, and Application Insights export; traceId propagates from the envelope into every span.
  • Multi-tenancytenantId scopes every query, index partition, and policy decision.