Skip to content
4 changes: 1 addition & 3 deletions agent-framework/TOC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ items:
- name: Observability
href: user-guide/observability.md
- name: Integrations
items:
- name: AG-UI
href: integrations/ag-ui/TOC.yml
href: integrations/TOC.yml
- name: Support
href: support/TOC.yml
- name: Migration Guide
Expand Down
4 changes: 4 additions & 0 deletions agent-framework/integrations/TOC.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: Overview
href: index.md
- name: AG-UI
href: ag-ui/TOC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ To see tool calls and results in real-time, extend the client's streaming loop t

```csharp
// Inside the streaming loop from getting-started.md
await foreach (AgentResponseUpdate update in agent.RunStreamingAsync(messages, thread))
await foreach (AgentResponseUpdate update in agent.RunStreamingAsync(messages, session))
{
ChatResponseUpdate chatUpdate = update.AsChatResponseUpdate();

Expand Down
4 changes: 2 additions & 2 deletions agent-framework/integrations/ag-ui/frontend-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ AIAgent inspectableAgent = baseAgent

static async IAsyncEnumerable<AgentResponseUpdate> InspectToolsMiddleware(
IEnumerable<ChatMessage> messages,
AgentThread? thread,
AgentSession? session,
AgentRunOptions? options,
AIAgent innerAgent,
CancellationToken cancellationToken)
Expand All @@ -109,7 +109,7 @@ static async IAsyncEnumerable<AgentResponseUpdate> InspectToolsMiddleware(
}
}

await foreach (AgentResponseUpdate update in innerAgent.RunStreamingAsync(messages, thread, options, cancellationToken))
await foreach (AgentResponseUpdate update in innerAgent.RunStreamingAsync(messages, session, options, cancellationToken))
{
yield return update;
}
Expand Down
6 changes: 3 additions & 3 deletions agent-framework/integrations/ag-ui/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ AIAgent agent = chatClient.AsAIAgent(
name: "agui-client",
description: "AG-UI Client Agent");

AgentThread thread = await agent.GetNewThreadAsync();
AgentSession session = await agent.GetNewSessionAsync();
List<ChatMessage> messages =
[
new(ChatRole.System, "You are a helpful assistant.")
Expand Down Expand Up @@ -209,7 +209,7 @@ try
bool isFirstUpdate = true;
string? threadId = null;

await foreach (AgentResponseUpdate update in agent.RunStreamingAsync(messages, thread))
await foreach (AgentResponseUpdate update in agent.RunStreamingAsync(messages, session))
{
ChatResponseUpdate chatUpdate = update.AsChatResponseUpdate();

Expand Down Expand Up @@ -259,7 +259,7 @@ catch (Exception ex)
- **AsAIAgent**: Extension method on `AGUIChatClient` to create an agent from the client
- **RunStreamingAsync**: Streams responses as `AgentResponseUpdate` objects
- **AsChatResponseUpdate**: Extension method to access chat-specific properties like `ConversationId` and `ResponseId`
- **Thread Management**: The `AgentThread` maintains conversation context across requests
- **Session Management**: The `AgentSession` maintains conversation context across requests
- **Content Types**: Responses include `TextContent` for messages and `ErrorContent` for errors

### Configure and Run the Client
Expand Down
18 changes: 9 additions & 9 deletions agent-framework/integrations/ag-ui/human-in-the-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ var jsonOptions = app.Services.GetRequiredService<IOptions<Microsoft.AspNetCore.

var agent = baseAgent
.AsBuilder()
.Use(runFunc: null, runStreamingFunc: (messages, thread, options, innerAgent, cancellationToken) =>
.Use(runFunc: null, runStreamingFunc: (messages, session, options, innerAgent, cancellationToken) =>
HandleApprovalRequestsMiddleware(
messages,
thread,
session,
options,
innerAgent,
jsonOptions.SerializerOptions,
Expand All @@ -128,7 +128,7 @@ var agent = baseAgent

static async IAsyncEnumerable<AgentResponseUpdate> HandleApprovalRequestsMiddleware(
IEnumerable<ChatMessage> messages,
AgentThread? thread,
AgentSession? session,
AgentRunOptions? options,
AIAgent innerAgent,
JsonSerializerOptions jsonSerializerOptions,
Expand All @@ -139,7 +139,7 @@ static async IAsyncEnumerable<AgentResponseUpdate> HandleApprovalRequestsMiddlew

// Invoke inner agent
await foreach (var update in innerAgent.RunStreamingAsync(
modifiedMessages, thread, options, cancellationToken))
modifiedMessages, session, options, cancellationToken))
{
// Process updates: Convert approval requests to client tool calls
await foreach (var processedUpdate in ConvertFunctionApprovalsToToolCalls(update, jsonSerializerOptions))
Expand Down Expand Up @@ -327,10 +327,10 @@ var jsonSerializerOptions = JsonSerializerOptions.Default;
// Wrap the agent with approval middleware
var wrappedAgent = agent
.AsBuilder()
.Use(runFunc: null, runStreamingFunc: (messages, thread, options, innerAgent, cancellationToken) =>
.Use(runFunc: null, runStreamingFunc: (messages, session, options, innerAgent, cancellationToken) =>
HandleApprovalRequestsClientMiddleware(
messages,
thread,
session,
options,
innerAgent,
jsonSerializerOptions,
Expand All @@ -339,7 +339,7 @@ var wrappedAgent = agent

static async IAsyncEnumerable<AgentResponseUpdate> HandleApprovalRequestsClientMiddleware(
IEnumerable<ChatMessage> messages,
AgentThread? thread,
AgentSession? session,
AgentRunOptions? options,
AIAgent innerAgent,
JsonSerializerOptions jsonSerializerOptions,
Expand All @@ -349,7 +349,7 @@ static async IAsyncEnumerable<AgentResponseUpdate> HandleApprovalRequestsClientM
var processedMessages = ConvertApprovalResponsesToToolResults(messages, jsonSerializerOptions);

// Invoke inner agent
await foreach (var update in innerAgent.RunStreamingAsync(processedMessages, thread, options, cancellationToken))
await foreach (var update in innerAgent.RunStreamingAsync(processedMessages, session, options, cancellationToken))
{
// Process updates: Convert tool calls to approval requests
await foreach (var processedUpdate in ConvertToolCallsToApprovalRequests(update, jsonSerializerOptions))
Expand Down Expand Up @@ -491,7 +491,7 @@ do
approvalToolCalls.Clear();

await foreach (AgentResponseUpdate update in wrappedAgent.RunStreamingAsync(
messages, thread, cancellationToken: cancellationToken))
messages, session, cancellationToken: cancellationToken))
{
foreach (AIContent content in update.Contents)
{
Expand Down
6 changes: 3 additions & 3 deletions agent-framework/integrations/ag-ui/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ AG-UI is a standardized protocol for building AI agent interfaces that provides:
- **Remote Agent Hosting**: Deploy AI agents as web services accessible by multiple clients
- **Real-time Streaming**: Stream agent responses using Server-Sent Events (SSE) for immediate feedback
- **Standardized Communication**: Consistent message format for reliable agent interactions
- **Thread Management**: Maintain conversation context across multiple requests
- **Session Management**: Maintain conversation context across multiple requests
- **Advanced Features**: Human-in-the-loop approvals, state synchronization, and custom UI rendering

## When to Use AG-UI
Expand Down Expand Up @@ -65,7 +65,7 @@ While you can run agents directly in your application using Agent Framework's `R
| Client Access | Single application | Multiple clients (web, mobile) |
| Streaming | In-process async iteration | Server-Sent Events (SSE) |
| State Management | Application-managed | Protocol-level state snapshots |
| Thread Context | Application-managed | Protocol-managed thread IDs |
| Session Context | Application-managed | Protocol-managed session IDs |
| Approval Workflows | Custom implementation | Built-in middleware pattern |

