Share via


Microsoft.Agents.AI Namespace

Classes

Name Description
A2AJsonUtilities

Provides utility methods and configurations for JSON serialization operations for A2A agent types.

AdditionalPropertiesExtensions

Contains extension methods to allow storing and retrieving properties using the type name of the property as the key.

AgentAbstractionsJsonUtilities

Provides utility methods and configurations for JSON serialization operations within the Microsoft Agent Framework.

AgentResponse

Represents the response to an AIAgent run request, containing messages and metadata about the interaction.

AgentResponse<T>

Represents the response of the specified type T to an AIAgent run request.

AgentResponseExtensions

Provides extension methods for AgentResponse and AgentResponseUpdate instances to create or extract native OpenAI response objects from the Microsoft Agent Framework responses.

AgentResponseUpdate

Represents a single streaming response chunk from an AIAgent.

AgentRunContext

Provides context for an in-flight agent run.

AgentRunOptions

Provides optional parameters and configuration settings for controlling agent run behavior.

AgentSession

Base abstraction for all agent threads.

AgentSessionStateBag

Provides a thread-safe key-value store for managing session-scoped state with support for type-safe access and JSON serialization options.

AgentSessionStateBagJsonConverter

Custom JSON converter for AgentSessionStateBag that serializes and deserializes the internal dictionary contents rather than the container object's public properties.

AggregatorPromptAgentFactory

Provides a PromptAgentFactory which aggregates multiple agent factories.

AIAgent

Provides the base abstraction for all AI agents, defining the core interface for agent interactions and conversation management.

AIAgentBuilder

Provides a builder for creating pipelines of AIAgents.

AIAgentExtensions

Provides extensions for AIAgent.

AIAgentMetadata

Provides metadata information about an AIAgent instance.

AIAgentWithOpenAIExtensions

Provides extension methods for AIAgent to simplify interaction with OpenAI chat messages and return native OpenAI OpenAI.Chat.ChatCompletion responses.

AIContext

Represents additional context information that can be dynamically provided to AI models during agent invocations.

AIContextProvider

Provides an abstract base class for components that enhance AI context during agent invocations.

AIContextProvider.InvokedContext

Contains the context information provided to InvokedCoreAsync(AIContextProvider+InvokedContext, CancellationToken).

AIContextProvider.InvokingContext

Contains the context information provided to InvokingCoreAsync(AIContextProvider+InvokingContext, CancellationToken).

ChatClientAgent

Provides an AIAgent that delegates to an IChatClient implementation.

ChatClientAgentOptions

Represents metadata for a chat client agent, including its identifier, name, instructions, and description.

ChatClientAgentRunOptions

Provides specialized run options for ChatClientAgent instances, extending the base agent run options with chat-specific configuration.

ChatClientAgentSession

Provides a thread implementation for use with ChatClientAgent.

ChatClientPromptAgentFactory

Provides an PromptAgentFactory which creates instances of ChatClientAgent.

ChatHistoryMemoryProvider

A context provider that stores all chat history in a vector store and is able to retrieve related chat history later to augment the current conversation.

ChatHistoryMemoryProvider.State

Represents the state of a ChatHistoryMemoryProvider stored in the StateBag.

ChatHistoryMemoryProviderOptions

Options controlling the behavior of ChatHistoryMemoryProvider.

ChatHistoryMemoryProviderScope

Allows scoping of chat history for the ChatHistoryMemoryProvider.

ChatHistoryProvider

Provides an abstract base class for fetching chat messages from, and adding chat messages to, chat history for the purposes of agent execution.

ChatHistoryProvider.InvokedContext

Contains the context information provided to InvokedCoreAsync(ChatHistoryProvider+InvokedContext, CancellationToken).

ChatHistoryProvider.InvokingContext

Contains the context information provided to InvokingCoreAsync(ChatHistoryProvider+InvokingContext, CancellationToken).

ChatMessageExtensions

Contains extension methods for ChatMessage

CosmosChatHistoryProvider

Provides a Cosmos DB implementation of the ChatHistoryProvider abstract class.

CosmosChatHistoryProvider.State

Represents the per-session state of a CosmosChatHistoryProvider stored in the StateBag.

CosmosDBChatExtensions

Provides extension methods for integrating Cosmos DB chat message storage with the Agent Framework.

DelegatingAIAgent

Provides an abstract base class for AI agents that delegate operations to an inner agent instance while allowing for extensibility and customization.

FileAgentSkillsProvider

An AIContextProvider that discovers and exposes Agent Skills from filesystem directories.

FileAgentSkillsProviderOptions

Configuration options for FileAgentSkillsProvider.

FunctionInvocationDelegatingAgentBuilderExtensions

Provides extension methods for configuring and customizing AIAgentBuilder instances.

InMemoryChatHistoryProvider

Provides an in-memory implementation of ChatHistoryProvider with support for message reduction.

InMemoryChatHistoryProvider.State

Represents the state of a InMemoryChatHistoryProvider stored in the StateBag.

InMemoryChatHistoryProviderOptions

Represents configuration options for InMemoryChatHistoryProvider.

LoggingAgent

A delegating AI agent that logs agent operations to an ILogger.

LoggingAgentBuilderExtensions

Provides extension methods for adding logging support to AIAgentBuilder instances.

MessageAIContextProvider

Provides an abstract base class for components that enhance AI context during agent invocations by supplying additional chat messages.

MessageAIContextProvider.InvokingContext

Contains the context information provided to InvokingCoreAsync(MessageAIContextProvider+InvokingContext, CancellationToken).

OpenTelemetryAgent

Provides a delegating AIAgent implementation that implements the OpenTelemetry Semantic Conventions for Generative AI systems.

OpenTelemetryAgentBuilderExtensions

Provides extension methods for adding OpenTelemetry instrumentation to AIAgentBuilder instances.

PromptAgentFactory

Represents a factory for creating AIAgent instances.

ProviderSessionState<TState>

Provides strongly-typed state management for providers, enabling reading and writing of provider-specific state to and from an AgentSession's AgentSessionStateBag.

TextSearchProvider

A text search context provider that performs a search over external knowledge and injects the formatted results into the AI invocation context, or exposes a search tool for on-demand use. This provider can be used to enable Retrieval Augmented Generation (RAG) on an agent.

TextSearchProvider.TextSearchProviderState

Represents the per-session state of a TextSearchProvider stored in the StateBag.

TextSearchProvider.TextSearchResult

Represents a single retrieved text search result.

TextSearchProviderOptions

Options controlling the behavior of TextSearchProvider.

YamlAgentFactoryExtensions

Extension methods for PromptAgentFactory to support YAML based agent definitions.

Structs

Name Description
AgentRequestMessageSourceAttribution

Represents attribution information for the source of an agent request message for a specific run, including the component type and identifier.

AgentRequestMessageSourceType

Represents the source of an agent request message.

Enums

Name Description
ChatHistoryMemoryProviderOptions.SearchBehavior

Behavior choices for the provider.

InMemoryChatHistoryProviderOptions.ChatReducerTriggerEvent

Defines the events that can trigger a reducer in the InMemoryChatHistoryProvider.

TextSearchProviderOptions.TextSearchBehavior

Behavior choices for the provider.