October 15, 2025

AutoGen



Open-Source Framework for Agentic AI

Microsoft AutoGen

AutoGen is an open-source framework from Microsoft for building agentic AI apps systems where multiple AI agents and human agents collaborate via conversations, call tools, and execute workflows. It includes Python and .NET SDKs and a companion GUI called AutoGen Studio for low and no-code prototyping. Think: reusable agents + tools + orchestration primitives to stand up multi-agent workflows quickly.

Why people use it

  • Composable agents: Define assistants, tool-users, or human proxies; wire them into teams that talk to each other. 

  • Tooling built-in: Functions become callable tools with auto-generated schemas; agents decide when to call them. 

  • Orchestration options: From simple chats to graph and flow style coordination. 

  • Studio GUI: Drag and drop agents, run experiments, and debug conversations handy before you code.

  • Multi-language: Python and .NET flavors. 

Quickstart (Python, current “stable” style)

Below uses the newer AgentChat APIs shown in the stable docs. Replace the model/client with whatever you use (OpenAI, Azure OpenAI, local server, etc.). 

# pip install autogen-core autogen-agentchat openai import asyncio from autogen_core.model_providers import OpenAIChatCompletionClient from autogen_agentchat.agents import AssistantAgent, UserProxyAgent from autogen_core.tools import FunctionTool # 1) Define a Python function as a tool def search_docs(query: str) -> str: """Toy tool: pretend to search your repo/docs and return a snippet.""" return f"Found note about '{query}': use /api/v2/orders for creation." search_tool = FunctionTool(search_docs) # 2) Create a model client (swap to your provider) model = OpenAIChatCompletionClient(model="gpt-4o") # 3) Create agents assistant = AssistantAgent( name="dev_helper", model_client=model, tools=[search_tool] # assistant can decide to call this tool ) user = UserProxyAgent("you") # human in the loop # 4) Run a simple task async def main(): task = ( "Given our internal API, write a Python example that creates a new order. " "If you're unsure about endpoints, call the search tool with 'order creation'." ) result = await assistant.run(task=task, sender=user) print(result.content) asyncio.run(main())

What happens here:

  • You define a function; AutoGen wraps it as a FunctionTool with a schema generated from your signature/docstring.

  • An AssistantAgent decides based on the conversation whether to call search_docs(query: str).

  • A UserProxyAgent represents you and can step in (approve, add hints) when you want a human-in-the-loop. 

Typical patterns to try

  • Researcher - Coder: A “research” agent gathers requirements and APIs, then a “coder” agent produces code and tests; user approves merge. 

  • Planner - Executor(s): A planner decomposes tasks; executors handle sub-tasks (scrape, call APIs, write SQL).

  • Tool centric agent: One agent focused on tool calls (e.g., web search, vector DB, repo ops), another focused on reasoning.

AutoGen Studio (optional)

GUI! Use AutoGen Studio to sketch agent teams, attach tools, run debug sessions, and export configs and code once it works. Great for sharing workflows with non-Python teammates.

When to reach for AutoGen

  • You need multi-agent collaboration beyond a single chat.

  • Your app calls lots of tools or APIs, and you want agents to choose tools automatically.

  • You want human-in-the-loop control (approvals and checkpoints).

When you might not

  • A single model call or simple RAG chatbot is enough and AutoGen may be overkill.

REF

https://www.microsoft.com/en-us/research/project/autogen/

No comments:

Post a Comment