# microsoft/agent-framework architecture

> Architecture diagram of the GitHub repository microsoft/agent-framework, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/microsoft/agent-framework
- Repository: https://github.com/microsoft/agent-framework

## Overview

Microsoft Agent Framework is a .NET and Python framework for building and operating AI agents and multi-agent workflows. The principal journey is to configure an agent with a model provider, run it on user input, and use its response or coordinate it within a workflow. Separate capabilities cover workflow durability and streaming, declarative agents, hosting, observability, developer UI, and provider integrations. The README documents these product relationships; sampled source confirms selected agent, workflow, provider, telemetry, and storage implementations, but does not establish all runtime wiring.

Main entry points: [`dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgent.cs`](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgent.cs) (Agent API), [`dotnet/src/Microsoft.Agents.AI.Workflows/GroupChatManager.cs`](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Workflows/GroupChatManager.cs) (Workflow Engine), [`dotnet/src/Microsoft.Agents.AI.DevUI/DevUIMiddleware.cs`](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.DevUI/DevUIMiddleware.cs) (Developer UI), [`python/packages/openai/agent_framework_openai/_chat_client.py`](https://github.com/microsoft/agent-framework/blob/main/python/packages/openai/agent_framework_openai/_chat_client.py) (OpenAI Provider)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Agent Runtime"]
  node_agent_api["Agent API<br/>[AIAgent.cs]"]
  node_agent_response["Agent Responses"]
  node_python_core["Python Core<br/>[_clients.py]"]
  node_python_types["Core Types<br/>[_types.py]"]
end

subgraph group_providers["Model Providers"]
  node_openai["OpenAI Provider<br/>[_chat_client.py]"]
  node_foundry["Foundry Provider<br/>[FoundryAgent.cs]"]
  node_anthropic["Anthropic Provider"]
  node_copilot["Copilot Provider"]
end

subgraph group_workflows["Workflow Orchestration"]
  node_workflow["Workflow Engine"]
  node_workflow_expressions["Workflow Expressions"]
  node_checkpoint[("Checkpointing")]
end

subgraph group_operations["Hosting and Operations"]
  node_conversation_storage[("Conversation Storage")]
  node_foundry_hosting["Foundry Hosting"]
  node_a2a_hosting["A2A Hosting<br/>[A2AAgentHandler.cs]"]
  node_devui["Developer UI<br/>[DevUIMiddleware.cs]"]
  node_telemetry["Observability<br/>[observability.py]"]
end

subgraph group_extensions["Agent Extensions"]
  node_middleware["Middleware"]
  node_declarative["Declarative Agents"]
  node_skills["Agent Skills<br/>[__init__.py]"]
end

node_user(("User"))
node_provider_services{{"Model Services"}}

node_user -->|"provides input"| node_agent_api
node_agent_api -->|"returns response"| node_agent_response
node_agent_api -.->|"coordinates agents"| node_workflow
node_workflow -.->|"evaluates declarations"| node_workflow_expressions
node_workflow -->|"persists checkpoints"| node_checkpoint
node_agent_api -.->|"shared framework role"| node_python_core
node_openai -.->|"sends model requests"| node_provider_services
node_foundry -.->|"sends model requests"| node_provider_services
node_anthropic -.->|"connects provider"| node_provider_services
node_copilot -.->|"connects provider"| node_provider_services
node_agent_api -->|"supports middleware"| node_middleware
node_declarative -->|"defines agents"| node_agent_api
node_agent_api -.->|"stores conversations"| node_conversation_storage
node_foundry_hosting -->|"hosts agents"| node_agent_api
node_a2a_hosting -.->|"exposes agents"| node_agent_api
node_devui -->|"supports debugging"| node_agent_api
node_agent_api -->|"enables observability"| node_telemetry
node_agent_api -->|"uses skills"| node_skills
node_user -->|"develops workflows"| node_devui

click node_agent_api "https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgent.cs"
click node_agent_response "https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponseUpdate.cs"
click node_python_core "https://github.com/microsoft/agent-framework/blob/main/python/packages/core/agent_framework/_clients.py"
click node_python_types "https://github.com/microsoft/agent-framework/blob/main/python/packages/core/agent_framework/_types.py"
click node_middleware "https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.AgentHooks/Core/AgentHooksChatClient.cs"
click node_openai "https://github.com/microsoft/agent-framework/blob/main/python/packages/openai/agent_framework_openai/_chat_client.py"
click node_foundry "https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Foundry/FoundryAgent.cs"
click node_anthropic "https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Anthropic/AnthropicClientExtensions.cs"
click node_copilot "https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs"
click node_declarative "https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Declarative/PromptAgentFactory.cs"
click node_workflow "https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Workflows/GroupChatManager.cs"
click node_workflow_expressions "https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/PowerFx/WorkflowExpressionEngine.cs"
click node_checkpoint "https://github.com/microsoft/agent-framework/blob/main/python/packages/azure-cosmos/agent_framework_azure_cosmos/_checkpoint_storage.py"
click node_conversation_storage "https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI/Conversations/InMemoryConversationStorage.cs"
click node_foundry_hosting "https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Foundry.Hosting/FoundryHostingAgent.cs"
click node_a2a_hosting "https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Hosting.A2A/A2AAgentHandler.cs"
click node_devui "https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.DevUI/DevUIMiddleware.cs"
click node_telemetry "https://github.com/microsoft/agent-framework/blob/main/python/packages/core/agent_framework/observability.py"
click node_skills "https://github.com/microsoft/agent-framework/blob/main/python/packages/core/agent_framework/__init__.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_agent_api,node_agent_response,node_python_core,node_python_types,node_user toneBlue
class node_openai,node_foundry,node_anthropic,node_copilot toneAmber
class node_workflow,node_workflow_expressions,node_checkpoint toneMint
class node_conversation_storage,node_foundry_hosting,node_a2a_hosting,node_devui,node_telemetry toneRose
class node_middleware,node_declarative,node_skills,node_provider_services toneIndigo
```

## Components

### Agent Runtime

- [Agent API](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgent.cs): `dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgent.cs`
- [Agent Responses](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponseUpdate.cs): `dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponseUpdate.cs`
- [Python Core](https://github.com/microsoft/agent-framework/blob/main/python/packages/core/agent_framework/_clients.py): `python/packages/core/agent_framework/_clients.py`
- [Core Types](https://github.com/microsoft/agent-framework/blob/main/python/packages/core/agent_framework/_types.py): `python/packages/core/agent_framework/_types.py`

### Model Providers

- [OpenAI Provider](https://github.com/microsoft/agent-framework/blob/main/python/packages/openai/agent_framework_openai/_chat_client.py): `python/packages/openai/agent_framework_openai/_chat_client.py`
- [Foundry Provider](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Foundry/FoundryAgent.cs): `dotnet/src/Microsoft.Agents.AI.Foundry/FoundryAgent.cs`
- [Anthropic Provider](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Anthropic/AnthropicClientExtensions.cs): `dotnet/src/Microsoft.Agents.AI.Anthropic/AnthropicClientExtensions.cs`
- [Copilot Provider](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs): `dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs`

### Workflow Orchestration

- [Workflow Engine](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Workflows/GroupChatManager.cs): `dotnet/src/Microsoft.Agents.AI.Workflows/GroupChatManager.cs`
- [Workflow Expressions](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/PowerFx/WorkflowExpressionEngine.cs): `dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/PowerFx/WorkflowExpressionEngine.cs`
- [Checkpointing](https://github.com/microsoft/agent-framework/blob/main/python/packages/azure-cosmos/agent_framework_azure_cosmos/_checkpoint_storage.py): `python/packages/azure-cosmos/agent_framework_azure_cosmos/_checkpoint_storage.py`

### Hosting and Operations

- [Conversation Storage](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI/Conversations/InMemoryConversationStorage.cs): `dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI/Conversations/InMemoryConversationStorage.cs`
- [Foundry Hosting](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Foundry.Hosting/FoundryHostingAgent.cs): `dotnet/src/Microsoft.Agents.AI.Foundry.Hosting/FoundryHostingAgent.cs`
- [A2A Hosting](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Hosting.A2A/A2AAgentHandler.cs): `dotnet/src/Microsoft.Agents.AI.Hosting.A2A/A2AAgentHandler.cs`
- [Developer UI](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.DevUI/DevUIMiddleware.cs): `dotnet/src/Microsoft.Agents.AI.DevUI/DevUIMiddleware.cs`
- [Observability](https://github.com/microsoft/agent-framework/blob/main/python/packages/core/agent_framework/observability.py): `python/packages/core/agent_framework/observability.py`

### Agent Extensions

- [Middleware](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.AgentHooks/Core/AgentHooksChatClient.cs): `dotnet/src/Microsoft.Agents.AI.AgentHooks/Core/AgentHooksChatClient.cs`
- [Declarative Agents](https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Declarative/PromptAgentFactory.cs): `dotnet/src/Microsoft.Agents.AI.Declarative/PromptAgentFactory.cs`
- [Agent Skills](https://github.com/microsoft/agent-framework/blob/main/python/packages/core/agent_framework/__init__.py): `python/packages/core/agent_framework/__init__.py`

### Other components

- **User**
- **Model Services**

## Connections

- User → Agent API: provides input (evidence: `README.md`)
- Agent API → Agent Responses: returns response (evidence: `dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgent.cs`)
- Agent API → Workflow Engine: coordinates agents (evidence: `dotnet/src/Microsoft.Agents.AI.Workflows/GroupChatManager.cs`)
- Workflow Engine → Workflow Expressions: evaluates declarations
- Workflow Engine → Checkpointing: persists checkpoints (evidence: `README.md`)
- Agent API → Python Core: shared framework role
- OpenAI Provider → Model Services: sends model requests
- Foundry Provider → Model Services: sends model requests
- Anthropic Provider → Model Services: connects provider
- Copilot Provider → Model Services: connects provider
- Agent API → Middleware: supports middleware (evidence: `README.md`)
- Declarative Agents → Agent API: defines agents (evidence: `README.md`)
- Agent API → Conversation Storage: stores conversations
- Foundry Hosting → Agent API: hosts agents (evidence: `README.md`)
- A2A Hosting → Agent API: exposes agents
- Developer UI → Agent API: supports debugging (evidence: `README.md`)
- Agent API → Observability: enables observability (evidence: `README.md`)
- Agent API → Agent Skills: uses skills (evidence: `README.md`)
- User → Developer UI: develops workflows (evidence: `README.md`)
