Git Analytics AI AgentAI Agent
microsoft/autogen

microsoft/autogen — เฟรมเวิร์ก Multi-Agent AI จาก Microsoft (Archived)microsoft/autogen — Microsoft's Multi-Agent AI Framework (Archived)

AI AgentAI Agent 61,443 ดาวStars 9,293 Python CC-BY-4.0 อัปเดตล่าสุดLast push 16 ต.ค. 256916 Oct 2026
microsoft/autogen

AutoGen เป็นเฟรมเวิร์ก Python/.NET สำหรับสร้างแอปพลิเคชัน AI แบบ multi-agent ที่ทำงานอัตโนมัติหรือร่วมกับมนุษย์ พัฒนาโดย Microsoft Research แต่ปัจจุบันถูก archive แล้วและแนะนำให้ย้ายไปใช้ Microsoft Agent Framework แทน

AutoGen is a Python/.NET framework for building multi-agent AI applications that act autonomously or alongside humans. Pioneered by Microsoft Research, it is now archived and users are directed to migrate to Microsoft Agent Framework.

ไว้ทำอะไร

AutoGen ถูกออกแบบมาเพื่อแก้ปัญหาการประสานงานระหว่าง AI agent หลายตัวในระบบเดียวกัน เช่น ให้ agent หนึ่งเชี่ยวชาญด้านคณิตศาสตร์ อีกตัวเชี่ยวชาญด้านเคมี แล้วมี agent กลางคอยส่งงานให้ตัวที่เหมาะสม รองรับทั้งการทำ chat แบบ 2 agent, group chat หลายตัว, การเรียก tool ผ่าน MCP server และการรัน code execution ใช้สำหรับสร้าง AI assistant ที่ซับซ้อน, ระบบ workflow อัตโนมัติ หรือ prototype แอป AI แบบ no-code ผ่าน AutoGen Studio

ทำงานอย่างไร

AutoGen ใช้สถาปัตยกรรมแบบ layered แบ่งเป็น 3 ชั้นหลัก: Core API ที่จัดการ message passing และ event-driven agents รองรับทั้ง local และ distributed runtime รวมถึง cross-language ระหว่าง Python กับ .NET ถัดมาคือ AgentChat API ที่สร้างอยู่บน Core API ให้ API ที่ใช้ง่ายกว่าสำหรับ rapid prototyping รองรับ pattern ยอดนิยมอย่าง two-agent chat และ group chat และสุดท้ายคือ Extensions API สำหรับขยายความสามารถด้วย plugin เช่น LLM client (OpenAI, Azure OpenAI) และ MCP tool server

การทำงานจริงเริ่มจากสร้าง model client (เช่น OpenAIChatCompletionClient) แล้วสร้าง AssistantAgent ที่ผูกกับ model นั้น สามารถเพิ่ม tool ผ่าน AgentTool เพื่อให้ agent ตัวหนึ่งเรียกใช้ agent ตัวอื่นได้ หรือผูก MCP server ผ่าน McpWorkbench เพื่อให้ agent เข้าถึง tool ภายนอก เช่น Playwright สำหรับ web browsing ทั้งหมดทำงานแบบ async ผ่าน asyncio

นอกจากเขียนโค้ดแล้ว ยังมี AutoGen Studio เป็น GUI แบบ no-code สำหรับ prototype workflow และ AutoGen Bench สำหรับ benchmark ประสิทธิภาพ agent รวมถึง Magentic-One ซึ่งเป็นตัวอย่าง multi-agent team ที่จัดการ web browsing, code execution และ file handling ได้

