เฟรมเวิร์ก · Microsoft
ภาพรวม Microsoft Agent Framework
เฟรมเวิร์กสำหรับ agent ของ Microsoft ใน Python และ .NET พัฒนาโดยทีม Semantic Kernel และ AutoGen และเปิดให้ใช้งานทั่วไปตั้งแต่ April 2026 รองรับ agent แบบระบุชนิดและเวิร์กโฟลว์แบบกราฟที่บันทึก checkpoint ทำงานต่อ และรอรับข้อมูลจากผู้ใช้ได้ นอกจากนี้ Go SDK ยังอยู่ในช่วง public preview
เหมาะสำหรับ: ทีม Python และ .NET ที่ใช้ Azure รวมถึงทีมที่กำลังย้ายออกจาก AutoGen หรือ Semantic Kernel
ข้อมูลสำคัญ
- ผู้ดูแล
- Microsoft
- ภาษา
- Python, C#, .NET, Go
- ไลเซนส์
- MIT
- เวอร์ชันล่าสุด
Python 1.19.0 / .NET 1.23.0· 1 ตุลาคม 2569- Repository
- microsoft/agent-framework
- ตัวเลือกแบบโฮสต์
- Foundry Hosted Agents (Microsoft Foundry)
Quickstart
ติดตั้งแพ็กเกจ ตั้งค่าข้อมูลรับรอง แล้วเรียกใช้ agent ตัวอย่างที่เล็กที่สุดจากเอกสารทางการ Model ID เป็นค่าที่เอกสารใช้ และอาจยังไม่ได้เปิดใช้งานในบัญชีของคุณ
Python
pip install agent-frameworkfrom agent_framework import Agent
from agent_framework.foundry import FoundryChatClient
from azure.identity import AzureCliCredential
agent = Agent(
client=FoundryChatClient(
project_endpoint="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project",
model="gpt-5.4-mini",
credential=AzureCliCredential(),
),
name="HelloAgent",
instructions="You are a friendly assistant. Keep your answers brief.",
)
# Non-streaming: get the complete response at once
result = await agent.run("What is the largest city in France?")
print(f"Agent: {result}")C#
dotnet add package Microsoft.Agents.AI.Foundry --prereleaseusing System;
using Azure.AI.Projects;
using Azure.Identity;
using Microsoft.Agents.AI;
AIAgent agent = new AIProjectClient(
new Uri("https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project"),
new AzureCliCredential())
.AsAIAgent(
model: "gpt-5.4-mini",
instructions: "You are a friendly assistant. Keep your answers brief.");
Console.WriteLine(await agent.RunAsync("What is the largest city in France?"));ฟีเจอร์
| ใช้ได้กับทุกโมเดล | ใช่ | รองรับ Foundry, Azure OpenAI, OpenAI, Anthropic, Ollama และอื่น ๆ |
|---|---|---|
| MCP client | ใช่ | |
| MCP server | ยังไม่ยืนยัน | |
| หลาย agent | ใช่ | เวิร์กโฟลว์แบบลำดับ พร้อมกัน ส่งต่องาน และกลุ่ม |
| การทำงานต่อเนื่องแบบทนทาน | ใช่ | รองรับ checkpoint และ Durable Extension บน Azure Functions หรือโฮสต์เอง |
| การอนุมัติโดยมนุษย์ | ใช่ | agent แบบ durable รอข้อมูลจากผู้ใช้ได้โดยไม่ใช้ทรัพยากรประมวลผล |
| Tracing | ใช่ | มี OpenTelemetry ในตัว; ใช้ DevUI สำหรับดีบักในเครื่อง |
| Evals | ยังไม่ยืนยัน | มีรายงานว่าการเชื่อมต่อระบบประเมินยังเป็น preview และไม่รวมอยู่ในฟีเจอร์หลักของเวอร์ชัน 1.0 |
การเปลี่ยนแปลงล่าสุด
- April 2026: เวอร์ชัน 1.0 เปิดให้ใช้งานทั่วไป หลังออก release candidate ใน February
- AutoGen เข้าสู่โหมดบำรุงรักษา ส่วน Semantic Kernel v1 จะได้รับการแก้ไขปัญหาร้ายแรงอย่างน้อยหนึ่งปีหลัง MAF เปิดให้ใช้งานทั่วไป
- เพิ่ม Harness Agent, agent แบบ declarative YAML, Agent Skills และ Go SDK รุ่น preview