Microsoft.Agents.AI Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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. |
| AgentClassSkill<TSelf> |
Abstract base class for defining skills as C# classes that bundle all components together. |
| AgentEvaluationExtensions |
Extension methods for evaluating agents, responses, and workflow runs. |
| AgentEvaluationResults |
Aggregate evaluation results across multiple items. |
| AgentFileSkill |
An AgentSkill discovered from a filesystem directory backed by a SKILL.md file. |
| AgentFileSkillFilterContext |
Provides contextual information about a discovered file to the ScriptFilter and ResourceFilter predicates. |
| AgentFileSkillScript |
A file-path-backed skill script. Represents a script file on disk that requires an external runner to run. |
| AgentFileSkillsSource |
A skill source that discovers skills from filesystem directories containing SKILL.md files. |
| AgentFileSkillsSourceOptions |
Configuration options for file-based skill sources. |
| AgentFileStore |
Provides an abstract base class for file storage operations. |
| AgentInlineSkill |
A skill defined entirely in code with resources (static values or delegates) and scripts (delegates). |
| AgentInMemorySkillsSource |
A skill source that holds AgentSkill instances in memory. |
| AgentModeProvider |
An AIContextProvider that tracks the agent's operating mode (e.g., "plan" or "execute") in the session state and provides tools for querying and switching modes. |
| AgentModeProviderOptions |
Options controlling the behavior of AgentModeProvider. |
| AgentModeProviderOptions.AgentMode |
Represents an agent operating mode with a name and description. |
| 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 |
| 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. |
| AgentSessionExtensions |
Provides extension methods for AgentSession. |
| 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. |
| AgentSkill |
Abstract base class for all agent skills. |
| AgentSkillFrontmatter |
Represents the YAML frontmatter metadata parsed from a SKILL.md file. |
| AgentSkillResource |
Abstract base class for skill resources. A resource provides supplementary content (references, assets) to a skill. |
| AgentSkillResourceAttribute |
Marks a property or method as a skill resource that is automatically discovered by AgentClassSkill<TSelf>. |
| AgentSkillScript |
Abstract base class for skill scripts. A script represents an executable action associated with a skill. |
| AgentSkillScriptAttribute |
Marks a method as a skill script that is automatically discovered by AgentClassSkill<TSelf>. |
| AgentSkillsProvider |
An AIContextProvider that exposes agent skills from one or more AgentSkillsSource instances. |
| AgentSkillsProviderBuilder |
Fluent builder for constructing an AgentSkillsProvider backed by a composite source. Intended for advanced scenarios where the simple AgentSkillsProvider constructors are insufficient. |
| AgentSkillsProviderOptions |
Configuration options for AgentSkillsProvider. |
| AgentSkillsSource |
Abstract base class for skill sources. A skill source provides skills from a specific origin (filesystem, remote server, database, in-memory, etc.). |
| AgentSkillsSourceContext |
Provides contextual information about the agent and session to an AgentSkillsSource when retrieving skills. |
| AggregatingAgentSkillsSource |
A skill source that aggregates multiple child sources, preserving their registration order. |
| 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). |
| AIJudgeLoopEvaluator |
A LoopEvaluator that uses a separate judge chat client to decide whether the user's original request has been fully addressed, continuing the loop (with the judge's gap analysis as feedback) while the answer is "no". |
| AIJudgeLoopEvaluatorOptions |
Provides configuration options for AIJudgeLoopEvaluator. |
| AlwaysApproveToolApprovalResponseContent |
Wraps a ToolApprovalResponseContent with additional "always approve" settings, enabling the ToolApprovalAgent middleware to record standing approval rules so that future matching tool calls are auto-approved without user interaction. |
| BackgroundAgentsProvider |
An AIContextProvider that enables an agent to delegate work to background agents asynchronously. |
| BackgroundAgentsProviderOptions |
Options controlling the behavior of BackgroundAgentsProvider. |
| BackgroundTaskCompletionLoopEvaluator |
A LoopEvaluator that keeps re-invoking the wrapped agent until a BackgroundAgentsProvider reports that no background tasks are still running. |
| BackgroundTaskCompletionLoopEvaluatorOptions |
Provides configuration options for BackgroundTaskCompletionLoopEvaluator. |
| BackgroundTaskInfo |
Represents the metadata and result of a background task managed by the BackgroundAgentsProvider. |
| CachingAgentSkillsSource |
A skill source decorator that caches the result of the inner source's GetSkillsAsync(AgentSkillsSourceContext, CancellationToken) call, returning the cached list on subsequent invocations. |
| CachingAgentSkillsSourceOptions |
Options for configuring CachingAgentSkillsSource. |
| 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 |
| CompletionMarkerLoopEvaluator |
A LoopEvaluator that stops the loop once a configured marker string appears in the agent's latest response, and otherwise continues with feedback asking the agent to keep working and to emit the marker when done. |
| CompletionMarkerLoopEvaluatorOptions |
Provides configuration options for CompletionMarkerLoopEvaluator. |
| ConversationSplitters |
Built-in conversation splitters for common evaluation patterns. |
| 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. |
| DeduplicatingAgentSkillsSource |
A skill source decorator that removes duplicate skills by name, keeping only the first occurrence. |
| DelegateLoopEvaluator |
A LoopEvaluator that delegates the re-invocation decision and feedback to a user-supplied callback. |
| DelegatingAgentSkillsSource |
Provides an abstract base class for skill sources that delegate operations to an inner source while allowing for extensibility and customization. |
| DelegatingAIAgent |
Provides an abstract base class for AI agents that delegate operations to an inner agent instance while allowing for extensibility and customization. |
| EvalCheckResult |
Result of a single check on a single evaluation item. |
| EvalChecks |
Built-in check functions for common evaluation patterns. |
| EvalItem |
Provider-agnostic data for a single evaluation item. |
| EvalItemResult |
Per-item result from a Foundry evaluation run, with individual evaluator scores and error details. |
| EvalScoreResult |
A single evaluator's score on one evaluation item. |
| ExpectedToolCall |
A tool call that an agent is expected to make. |
| FileAccessProvider |
An AIContextProvider that provides file access tools to an agent for writing, reading, deleting, listing, searching, and editing files. |
| FileAccessProviderOptions |
Options controlling the behavior of FileAccessProvider. |
| FileLineEdit |
Represents a single whole-line replacement used by the file access and file memory
|
| FileListEntry |
Represents a file entry returned by the FileMemoryProvider list (ls) tool, containing the file name, its entry type, and an optional description. |
| FileMemoryProvider |
An AIContextProvider that provides file-based memory tools to an agent for storing, retrieving, modifying, listing, deleting, and searching files. |
| FileMemoryProviderOptions |
Options controlling the behavior of FileMemoryProvider. |
| FileMemoryState |
Represents the state of the FileMemoryProvider, stored in the session's AgentSessionStateBag. |
| FileSearchMatch |
Represents a match found within a file during a search operation. |
| FileSearchResult |
Represents a result from searching files, containing the file name, a content snippet, and matching lines. |
| FileStoreEntry |
Represents a single direct child of a directory in an AgentFileStore, returned by ListChildrenAsync(String, CancellationToken). |
| FileSystemAgentFileStore |
A file-system-backed implementation of AgentFileStore that stores files on disk under a configurable root directory. |
| FilteringAgentSkillsSource |
A skill source decorator that filters skills using a caller-supplied predicate. |
| FunctionEvaluator |
Factory for creating EvalCheck delegates from typed lambda functions. |
| FunctionInvocationDelegatingAgentBuilderExtensions |
Provides extension methods for configuring and customizing AIAgentBuilder instances. |
| GeneratedEvaluatorRef |
A reference to a generated rubric evaluator that already exists in the provider's registry. |
| InMemoryAgentFileStore |
An in-memory implementation of AgentFileStore that stores files in a dictionary. |
| 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. |
| LocalEvaluator |
Evaluator that runs check functions locally without API calls. |
| LoggingAgent |
A delegating AI agent that logs agent operations to an ILogger. |
| LoggingAgentBuilderExtensions |
Provides extension methods for adding logging support to AIAgentBuilder instances. |
| LoopAgent |
A DelegatingAIAgent that re-invokes the wrapped agent in a loop until the configured LoopEvaluator set decides to stop. |
| LoopAgentOptions |
Provides configuration options for LoopAgent. |
| LoopContext |
Provides the per-run state that a LoopEvaluator uses to decide whether a LoopAgent should re-invoke the wrapped agent and what feedback to provide. |
| LoopEvaluation |
Represents the result produced by a LoopEvaluator after an agent iteration: whether the LoopAgent should re-invoke the wrapped agent and, optionally, the feedback or explicit messages that should inform the next iteration. |
| LoopEvaluator |
Provides the abstract base class for the component that decides, after each agent iteration, whether a LoopAgent should re-invoke the wrapped agent and what feedback to provide. |
| 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). |
| MessageInjectingChatClient |
A delegating chat client that supports injecting messages into the function execution loop. |
| 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. |
| PerEvaluatorResult |
Per-evaluator pass/fail breakdown from an evaluation run. |
| 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. |
| RubricScore |
A single dimension's score from a rubric-based evaluator run. |
| 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. |
| TodoCompletionLoopEvaluator |
A LoopEvaluator that keeps re-invoking the wrapped agent until a TodoProvider has no remaining (incomplete) todo items, optionally only while the agent is operating in one of a configured set of modes tracked by an AgentModeProvider. |
| TodoCompletionLoopEvaluatorOptions |
Provides configuration options for TodoCompletionLoopEvaluator. |
| TodoItem |
Represents a single todo item managed by the TodoProvider. |
| TodoProvider |
An AIContextProvider that provides todo management tools and instructions to an agent for tracking work items during long-running complex tasks. |
| TodoProviderOptions |
Options controlling the behavior of TodoProvider. |
| ToolApprovalAgent |
A DelegatingAIAgent middleware that implements "don't ask again" tool approval behavior and queues multiple approval requests to present them to the caller one at a time. |
| ToolApprovalAgentBuilderExtensions |
Provides extension methods for adding tool approval middleware to AIAgentBuilder instances. |
| ToolApprovalAgentOptions |
Options for configuring the ToolApprovalAgent middleware. |
| ToolApprovalRequestContentExtensions |
Provides extension methods on ToolApprovalRequestContent for creating AlwaysApproveToolApprovalResponseContent instances that instruct the ToolApprovalAgent middleware to record standing approval rules. |
| 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. |
Interfaces
| Name | Description |
|---|---|
| IAgentEvaluator |
Batch-oriented evaluator interface for agent evaluation. |
| IConversationSplitter |
Strategy for splitting a conversation into query and response halves for evaluation. |
Enums
| Name | Description |
|---|---|
| BackgroundTaskStatus |
Represents the status of a background task managed by the BackgroundAgentsProvider. |
| 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. |
| ToolCalledMode |
Specifies how ToolCalledCheck(ToolCalledMode, String[]) matches tool names. |
Delegates
| Name | Description |
|---|---|
| AgentFileSkillScriptRunner |
Delegate for running file-based skill scripts. |
| EvalCheck |
Delegate for a synchronous evaluation check on a single item. |