โครงสร้างโค้ด

  • python/packages/autogen-core/ — Core API: message passing, event-driven agents, local/distributed runtime
  • python/packages/autogen-agentchat/ — AgentChat API: high-level API สำหรับ multi-agent pattern (two-agent chat, group chat)
  • python/packages/autogen-ext/ — Extensions API: LLM clients, MCP tools, code execution plugins
  • python/packages/autogen-studio/ — AutoGen Studio: GUI แบบ no-code สำหรับสร้าง multi-agent workflow
  • python/packages/agbench/ — AutoGen Bench: ชุดเครื่องมือ benchmark ประสิทธิภาพ agent
  • python/packages/magentic-one-cli/ — Magentic-One: ตัวอย่าง multi-agent team ระดับ state-of-the-art
  • dotnet/ — .NET SDK: รองรับ cross-language กับ Python ผ่าน Core API
  • protos/ — Protocol Buffers: agent_worker.proto สำหรับ distributed agent communication
  • python/samples/ — ตัวอย่างการใช้งานจริง

เริ่มใช้งาน

# ต้องใช้ Python 3.10 ขึ้นไป
pip install -U "autogen-agentchat" "autogen-ext[openai]"

# ตั้งค่า API key
export OPENAI_API_KEY="sk-..."
import asyncio
from autogen_agentchat.agents import AssistantAgent
from autogen_ext.models.openai import OpenAIChatCompletionClient

async def main() -> None:
    model_client = OpenAIChatCompletionClient(model="gpt-4.1")
    agent = AssistantAgent("assistant", model_client=model_client)
    print(await agent.run(task="Say 'Hello World!'"))
    await model_client.close()

asyncio.run(main())
# หรือใช้ AutoGen Studio แบบ no-code
pip install -U "autogenstudio"
autogenstudio ui --port 8080 --appdir ./my-app

เหมาะกับงานแบบไหน

  • สร้าง AI assistant ที่ประกอบด้วย agent ผู้เชี่ยวชาญหลายตัว เช่น agent คณิตศาสตร์ + agent เคมี + agent ประสานงาน
  • ทำ web browsing อัตโนมัติผ่าน MCP server เช่น ใช้ Playwright ดึงข้อมูลจากเว็บ
  • Prototype ระบบ multi-agent แบบ no-code ผ่าน AutoGen Studio
  • สร้าง workflow ที่ agent ทำงานร่วมกันเป็นทีม เช่น Magentic-One ที่จัดการ browsing, code execution และ file handling
  • Benchmark เปรียบเทียบประสิทธิภาพ agent ต่าง ๆ ด้วย AutoGen Bench

ข้อควรรู้

  • โปรเจกต์ถูก archive แล้ว — Microsoft ไม่แก้บั๊ก ไม่แพตช์ security ไม่เพิ่มฟีเจอร์ และไม่ให้ support อีกต่อไป
  • Microsoft แนะนำให้ย้ายไปใช้ Microsoft Agent Framework (MAF) สำหรับโปรเจกต์ใหม่
  • ไลเซนส์ CC-BY-4.0 (เอกสาร) และ MIT (โค้ด แยกไฟล์ LICENSE-CODE) — ต้องตรวจสอบไลเซนส์ให้ตรงกับการใช้งาน
  • AutoGen Studio ไม่ได้ออกแบบสำหรับ production — ไม่มี authentication และ security features ในตัว
  • การเชื่อมต่อ MCP server ควรใช้เฉพาะ server ที่เชื่อถือได้ เพราะอาจรัน command บนเครื่องหรือเข้าถึงข้อมูลสำคัญ
  • Dependency ที่ไม่ได้รับการอัปเดตอาจมีช่องโหว่ด้าน security สะสม

What it is for

AutoGen was designed to solve the orchestration problem of coordinating multiple AI agents within a single system — for example, routing tasks to specialized math or chemistry agents via a central coordinator. It supports two-agent chat, multi-agent group chat, MCP tool calling, and code execution. Use cases include building complex AI assistants, automated workflows, and rapid no-code prototyping via AutoGen Studio.

How it works

