TPToolPazar
Ana Sayfa/Rehberler/How To Use Autogen

How To Use Autogen

📖 Bu rehber ToolPazar ekibi tarafından hazırlanmıştır. Tüm araçlarımız ücretsiz ve reklamsızdır.

What it is

AutoGen treats AI workflows as conversations between specialized agents. Instead of chaining prompts, you define an AssistantAgent that can write code, a UserProxyAgent that can execute it, and optionally a group-chat manager that routes turns between many agents. The loop continues until a termination condition is met — a regex match, a max-turn limit, or a human “exit”. The result feels less like a pipeline and more like a team meeting.

Install

AutoGen is maintained by Microsoft Research and released under the MIT license. The current line is AutoGen 0.4+, which splits into three packages: autogen-core (event-driven runtime), autogen-agentchat (the high-level chat API most users touch), and autogen-ext (model clients and tools). Python is the primary language; a .NET port exists.

First run

A minimal two-agent assistant that can call tools and stop when it says TERMINATE:

Everyday workflows

The 0.2 to 0.4 jump was a full rewrite — tutorials you find on blogs may import names that no longer exist. Pin to one major line per project. Also watch termination: without a TextMentionTermination or MaxMessageTermination, agents can loop politely forever and burn your token budget.

Gotchas and tips

Code execution is powerful but dangerous. Always point UserProxyAgent’s executor at a sandboxed Docker image, not the host shell, and set a working directory outside your repo root so models cannot clobber your code.

Who it’s for

Researchers and backend engineers exploring agentic patterns beyond a single LLM call. Tip: start with two agents; only add a third when you can name a concrete reason the pair cannot solve the task.