microsoft / microsoft/agent-framework

.NET: [Feature]: Add first-class Foundry IQ support for .NET

Open
#7,969 0 comments 0 reactions 1 assignee Claimed by @rogerbarreto View on GitHub
.NET foundry
Dominant language
Python
Stars
13.6k
Forks
2.3k
Avg merge
2d 45m
Merged PRs (30d)
358

Description

### Description

Add first-class Foundry IQ support to the Agent Framework .NET SDK, equivalent to the Python SDK's `AzureAISearchContextProvider` agentic mode.

The Python integration supports Azure AI Search Knowledge Bases through a framework context provider, including agentic retrieval, query planning, multi-hop retrieval, extractive or synthesized output, reasoning-effort configuration, and use of either an existing Knowledge Base or one created from an index. In .NET, developers currently need to use lower-level Azure AI Search tooling or build a custom adapter around `TextSearchProvider`; neither provides the same first-class Foundry IQ integration.

Expected behavior:

- Provide an idiomatic .NET context provider for Foundry IQ/Azure AI Search Knowledge Bases.
- Support agentic retrieval against an existing Knowledge Base.
- Expose relevant retrieval settings such as output mode, reasoning effort, and result limits where supported by the underlying Azure SDK.
- Integrate directly with `AIAgent` through `AIContextProviders`.
- Include documentation and an end-to-end sample corresponding to the Python agentic retrieval sample.

Python references:

- Sample: https://github.com/microsoft/agent-framework/blob/main/python/samples/02-agents/context_providers/azure_ai_search/search_context_agentic.py
- Provider implementation: https://github.com/microsoft/agent-framework/blob/main/python/packages/azure-ai-search/agent_framework_azure_ai_search/_context_provider.py
- Package documentation: https://github.com/microsoft/agent-framework/blob/main/python/packages/azure-ai-search/README.md

### Code Sample

```csharp
var searchProvider = new AzureAISearchContextProvider(new()
{
Endpoint = new Uri(searchEndpoint),
Credential = credential,
Mode = AzureAISearchMode.Agentic,
KnowledgeBaseName = knowledgeBaseName,
OutputMode = KnowledgeBaseOutputMode.ExtractiveData,
RetrievalReasoningEffort = RetrievalReasoningEffort.Minimal,
});

AIAgent agent = chatClient.AsAIAgent(new ChatClientAgentOptions
{
AIContextProviders = [searchProvider],
});
```

The exact API shape can follow existing .NET naming and options conventions; the important requirement is a supported first-class integration rather than requiring each application to implement its own search adapter.

### Language/SDK

.NET

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.