Skip to content

Agent Framework RAG (TextSearchProvider)

ConnectSoft’s ConnectSoft.Extensions.AI.AgentsFramework library can register agents with TextSearchProvider, an AIContextProvider that retrieves text before (or on-demand around) each model call.

Layers

Layer Type Purpose
Application retrieval IRetrievalService Semantic search over Microsoft.Extensions.VectorData (see AI extensions).
Agent Framework TextSearchProvider Injects retrieved passages into the agent pipeline via ChatClientAgentOptions.AIContextProviders.
Bridge IAgentTextSearchAdapter Maps a query string to TextSearchProvider.TextSearchResult (implemented in BaseTemplate ConnectSoft.BaseTemplate.AgentFramework with RetrievalAgentTextSearchAdapterIRetrievalService).

Configure per-agent AgentRegistrationOptions.Rag (Enabled, VectorCollectionName, TopK, SearchTime, CitationsPrompt, UseInMemoryChatHistory).

Alignment with ingestion

Use the same collection name for:

  • AgentFramework:Agents[*]:Rag:VectorCollectionName
  • Ingestion / MicrosoftExtensionsAI:VectorStore:CollectionName (and pipeline targets)

so agents search the corpus produced by vector ingestion.

Tutorials

  • Agent Skills — folder-based SKILL.md libraries via FileAgentSkillsProvider (optional AgentFramework:AgentSkills in ConnectSoft).
  • Agent Harness — advanced execution/hosting; not part of the default BaseTemplate surface; evaluate risk before enabling.