## Architecture Overview
Expand Down Expand Up @@ -117,7 +117,7 @@ Understanding how Agent Framework concepts map to AG-UI helps you build effectiv
| `AgentResponseUpdate` | AG-UI Events | Converted to protocol events automatically |
| `AIFunctionFactory.Create()` | Backend Tools | Executed on server, results streamed |
| `ApprovalRequiredAIFunction` | Human-in-the-Loop | Middleware converts to approval protocol |
| `AgentThread` | Thread Management | `ConversationId` maintains context |
| `AgentSession` | Session Management | `ConversationId` maintains context |
| `ChatResponseFormat.ForJsonSchema<T>()` | State Snapshots | Structured output becomes state events |

## Installation
Expand Down
10 changes: 5 additions & 5 deletions agent-framework/integrations/ag-ui/security-considerations.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ Forwarded properties contain arbitrary JSON that passes through the system. Trea

AG-UI does not include built-in authorization mechanism. It is up to your application to prevent unauthorized use of the exposed AG-UI endpoint.

### Thread ID Management
### Session ID Management

Thread IDs identify conversation sessions. Implement proper validation to prevent unauthorized access.
Session IDs identify conversation sessions. Implement proper validation to prevent unauthorized access.

**Security considerations:**
- Generate thread IDs server-side using cryptographically secure random values
- Never allow clients to directly access arbitrary thread IDs
- Verify thread ownership before processing requests
- Generate Session IDs server-side using cryptographically secure random values
- Never allow clients to directly access arbitrary Session IDs
- Verify session ownership before processing requests

