Edit

Agent concepts

An Agent Framework agent combines an agent abstraction, a model or remote-agent connection, instructions, tools, middleware, context providers, and session state behind a consistent run interface.

Runtime and execution

  • Running agents explains regular and streaming runs, run options, responses, messages, and content.
  • Agent pipeline explains how middleware, context providers, model invocation, and tools participate in a run.

Agent types

  • Custom agents explains the common agent interface and when to implement an agent directly.
  • Model providers connect application-owned agents to inference services.
  • Agent services connect to managed or protocol-backed remote agents.

Chat-client agents

Chat-client agents are application-owned agents backed by a model inference client. They support function tools, multi-turn conversations, provider-hosted tools where available, structured outputs, streaming, middleware, and local or service-managed conversation history.

Any inference client that implements Microsoft.Extensions.AI.IChatClient can back a ChatClientAgent:

using Microsoft.Agents.AI;

AIAgent agent = new ChatClientAgent(
    chatClient,
    instructions: "You are a helpful assistant.");

All agent implementations share the AIAgent abstraction, so application code and orchestrations can work with chat-client agents, custom agents, and remote-agent proxies through one interface.

For provider capabilities, conversation-history support, and SDK endpoint selection, see Model providers.

Create a standard Agent from any client that implements SupportsChatGetResponse:

from agent_framework import Agent

agent = Agent(
    client=client,
    instructions="You are a helpful assistant.",
)

The same Agent interface works across supported model providers. Direct agent types such as FoundryAgent, A2AAgent, GitHubCopilotAgent, and ClaudeAgent connect to managed or remote agent runtimes instead.

For available inference clients, see Model providers.

Go model-provider packages construct the standard *agent.Agent type through provider-specific constructors. This gives application code a consistent run, session, tool, middleware, and streaming interface while each provider owns client initialization.

For constructors and import paths, see Model providers.

Conversations and memory

Conversation concepts cover sessions, context providers, storage, compaction, and the built-in chat-history memory provider.

Middleware

Middleware concepts cover definition, scope, ordering, shared state, run-time context, termination, errors, and result overrides.

Safety

Agent safety describes design patterns for constraining agent behavior and reducing operational risk. Security enforcement with FIDES remains an Agent Capability.

Next steps