示例默认使用 Azure 凭据,需先执行 az login 完成认证;实验性模块需单独安装 agent-framework-lab;.NET 接入 Foundry 还需额外安装 Microsoft.Agents.AI.Foundry、Azure.AI.Projects 和 Azure.Identity
agent-framework
microsoftMIT活跃维护微软推出的多智能体开发框架,支持 Python 和 .NET,用于构建、编排和部署 AI 智能体及多智能体工作流。
A framework for building, orchestrating and deploying AI agents and multi-agent workflows with support for Python and .NET.
微软开源的多语言框架,用于构建、编排和部署生产级 AI 智能体与多智能体工作流
微软推出的多智能体开发框架,支持 Python 和 .NET,用于构建、编排和部署 AI 智能体及多智能体工作流。
核心能力
- Python 与 .NET 双语言支持,API 保持一致
- 用图结构工作流编排顺序、并发、交接和群组协作
- 内置中间件处理请求响应、异常与自定义管道
- 集成 OpenTelemetry 做分布式追踪与可观测性
- 支持 YAML 声明式定义智能体,便于版本管理
容易踩的坑
- python-1.25.0最新正式版2026-11-07 · 2026-11-07 15:52 UTC
Added
- agent-framework-core, agent-framework-foundry-hosting: Support callable MCP discovery approval policies and honor Foundry Toolbox approval metadata, including tool-name and read-only filters, explicit caller overrides, and policy refresh for retained tools (#10136)
Changed
-
agent-framework, agent-framework-a2a, agent-framework-ag-ui, agent-framework-anthropic, agent-framework-azure-ai-search, agent-framework-azure-contentunderstanding, agent-framework-azure-cosmos, agent-framework-azure-cosmos-memory, agent-framework-azure-documentdb, agent-framework-bedrock, agent-framework-chatkit, agent-framework-claude, agent-framework-copilotstudio, agent-framework-core, agent-framework-declarative, agent-framework-devui, agent-framework-duckdb, agent-framework-foundry, agent-framework-foundry-hosting, agent-framework-foundry-local, agent-framework-gemini, agent-framework-github-copilot, agent-framework-hosting, agent-framework-hosting-a2a, agent-framework-hosting-mcp, agent-framework-hosting-responses, agent-framework-hosting-telegram, agent-framework-hyperlight, agent-framework-mem0, agent-framework-mistral, agent-framework-mongodb, agent-framework-monty, agent-framework-nvidia, agent-framework-ollama, agent-framework-openai, agent-framework-oracle, agent-framework-orchestrations, agent-framework-postgres, agent-framework-purview, agent-framework-qdrant, agent-framework-redis, agent-framework-sql-server, agent-framework-tools, agent-framework-typesafe: [BREAKING] Remove Python 3.10 installation eligibility and obsolete compatibility branches; require Python 3.11 or later (#9948)
Migration: Upgrade Python 3.10 environments to Python 3.11 or later before installing this release. Existing integration-specific Python upper bounds still apply; Foundry Local supports Python 3.11-3.14.
-
agent-framework-core, agent-framework-declarative: [BREAKING] Bound MCP tool and prompt discovery to 100 pages and 1,000 items per catalog, default framework-owned request timeouts to 30 seconds, and preserve the complete catalog snapshot when refresh fails (#10042)
Migration: Increase
max_discovery_pagesormax_discovery_itemsfor larger catalogs, or set either toNoneonly for a trusted MCP server. Passrequest_timeout=Noneto an MCP tool to restore unlimited request timing. Caller-owned clients retain their own transport and timeout policy.DefaultMCPToolHandlerexposes the discovery limits and requires Core 1.25. -
agent-framework-ag-ui, agent-framework-core, agent-framework-hosting: [BREAKING] Bind live workflow agent executors and their sessions to one authorization scope, reject cross-scope execution before model calls, and reject
WorkflowAgent.as_tool()in AG-UI endpoints (#10035)Migration: Use
AgentFrameworkWorkflow(workflow_factory=...)with a factory that creates new workflows,AgentExecutorinstances, andAgentSessioninstances for each call. A shared builder still reuses its executors, even withcache_target=False. Usesingle_user=Trueonly when all callers are the same principal. Cross-scope reuse now reportsWORKFLOW_SCOPE_CONFLICT; workflow-agent tools reportWORKFLOW_AGENT_TOOL_UNSUPPORTED. Serve those workflows directly through a factory instead. This guard covers live executor/session identity, not state loaded from shared storage or custom tool functions that invoke workflows. AG-UI requires Core 1.25 for the wrapped-agent ownership check. -
agent-framework-core: [BREAKING] Align graph and functional workflow invocation spans with OpenTelem
- dotnet-1.28.02026-11-06 · 2026-11-06 22:00 UTC
查看更新说明
[1.28.0] - 2026-11-06
Added
- Foundry: Add the GA computer tool through
FoundryAITool.CreateComputerTool()and carry computer calls and results through Foundry hosting, including batched actions. Add an Azure OpenAI computer-use sample; the Foundry project endpoint still requires the existing preview tool. For non-hosted GA loops, use stored-response continuation: replaying locally retained computer calls with stored output disabled remains affected by an OpenAI SDK serialization limitation (#8756 by @rogerbarreto). - Foundry hosting: Add
FoundryToolboxOptions.TokenScopefor cloud-specific toolbox authentication audiences, retaininghttps://ai.azure.com/.defaultas the default (#10100 by @rogerbarreto).
Changed
-
A2A hosting: [BREAKING] Limit built-in server registration to message-based responses while reliable task resumption across hosts is deferred (#10037 by @SergeyMenshykh).
Migration: Remove assignments to the deleted
A2AServerRegistrationOptions.AgentRunModeproperty. The built-in handler now completes the run and returns a message rather than a task; update clients that expect task responses. Task resumption and cancellation are unsupported by this message-only handler. Applications requiring task-based hosting must provide their own handler and task-lifecycle implementation. -
A2A: [BREAKING] Replace individual identity-parameter overloads with optional
A2AAgentOptionswhen constructing agents or adapting clients (#10113 by @SergeyMenshykh).Migration: Replace
new A2AAgent(client, id: ..., name: ..., description: ...)withnew A2AAgent(client, new A2AAgentOptions { Id = ..., Name = ..., Description = ... }). Apply the same options object toclient.AsAIAgent(...). Calls that do not customize identity can continue to omit options; supplied options are cloned. -
A2A: Update
A2A,A2A.AspNetCore, andA2A.Grpcto1.0.0-preview4and adapt hosting to the updated request-context API (#9995 by @SergeyMenshykh). -
CodeAct: [BREAKING] Redact host-tool exception details by default in Hyperlight and LocalCodeAct while preserving successful results and failure signaling (#9973 by @eavanvalkenburg).
Migration: Applications relying on detailed host diagnostics must explicitly set
HyperlightCodeActProviderOptions.IncludeDetailedErrors = trueorLocalCodeActProviderOptions.IncludeDetailedErrors = truefor a trusted channel. This applies to provider and standalone-function usage. The default isfalse; outer chat-client error settings and sensitive-data logging do not enable these diagnostics. Configure the policy before constructing the provider or function, because it is captured in execution snapshots. -
GitHub Copilot: [BREAKING] Disable file hooks by default for both new and resumed agent sessions (#10121 by @westey-m).
Migration: Set
EnableFileHooks = trueexplicitly in theSessionConfigsupplied toGitHubCopilotAgentif the application requires file hooks. An omitted configuration or unset value now resolves tofalse; explicit values remain respected. -
Declarative workflows: [BREAKING] Require an explicit HTTP host-and-port allowlist and an application-owned handler factory for workflow HTTP requests (#9841 by @baywet).
Migration: Replace parameterless, direct-
HttpClient, and callback construction withnew DefaultHttpRequestHandler(["api.example.com"], handlerFactory, "WorkflowHttp"), wherehandlerFactoryis anIHttpMessageHandlerFactory. Regist
- Foundry: Add the GA computer tool through
- python-1.24.02026-10-30 · 2026-10-30 21:52 UTC
查看更新说明
[1.24.0] - 2026-10-30
[!WARNING] Redis context index migration: The beta
RedisContextProvidernow preserves exact scope identity and rejects the legacy raw-scope index schema. Delete the old context index and its context hashes, let the provider create a new index, and re-ingest the context data.overwrite_index=Truedoes not migrate incompatible indexes.[!IMPORTANT] Python support: Python 3.11 or later is now the supported baseline, subject to package-specific upper limits. Python 3.10 installation remains permitted by
Requires-Pythonin this release, but compatibility is not guaranteed. The next release will also remove Python 3.10 installation eligibility fromRequires-Python. Upgrade to Python 3.11 or later as soon as possible.Added
- agent-framework-core: Add an explicit default approval mode for local MCP tools and prompts outside the per-tool approval lists, and warn when
never_require_approvalleaves the default implicit while preserving the existing fallback (#9828) - agent-framework-core: Add the shared
microsoft.agent-frameworktelemetry resource attribute across logs, traces, and metrics while preserving explicit resource overrides (#9589) - agent-framework-core: Add experimental agent-triggered in-run compaction and skill unloading with
AgentTriggeredCompactionStrategyandUnloadSkillsCompactionStrategy(#9384) - agent-framework-core: Support async conditions in switch-case workflow edge groups (#9669)
- agent-framework-core: Load Agent Hooks middleware from a host declaration and support tool-name prefixes on
FileAccessProvider(#9405, #9654) - agent-framework-core, agent-framework-anthropic, agent-framework-bedrock, agent-framework-foundry, agent-framework-foundry-local, agent-framework-gemini, agent-framework-mistral, agent-framework-ollama, agent-framework-openai: Add optional async chat-client contexts and ownership-aware connection cleanup without closing caller-supplied resources (#9748)
- agent-framework-foundry: Add a timeout parameter to
FoundryChatClient(#9699) - agent-framework-nvidia, agent-framework-openai: Add an alpha NVIDIA NIM embedding client and the OpenAI-compatible embedding request-options extension point it requires (#8920)
Changed
- agent-framework-oracle: Require python-oracledb 3.0 or later so the supported dependency floor passes strict pool API type checking.
- tests: Declare package-local test dependencies for isolated dependency-bound checks, match NVIDIA test transports to the OpenAI SDK's HTTPX version, preserve meaningful assertions across supported Pydantic and Foundry SDK versions, and exclude virtual environments from feature-registry source discovery.
- agent-framework-claude: Require Claude Agent SDK 0.2.140 or later for custom-tool servers compatible with MCP 2.
- agent-framework-azure-documentdb, agent-framework-mongodb: Require PyMongo 4.15 or later for complete asynchronous bulk-write type annotations at the supported dependency floor.
- agent-framework-redis: [BREAKING] Preserve case-sensitive, punctuation-safe context scope identity with dedicated scope tokens, enforce configured scope on writes and searches, and reject incompatible legacy indexes (#9461)
- agent-framework, agent-framework-a2a, agent-framework-ag-ui, agent-framework-anthropic
- agent-framework-core: Add an explicit default approval mode for local MCP tools and prompts outside the per-tool approval lists, and warn when
- dotnet-1.27.02026-10-30 · 2026-10-30 18:55 UTC
查看更新说明
[1.27.0] - 2026-10-30
Added
- skills: Add a .NET consumer skill for building with Agent Framework (#9651 by @westey-m).
- .NET, CI: Add a script to bump the .NET release version (#9894 by @baywet).
Changed
-
.NET, AgentServer: [BREAKING] Update AgentServer dependencies (#9721 by @rogerbarreto).
Migration: In Foundry hosted applications, replace
builder.Services.AddFoundryResponses(...)withbuilder.AddFoundryResponses(...)so response and task storage use the same configuration-bound identity and endpoint. TheIServiceCollectionoverload remains supported for local or non-hosted use.If you pin SDK dependencies directly, align
Azure.AI.ProjectsandAzure.AI.Extensions.OpenAIto3.0.0-beta.5, andAzure.AI.AgentServer.Core,Azure.AI.AgentServer.Invocations, andAzure.AI.AgentServer.Responsesto1.0.0-beta.30,1.0.0-beta.7, and1.0.0-beta.9, respectively. AlignAzure.Coreto1.63.0,System.ClientModelto1.16.0, andMicrosoft.Identity.Client.Extensions.Msalto4.90.0.For code using the affected SDK APIs directly, replace string storage ETags with
Azure.ETag(ETag ifMatch = defaultin state-store overrides),stream.InternalMetadatawithstream.PersistedMetadata,stream.Checkpoint()withstream.CreateCheckpointEvent(), andSessionFileWriteResponsewithSessionFileWriteResult. WhereAgentReferencebecomes ambiguous, qualify or aliasAzure.AI.Extensions.OpenAI.AgentReference, not the newly addedAzure.AI.Projects.Agents.AgentReference.Storage compatibility: Responses beta.9 moves local durable response state to
responses/partitions-v1; existing pre-upgrade local response files are not read after upgrading. The PR does not provide a migration procedure for those files. -
.NET: [BREAKING] Reject redirect client changes (#9711 by @baywet).
Migration: Update
DefaultHttpRequestHandlerclient-provider callbacks to returnnullfor allowed redirect destinations, retaining the internally owned client, or throw to reject a destination. Returning a client for a redirect now causesHttpRequestExceptionbefore the redirected request is sent. Supplying a client for the initial request remains supported, and no public API signatures change. -
.NET, LocalCodeAct: Harden provenance and process capability checks (#9804 by @eavanvalkenburg).
-
.NET, dependencies: Update the Aspire dependency group and align the Content Understanding dependency floor (#9822 by @dependabot[bot], #9695).
-
.NET: Bump the release version to 1.27.0 (#9893 by @baywet).
-
docs, samples: Clarify optional usage counter handling, pin the RAG Step02 documentation pages to a commit, and point Foundry-migrated sample READMEs at
FOUNDRY_*settings (#9783, #9648 by @Laurianti, #9600 by @1aifanatic). -
development: Update developer setup and CODEOWNERS maintainer assignments (#9733, #9734 by @dargilco).
Fixed
- .NET, workflows: Handle parse-value and workflow value conversion failures consistently, validate question skip inputs consistently, persist workflow scope aliases, preserve pending Magentic plan review, and release the workflow when a run ends after an executor fails to initialize ([#9845](ht
- dotnet-1.26.02026-10-23 · 2026-10-23 14:32 UTC
查看更新说明
Changes:
- 9c8a3514a15a702f81bfda456d80c7ccaa4d2712 Update package versions for release (#9650)
- c3b9f22d64fd86e8133395555a1fa4aa22f745e0 Add ACGS to the Python community projects (#9618)
- 71cf48cb4019bc503c7ceb61420cc3d836250790 Python: Honor allow_multiple_tool_calls in AnthropicClient when tool_choice is unset (#8980)
- ea32b6db9e9b4b434a86496bacd9cc6dd0422a69 Python: compose Copilot session hooks correctly (#9649)
- 678c6616aa4c73ecfc28cc6fc119a3928ba04024 .NET: Fix AG-UI sample prerequisites and troubleshooting paths (#9620)
- 8730cb1974857e2264f874a258623db1303cc2ac .NET: Log a warning when an unsupported declarative action is skipped (#8056) [ #8040 ]
- 9581926deec6a0473a68797153e98d44da74d09a .NET: Correct endpoint override instructions in Responses samples (#9639)
- 9c53b5f44658cc7839d0f1aefe580152edaba970 Python: Refresh coding standards and Copilot review guidance (#9637)
- 3b725b3b0ffe09ff00d57b31cc179d20d12a1e49 Python: fix(core): define EdgeGroup's builtins.type alias at module scope (#9614)
- a8e284ca8ce7c2a6b4a4641ef35e131d75a5cda3 Python: Add #9472 to 1.23.0 changelog (#9610)
- d33c44583992c4f638f50714bbbbfc4d1070356b Python: Bump package versions for 1.23.0 release (#9602)
- 07a83a7c369b7d51247630a60e48bebf85429943 Python: Recommend include_detailed_errors only when it is disabled (#9472)
- ce214c0b3f69b6d735e90afbdadad8d0a6268067 fix(dotnet): preserve toolbox OAuth consent (#9565) [ #8379 ]
- c3ce250695f71e56c9c3f9bff85fef78934520aa Python: Set the assistant role on streamed Gemini updates (#9491)
- fb57ceb6bb0d75520297d93f6cebfbe6eede370e Add Tracekit to the Python community projects (#9497)
- 33439bf8bcf3e3a76d7094e8f4cbb584abfc8f42 Python: Pass stream errors to nested streams when closing them (#9476)
- d0c3e6acfe4e3fb08887d13b4a1f9ddea0d6509c Python: Add installable Agent Framework builder skill (#9374)
- 1263843977f687f24f153d1f9597317e21d55966 Python: Sanitize unexpected streaming response failures (#9460)
- 074bc0b17e605e28b5235ed15ad52b977b65db88 test(dotnet): remove legacy persistent tests (#9588) [ #9587 ]
- bba95967e36f8b45f1cb0fcfa67333134f29e7dd Python: Clarify MCP client ownership and add workflow sample (#9532)
- 8ff2ec937fe438c4330f9e0b0b5e01b32df079e3 Python: close the RedisContextProvider index connection when the provider owns it (#9510)
- 89457c5bcdd7c7b3423f4063f32c604d2fec0a74 docs: fix ChatResponse async aggregation example (#9518)
- 74f3447d030c83d747efab617d92573f86c01f52 Python: Make Content base64 documentation examples runnable (#9467)
- b7f8ad686b07a5f6b13dd1f471ee1328b24c8a3a Python: Remove span-only tool attributes from invocation metrics (#9592)
- 5da17697d62d8c80c899c977e004ea6b8c09e56f docs: update A2A hosting example for SDK v1 (#9521)
- 8be57da33007b478ea8dd924bf8ccfa36a8444a6 Python: fix(bedrock): report the requested model on non-streaming responses (#9399)
- 06050253e90e235203d65e323cdb096145d37c26 docs: fix ChatKit streaming helper usage (#9523)
- b7ce0d616fd027f850178e7a11255dc67070fe7a fix(workflows): support keyword-only RunContext in functional workflows (#9397)
- 1ba7425571fdc2c92ac18b6b537ad1c8a6d02b04 Python: Fix stateless shell tools inheriting host stdin (#9469)
- a9eff53bdcca76b5b2d60b5ea3c7e9f973667e55 Python: Handle missing reasoning text in DevUI (#9543)
- a479349b2a7a246981117efa0659345d5fb0aa14 Python: Correct Purview middleware setup in package guide (#9553)
- 597342c2c688c54620a4b00b76866d8e1ef943ea Python: Fix Copilot Studio constructor in package guide (#9551)
- 70ba23a3970cc8ab829eed2cc887a25137f3a1e5 fix: bind background completion waits to execution identity (#9442)
- 10f7f989fba24087864d1d9e00def83fafb0abd0 .NET: Add AgentSessionStore.DeleteSessionAsync to the Abstraction (#8801) [ #7991, #8586 ]
- c7394476bffb5cf8b4ba84a2903f234d8f18a5ac Python: drop unsupported instructions from AF Copilot Studio migration samples (#9577)
- 621e8e39daffe9204ae0c29f0f9f285fd2cf7298 Python: pass judge model in
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。

Welcome to Microsoft Agent Framework!
Microsoft Agent Framework (MAF) is an open, multi-language framework for building production-grade AI agents and multi-agent workflows in .NET and Python.
Microsoft Agent Framework is built for teams taking agents from prototype to production. It provides a consistent foundation for building, orchestrating, and operating agent systems across Python, .NET and Go, while keeping architecture choices open as requirements evolve, and supports a broad ecosystem including Microsoft Foundry, Azure OpenAI, OpenAI, and the GitHub Copilot SDK, with samples and hosting patterns for both local development and cloud deployment.
[!NOTE] For the Go SDK, including its documentation, samples, contribution guidance, and issue tracker, visit microsoft/agent-framework-go.
Is this the right framework for you?
MAF is a strong fit if you:
- are building agents and workflows you expect to run in production,
- need orchestration beyond a single prompt or stateless chat loop,
- want graph-based patterns such as sequential, concurrent, handoff, and group collaboration,
- care about durability, restartability, observability, governance, or human-in-the-loop control,
- need provider flexibility so your architecture can evolve without major rewrites.
Key Features
Explore new MAF capabilities and real implementation patterns on the official blog.
- Python and C#/.NET Support: Full framework support for both Python and C#/.NET implementations with consistent APIs
- Go Support: For the Go SDK, including its documentation, samples, contribution guidance, and issue tracker, visit microsoft/agent-framework-go.
- Multiple Agent Provider Support: Support for various LLM providers with more being added continuously
- Middleware: Flexible middleware system for request/response processing, exception handling, and custom pipelines
- Orchestration Patterns & Workflows: Build multi-agent systems with graph-based workflows supporting sequential, concurrent, handoff, and group collaboration patterns; includes checkpointing, streaming, human-in-the-loop, and time-travel
- Foundry Hosted Agents (new): Deploy and host your agents to Foundry-hosted infrastructure with just 2 additional lines of code
- Observability: Built-in OpenTelemetry integration for distributed tracing, monitoring, and debugging
- Declarative Agents: Define agents using YAML for faster setup and versioning
- Agent Skills: Build domain-specific knowledge bases from multiple sources—files, inline code, class libraries—for agents to discover and use
- AF Labs: Experimental packages for cutting-edge features including benchmarking, reinforcement learning, and research initiatives
- DevUI: Interactive developer UI for agent development, testing, and debugging workflows
Table of Contents
- Getting Started
- Agent Skills for Coding Agents
- More Examples & Samples
- Community & Feedback
- Troubleshooting
- Contributor Resources
Getting Started
Installation
Python
pip install agent-framework
# This installs the standard package set; install `agent-framework-lab` separately for experimental modules.
# It may take a minute on first install on Windows.
.NET
dotnet add package Microsoft.Agents.AI
# For Foundry integration (used in the .NET quickstart below):
dotnet add package Microsoft.Agents.AI.Foundry
dotnet add package Azure.AI.Projects
dotnet add package Azure.Identity
Learning Resources
- Overview - High level overview of the framework
- Quick Start - Get started with a simple agent
- Tutorials - Step by step tutorials
- User Guide - In-depth user guide for building agents and workflows
- Migration from Semantic Kernel - Guide to migrate from Semantic Kernel
- Migration from AutoGen - Guide to migrate from AutoGen
Quickstart
Basic Agent - Python
Create a simple Azure Responses Agent that writes a haiku about the Microsoft Agent Framework
# pip install agent-framework
# Use `az login` to authenticate with Azure CLI
import os
import asyncio
from agent_framework import Agent
from agent_framework.foundry import FoundryChatClient
from azure.identity import AzureCliCredential
async def main():
# Initialize a chat agent with Microsoft Foundry
# the endpoint, deployment name, and api version can be set via environment variables
# or they can be passed in directly to the FoundryChatClient constructor
agent = Agent(
client=FoundryChatClient(
credential=AzureCliCredential(),
# project_endpoint=os.environ["FOUNDRY_PROJECT_ENDPOINT"],
# model=os.environ["FOUNDRY_MODEL"],
),
name="HaikuAgent",
instructions="You are an upbeat assistant that writes beautifully.",
)
print(await agent.run("Write a haiku about Microsoft Agent Framework."))
if __name__ == "__main__":
asyncio.run(main())
Basic Agent - .NET
Create a simple Agent, using Microsoft Foundry that writes a haiku about the Microsoft Agent Framework
// This sample shows how to create and run a basic agent with AIProjectClient.AsAIAgent(...).
using Azure.AI.Projects;
using Azure.Identity;
using Microsoft.Agents.AI;
string endpoint = Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("FOUNDRY_PROJECT_ENDPOINT is not set.");
string deploymentName = Environment.GetEnvironmentVariable("FOUNDRY_MODEL") ?? "gpt-5.4-mini";
AIAgent agent =
new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential())
.AsAIAgent(model: deploymentName, instructions: "You are an upbeat assistant that writes beautifully.", name: "HaikuAgent");
// Once you have the agent, you can invoke it like any other AIAgent.
Console.WriteLine(await agent.RunAsync("Write a haiku about Microsoft Agent Framework."));
Agent Skills for Coding Agents
Install the Python Agent Framework builder skill to give a compatible coding agent current guidance for choosing and building agents, harnesses, workflows, evaluations, integrations, and hosting:
gh skill install microsoft/agent-framework agent-framework-builder-python@main
The explicit @main ref is required until a tagged Agent Framework release includes the skill.
The cross-agent skills CLI is also supported:
npx skills add microsoft/agent-framework --skill agent-framework-builder-python
See the consumer skills catalog for details.
More Examples & Samples
Python
- Getting Started: progressive tutorial from hello-world to workflows
- Agent Concepts: deep-dive samples by topic (tools, middleware, providers, etc.)
- Workflows: workflow creation and integration with agents
- Hosting: A2A, self-hosted protocol helpers, and Foundry hosted agents. Durable Task and Azure Functions samples are in the Durable Agent Framework extension.
- End-to-End: full applications, evaluation, and demos
.NET
- Getting Started: progressive tutorial from hello agent to workflows
- Agent Concepts: basic agent creation and tool usage
- Agent Providers: samples showing different agent providers
- Workflows: advanced multi-agent patterns and workflow orchestration
- Hosting: A2A and Foundry hosted agents. Durable agent and workflow samples are in the Durable Agent Framework extension.
- End-to-End: full applications and demos
Community & Feedback
- Found a bug? File a GitHub issue to help us improve.
- Enjoying MAF?
to show your support and help others discover the project.
- Have questions? Join our Discord or visit weekly office hours.
Troubleshooting
Authentication
| Problem | Cause | Fix |
|---|---|---|
| Authentication errors when using Azure credentials | Not signed in to Azure CLI | Run az login before starting your app |
| API key errors | Wrong or missing API key | Verify the key and ensure it's for the correct resource/provider |
Tip:
DefaultAzureCredentialis convenient for development but in production, consider using a specific credential (e.g.,ManagedIdentityCredential) to avoid latency issues, unintended credential probing, and potential security risks from fallback mechanisms.
Environment Variables
For environment variable configuration specific to each sample, refer to the README in the sample directory (Python samples | .NET samples).
Contributor Resources
- Contributing Guide
- AI-Assisted Contributions Policy
- Code of Conduct
- Python Development Guide
- Design Documents
- Architectural Decision Records
Important Notes
[!IMPORTANT] If you use Microsoft Agent Framework to build applications that operate with any third-party servers, agents, code, or non-Azure Direct models (“Third-Party Systems”), you do so at your own risk. Third-Party Systems are Non-Microsoft Products under the Microsoft Product Terms and are governed by their own third-party license terms. You are responsible for any usage and associated costs.
We recommend reviewing all data being shared with and received from Third-Party Systems and being cognizant of third-party practices for handling, sharing, retention and location of data. It is your responsibility to manage whether your data will flow outside of your organization’s Azure compliance and geographic boundaries and any related implications, and that appropriate permissions, boundaries and approvals are provisioned.
You are responsible for carefully reviewing and testing applications you build using Microsoft Agent Framework in the context of your specific use cases, and making all appropriate decisions and customizations. This includes implementing your own responsible AI mitigations such as metaprompt, content filters, or other safety systems, and ensuring your applications meet appropriate quality, reliability, security, and trustworthiness standards. See also: Transparency FAQ