Microsoft DevBlogs: Agent Framework Building Blocks Part 3 — agents + tools + multi-turn memory + graph workflows ใน .NET — Part 4 จะเป็น MCP
วันที่ 4 พ.ค. 2026 Jeremy Likness (Principal Program Manager, .NET AI experience) ลงโพสต์ตอนที่ 3 ของ series “Building Blocks for AI in .NET” บน devblogs.microsoft.com/dotnet — ครอบคลุม Microsoft Agent Framework 1.0 ทั้ง stack
ส่วนที่น่าสนใจคือ Microsoft วาง series นี้เป็น canonical onboarding สำหรับ .NET dev ที่จะสร้าง production AI agent — ไม่ใช่ tutorial ทั่วไป แต่ระบุ design pattern + production guardrail ตั้งแต่บรรทัดแรก
Recap series — Part 1 → 4
- Part 1 — Foundations: AI primitive ใน Microsoft.Extensions.AI (chat client, embedding, function calling)
- Part 2 — Memory & Retrieval: vector store, semantic memory, RAG patterns
- Part 3 — Agent Framework (โพสต์นี้): agent + tool + multi-turn + graph workflow + tool approval
- Part 4 — MCP (เร็ว ๆ นี้): Model Context Protocol = วิธี standard ให้ agent discover external tool/resource
Microsoft Agent Framework ขึ้น 1.0 GA เมื่อต้น เม.ย. 2026 (Visual Studio Magazine รายงาน 6 เม.ย.) — เป็นการ merge Semantic Kernel (เดิม MSR) + AutoGen (เดิม MSR Asia) เข้าเป็น stack เดียว support ทั้ง .NET และ Python
ของหลักใน Part 3
โพสต์นี้ลงรายละเอียด 5 ของหลัก:
1) Agent abstraction — Microsoft.Agents.AI.Agent เป็นคลาสกลางที่รับ chat client + tool list + system prompt → คืน turn-based response object — รองรับ stream + non-stream
2) Tool calling พร้อม approval workflow — agent เสนอ tool call แล้ว รอ human approval ก่อน execute — เป็น critical pattern สำหรับ production ที่ tool ทำเรื่อง irreversible (database write, ส่ง email, charge ลูกค้า)
agent.OnToolApprovalRequested += async (sender, args) => {
// surface request ใน UI ให้ user กด approve/reject
args.Approved = await PromptUserAsync(args.ToolCall);
};
3) Multi-turn memory — agent เก็บ conversation history + tool result ไว้ใน IAgentMemory — มี implementation default + plug-in ของ Cosmos DB / Redis / SQL Server
4) Graph-based multi-agent workflow — Agent Framework สามารถ orchestrate agent หลายตัวเป็น directed graph — supervisor agent ส่งงานให้ specialist agent แต่ละตัว แล้ว consolidate ผลลัพธ์ — pattern เดียวกับ LangGraph แต่ใน .NET เนทีฟ
5) Tool-result streaming — tool ที่เรียก long-running API (เช่น Azure OpenAI Assistant, Foundry agent) สามารถ stream intermediate progress กลับ caller ได้แบบ async iterator — ลด wait time perceived ของ end-user
Tool approval = signal ของ enterprise readiness
ที่น่าสนใจคือ Microsoft เน้น tool approval workflow มาก — เพราะนี่คือสิ่งที่ enterprise customer ของ Microsoft (banking, healthcare, government) ต้องการก่อนยอม deploy agent ใน production
เปรียบเทียบกับ frameworks อื่น:
- LangChain/LangGraph (Python): มี
interruptmechanism แต่ต้อง wire เอง - OpenAI Agents SDK: มี handoff + guardrail แต่ approval ยังเป็น opt-in custom
- Microsoft Agent Framework: approval เป็น built-in event, default behavior + audit log + integration กับ Azure AI Foundry
ทิศทางชัดเจนว่า Microsoft เลือก vertical ของตัวเอง — enterprise ที่ต้อง compliance — เป็น differentiation จาก OpenAI/Anthropic ที่ยังเน้น developer experience ของ startup
มุมมอง AI Curator
เรา cover Cursor SDK 1.0 TypeScript public beta เมื่อ 4 พ.ค. — เป็น signal ของ agent infra layer แบบ open-stack สำหรับ TypeScript world — Microsoft Agent Framework คือ คู่ขนาน ของ ecosystem .NET
ประเด็นที่ dev SEA ควรจับ:
1) ถ้าทีมคุณเป็น .NET shop — ควร jump on Agent Framework 1.0 ตอนนี้ — เพราะ Microsoft จะ wire ทุก Azure AI service (Foundry, OpenAI on Azure, AI Search, Cosmos DB vector store) เข้ากับ framework นี้ภายใน 6-12 เดือน — ยิ่งเริ่มเร็ว ยิ่งใช้ประโยชน์ co-development ได้เร็ว
2) Tool approval pattern ต้องเป็น default mindset — เมื่อโรงพยาบาลไทยหรือธนาคาร AIS Capital เริ่ม deploy agent — คำถามแรกของ compliance ทีมคือ “agent คุยกับ legacy core banking ตรง ๆ ได้ไหม ถ้ายัง — พิสูจน์ว่ามี human-in-the-loop ตอน irreversible action ที่ไหนบ้าง” — agent framework ที่มี approval as primary citizen จะตอบคำถามนี้ได้ทันที
3) Multi-language story = 1 stack, 2 runtime — Microsoft commit ว่า .NET กับ Python จะ feature parity — ดีมากสำหรับทีม polyglot ที่มี data scientist Python + backend dev .NET — สามารถสลับ implementation ระหว่าง prototype และ production บน framework เดียว
ระยะถัดไปจะน่าดู: MCP integration ใน Part 4 — ถ้า Microsoft ทำ MCP server discovery + capability negotiation ดีพอ Agent Framework จะกลายเป็น MCP host แบบ default สำหรับ enterprise — และเริ่ม challenge OpenAI Apps SDK กับ Anthropic ของตัวเองในการ define standard
แหล่งข่าว
อ่านเพิ่มในหมวด เครื่องมือนักพัฒนา
Betelgeuse รัน Qwen3.8 Flash Next ขนาด 68GB บน RTX 3060 กับแรม 16GB ส่วน Basalt วัดให้เห็นว่าเอนจินที่เร่งด้วยแฟล็กลัดทำให้โมเดลลืมของ
Betelgeuse ฟอร์ก llama.cpp ที่เปิดเมื่อ 31 ต.ค. ดึง expert จาก NVMe เข้า VRAM ตามต้องการ อ้าง 22 tok/s แบบไม่ทิ้ง expert แต่ README เตือนเองว่ายังทดลองและตัวเลขมาจากคนละรอบ วันเดียวกันผู้พัฒนา Basalt เผยผลวัดว่าแฟล็กเร่งความเร็วทำคุณภาพ Q8 ตกไปใกล้ Q2
กฎห้ามโคลนเกมของ Claude Code เริ่มกระทบงานจริง บริษัทรับทำเกมกระดานร้องงานลูกค้าหยุด แต่รายงานหลายชิ้นปนกับตัวกรองไซเบอร์คนละเรื่อง
ต่อจากที่เราพบกฎนี้ในไบนารี Claude Code ผู้ใช้เริ่มรายงานว่างานเชิงพาณิชย์ถูกปฏิเสธ และ Tom's Hardware กับ Mashable หยิบไปรายงาน แต่เมื่อไล่ issue ที่อ้างถึง พบว่าหลายรายการเกิดก่อนกฎจะมา จึงน่าจะเป็นตัวกรองด้านไซเบอร์ ส่วน Anthropic ยังไม่ชี้แจง
Claude Code ส่ง transcript ของ background agent ให้โมเดลทุก ~30 วินาทีเพื่อเขียนสถานะ 3–5 คำ ผู้วัดรายงานกินราว 16% และยังปิดแบบทางการไม่ได้
รายงานอิสระพบว่าฟีเจอร์ agent_summary ของ Claude Code ส่ง transcript เต็มของ background agent ไปถามสถานะทุก ~30 วินาที คิดเป็น 16.4% ของค่าใช้จ่ายในระบบของผู้วัด Issue เปิดมาตั้งแต่ ส.ค. ยังไม่มีสวิตช์ปิดที่รองรับ เราตรวจพบโค้ดนี้ใน 2.1.314 และพบกฎใหม่เรื่องเกมที่ไม่อยู่ใน changelog