AutoGen uses a layered architecture with three main layers: the Core API handles message passing and event-driven agents with local/distributed runtime and cross-language support (Python and .NET); the AgentChat API builds on Core to provide a simpler, opinionated API for rapid prototyping with common patterns like two-agent chat and group chat; and the Extensions API enables plugin-based expansion with LLM clients (OpenAI, Azure OpenAI) and MCP tool servers.

In practice, you create a model client (e.g., OpenAIChatCompletionClient), then instantiate AssistantAgent instances bound to that client. You can compose agents via AgentTool so one agent delegates to others, or bind MCP servers through McpWorkbench for external tool access like Playwright-based web browsing. Everything runs asynchronously via asyncio.

Beyond code, AutoGen Studio provides a no-code GUI for prototyping workflows, AutoGen Bench offers agent performance benchmarking, and Magentic-One demonstrates a state-of-the-art multi-agent team handling web browsing, code execution, and file management.

Code structure

  • python/packages/autogen-core/ — Core API: message passing, event-driven agents, local/distributed runtime
  • python/packages/autogen-agentchat/ — AgentChat API: high-level API for multi-agent patterns (two-agent chat, group chat)
  • python/packages/autogen-ext/ — Extensions API: LLM clients, MCP tools, code execution plugins
  • python/packages/autogen-studio/ — AutoGen Studio: no-code GUI for building multi-agent workflows
  • python/packages/agbench/ — AutoGen Bench: agent performance benchmarking suite
  • python/packages/magentic-one-cli/ — Magentic-One: state-of-the-art multi-agent team example
  • dotnet/ — .NET SDK: cross-language support with Python via Core API
  • protos/ — Protocol Buffers: agent_worker.proto for distributed agent communication
  • python/samples/ — Usage examples

Getting started

# ต้องใช้ Python 3.10 ขึ้นไป
pip install -U "autogen-agentchat" "autogen-ext[openai]"

# ตั้งค่า API key
export OPENAI_API_KEY="sk-..."
import asyncio
from autogen_agentchat.agents import AssistantAgent
from autogen_ext.models.openai import OpenAIChatCompletionClient

async def main() -> None:
    model_client = OpenAIChatCompletionClient(model="gpt-4.1")
    agent = AssistantAgent("assistant", model_client=model_client)
    print(await agent.run(task="Say 'Hello World!'"))
    await model_client.close()

asyncio.run(main())
# หรือใช้ AutoGen Studio แบบ no-code
pip install -U "autogenstudio"
autogenstudio ui --port 8080 --appdir ./my-app

Good fit for

  • Build AI assistants composed of multiple specialist agents (e.g., math + chemistry + coordinator)
  • Automate web browsing via MCP servers such as Playwright for data extraction
  • Prototype multi-agent systems without code using AutoGen Studio
  • Create collaborative agent teams like Magentic-One for browsing, code execution, and file handling
  • Benchmark and compare agent performance using AutoGen Bench

Things to know

  • Project is archived — Microsoft provides no bug fixes, security patches, new features, or support
  • Microsoft recommends migrating to Microsoft Agent Framework (MAF) for new projects
  • License is CC-BY-4.0 (docs) and MIT (code via LICENSE-CODE) — verify license applicability for your use case
  • AutoGen Studio is not production-ready — lacks built-in authentication and security features
  • Only connect to trusted MCP servers as they may execute commands locally or expose sensitive data
  • Unmaintained dependencies may accumulate security vulnerabilities over time

บทวิเคราะห์นี้สร้างจาก README และโค้ดของ repo โดย AI ของ Oneable — ตรวจสอบ license และเอกสารต้นทางก่อนนำไปใช้งานจริงThis breakdown was generated from the repository's README and code by Oneable's AI — check the license and upstream docs before using it in production.

#agentic#agentic-agi#agents#ai#autogen#autogen-ecosystem#chatgpt#framework#llm-agent#llm-framework

repo อื่นในหมวดเดียวกันMore in this category