### Sensitive Data Filtering

Expand Down
14 changes: 7 additions & 7 deletions agent-framework/integrations/ag-ui/state-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,17 @@ internal sealed class SharedStateAgent : DelegatingAIAgent

public override Task<AgentResponse> RunAsync(
IEnumerable<ChatMessage> messages,
AgentThread? thread = null,
AgentSession? session = null,
AgentRunOptions? options = null,
CancellationToken cancellationToken = default)
{
return this.RunStreamingAsync(messages, thread, options, cancellationToken)
return this.RunStreamingAsync(messages, session, options, cancellationToken)
.ToAgentResponseAsync(cancellationToken);
}

public override async IAsyncEnumerable<AgentResponseUpdate> RunStreamingAsync(
IEnumerable<ChatMessage> messages,
AgentThread? thread = null,
AgentSession? session = null,
AgentRunOptions? options = null,
[EnumeratorCancellation] CancellationToken cancellationToken = default)
{
Expand All @@ -136,7 +136,7 @@ internal sealed class SharedStateAgent : DelegatingAIAgent
state.ValueKind != JsonValueKind.Object)
{
// No state management requested, pass through to inner agent
await foreach (var update in this.InnerAgent.RunStreamingAsync(messages, thread, options, cancellationToken).ConfigureAwait(false))
await foreach (var update in this.InnerAgent.RunStreamingAsync(messages, session, options, cancellationToken).ConfigureAwait(false))
{
yield return update;
}
Expand All @@ -154,7 +154,7 @@ internal sealed class SharedStateAgent : DelegatingAIAgent
if (!hasProperties)
{
// Empty state - treat as no state
await foreach (var update in this.InnerAgent.RunStreamingAsync(messages, thread, options, cancellationToken).ConfigureAwait(false))
await foreach (var update in this.InnerAgent.RunStreamingAsync(messages, session, options, cancellationToken).ConfigureAwait(false))
{
yield return update;
}
Expand Down Expand Up @@ -188,7 +188,7 @@ internal sealed class SharedStateAgent : DelegatingAIAgent

// Collect all updates from first run
var allUpdates = new List<AgentResponseUpdate>();
await foreach (var update in this.InnerAgent.RunStreamingAsync(firstRunMessages, thread, firstRunOptions, cancellationToken).ConfigureAwait(false))
await foreach (var update in this.InnerAgent.RunStreamingAsync(firstRunMessages, session, firstRunOptions, cancellationToken).ConfigureAwait(false))
{
allUpdates.Add(update);

Expand Down Expand Up @@ -225,7 +225,7 @@ internal sealed class SharedStateAgent : DelegatingAIAgent
ChatRole.System,
[new TextContent("Please provide a concise summary of the state changes in at most two sentences.")]));

await foreach (var update in this.InnerAgent.RunStreamingAsync(secondRunMessages, thread, options, cancellationToken).ConfigureAwait(false))
await foreach (var update in this.InnerAgent.RunStreamingAsync(secondRunMessages, session, options, cancellationToken).ConfigureAwait(false))
{
yield return update;
}
Expand Down
91 changes: 91 additions & 0 deletions agent-framework/integrations/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
title: Agent Framework Integrations
description: Agent Framework Integrations
author: westey-m
ms.topic: conceptual
ms.author: westey
ms.date: 01/27/2026
ms.service: agent-framework
zone_pivot_groups: programming-languages
---

# Agent Framework Integrations

Microsoft Agent Framework has integrations with many different services, tools and protocols.

## UI Framework integrations

| UI Framework | Release Status |
| ------------------------------------------------------------------ | --------------- |
| [AG UI](./ag-ui/index.md) | Preview |
| [Agent Framework Dev UI](../user-guide/devui/index.md) | Preview |

## Chat History Providers

Microsoft Agent Framework supports many differenta agent types with different chat history storage capabilities.
In some cases agents store chat history in the AI service, while in others Agent Framework manages the storage.

To allow chat history storage to be customized when managed by Agent Framework, custom Chat History Providers
may be supplied. Here is a list of existing providers that can be used.

::: zone pivot="programming-language-csharp"

| Chat History Provider | Release Status |
| ------------------------------------------------------------------ | --------------- |
| [In-Memory Chat History Provider](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Abstractions/InMemoryChatHistoryProvider.cs) | Preview |
| [Cosmos DB Chat History Provider](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.CosmosNoSql/CosmosChatHistoryProvider.cs) | Preview |

::: zone-end

::: zone pivot="programming-language-python"

| Chat Message Store | Release Status |
| ------------------------------------------------------------------ | --------------- |
| [Redis Chat Message Store](https://github.com/microsoft/agent-framework/blob/main/python/packages/redis/agent_framework_redis/_chat_message_store.py) | Preview |

::: zone-end

## Memory AI Context Providers

AI Context Providers are plugins for `ChatClientAgent` instances and can be used to add memory to an agent. This is done by extracting memories from new messages provided by the user or generated by the agent, and by searching for existing memories and providing them to the AI service with the user input.

Here is a list of existing providers that can be used.

::: zone pivot="programming-language-csharp"

| Memory AI Context Provider | Release Status |
| ------------------------------------------------------------------ | --------------- |
| [Chat History Memory Provider](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI/Memory/ChatHistoryMemoryProvider.cs) | Preview |

::: zone-end

::: zone pivot="programming-language-python"

| Memory AI Context Provider | Release Status |
| ------------------------------------------------------------------ | --------------- |
| [Mem0 Memory Provider](https://github.com/microsoft/agent-framework/blob/main/python/packages/mem0/agent_framework_mem0/_provider.py) | Preview |
| [Redis Provider](https://github.com/microsoft/agent-framework/blob/main/python/packages/redis/agent_framework_redis/_provider.py) | Preview |

::: zone-end

## Retrieval Augmented Generation (RAG) AI Context Providers

AI Context Providers are plugins for `ChatClientAgent` instances and can be used to add RAG capabilities to an agent. This is done by searching for relevant data based on the user input, and passing this data to the AI Service with the other inputs.

Here is a list of existing providers that can be used.

::: zone pivot="programming-language-csharp"

| RAG AI Context Provider | Release Status |
| ------------------------------------------------------------------ | --------------- |
| [Text Search Provider](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI/TextSearchProvider.cs) | Preview |

::: zone-end

::: zone pivot="programming-language-python"

| RAG AI Context Provider | Release Status |
| ------------------------------------------------------------------ | --------------- |
| [Azure AI Search Provider](https://github.com/microsoft/agent-framework/blob/main/python/packages/azure-ai-search/agent_framework_azure_ai_search/_search_provider.py) | Preview |

::: zone-end
Loading