Skip to content

New AutoGen Architecture Preview#3600

Merged
jackgerrits merged 610 commits into
mainfrom
staging
Oct 9, 2024
Merged

New AutoGen Architecture Preview#3600
jackgerrits merged 610 commits into
mainfrom
staging

Conversation

@jackgerrits

@jackgerrits jackgerrits commented Oct 2, 2024

Copy link
Copy Markdown
Contributor

Blog post

Please use discussion for feedback, comments, or questions.


One year ago, we launched AutoGen, a programming framework designed to build agentic AI systems. The release of AutoGen sparked massive interest within the developer community. As an early release, it provided us with a unique opportunity to engage deeply with users, gather invaluable feedback, and learn from a diverse range of use cases and contributions. By listening and engaging with the community, we gained insights into what people were building or attempting to build, how they were approaching the creation of agentic systems, and where they were struggling. This experience was both humbling and enlightening, revealing significant opportunities for improvement in our initial design, especially for power users developing production-level applications with AutoGen.

Through engagements with the community, we learned many lessons:

  • Developers value modular and reusable agents. For example, our built-in agents that could be directly plugged in or easily customized for specific use cases were particularly popular. At the same time, there was a desire for more customizability, such as integrating custom agents built using other programming languages or frameworks.
  • Chat-based agent-to-agent communication was an intuitive collaboration pattern, making it easy for developers to get started and involve humans in the loop. As developers began to employ agents in a wider range of scenarios, they sought more flexibility in collaboration patterns. For instance, developers wanted to build predictable, ordered workflows with agents, and integrate them with new user interfaces that are not chat-based.
  • Although it was easy for developers to get started with AutoGen, debugging and scaling agent teams applications proved more challenging.
  • There were many opportunities for improving code quality.

These learnings, along with many others from other agentic efforts across Microsoft, prompted us to take a step back and lay the groundwork for a new direction. A few months ago, we started dedicating time to distilling these learnings into a roadmap for the future of AutoGen. This led to the development of AutoGen 0.4, a complete redesign of the framework from the foundation up. AutoGen 0.4 embraces the actor model of computing to support distributed, highly scalable, event-driven agentic systems. This approach offers many advantages, such as:

  • Composability. Systems designed in this way are more composable, allowing developers to bring their own agents implemented in different frameworks or programming languages and to build more powerful systems using complex agentic patterns.
  • Flexibility. It allows for the creation of both deterministic, ordered workflows and event-driven or decentralized workflows, enabling customers to bring their own orchestration or integrate with other systems more easily. It also opens more opportunities for human-in-the-loop scenarios, both active and reactive.
  • Debugging and Observability. Event-driven communication moves message delivery away from agents to a centralized component, making it easier to observe and debug their activities regardless of agent implementation.
  • Scalability. An event-based architecture enables distributed and cloud-deployed agents, which is essential for building scalable AI services and applications.

Today, we are delighted to share our progress and invite everyone to collaborate with us and provide feedback to evolve AutoGen and help shape the future of multi-agent systems.

As the first step, we are opening this pull request into the main branch with the current state of development of 0.4. After approximately a week, we plan to merge this into main and continue development. There's still a lot left to do before 0.4 is ready for release though, so keep in mind this is a work in progress.

Starting in AutoGen 0.4, the project will have three main libraries:

  • Core - the building blocks for an event-driven agentic system.
  • AgentChat - a task-driven, high-level API built with core, including group chat, code execution, pre-built agents, and more. This is the most similar API to AutoGen 0.2 and will be the easiest API to migrate to.
  • Extensions - implementations of core interfaces and third-party integrations (e.g., Azure code executor and OpenAI model client).

Core

The core API of AutoGen is built following the actor model. It supports asynchronous message passing between agents and event-based workflows. Start here if you are building scalable, event-driven agentic systems. Agents in the core layer handle and produce typed messages, using either direct messaging, which functions like RPC, or via broadcasting to topics, which is pub-sub. Agents can be distributed and implemented in different programming languages, while still communicating with one another.

AgentChat

AgentChat API is task driven and at a high level like AutoGen 0.2. It allows you to define conversational agents, compose them into teams, and then use them to solve tasks. AgentChat itself is built on the core layer, but it abstracts away much of its low-level system concepts. Start here if you just want to focus on multi-agents and workflows while not worrying about scalability and deep integration with existing software. For workflows that don’t fit into the API provided by AgentChat, target just core instead.

Extensions

The extension package contains implementations of the core interfaces using third-party systems, such as OpenAI model client and Azure code executors. Besides the built-in extensions, the package accommodates community-contributed extensions through namespace sub-packages. We are looking forward to seeing your contributions.

AutoGen 0.2

AutoGen 0.2 is still available, developed and maintained out of the 0.2 branch. For everyone looking for a stable version, we recommend continuing to use 0.2 for the time being. It can be installed using:

pip install autogen-agentchat~=0.2

This new package name was used to align with the new packages that will come with 0.4: autogen-core, autogen-agentchat, and autogen-ext.

Lastly, we will be using GitHub Discussion as the official community forum for the new version and, going forward, all discussions related to the AutoGen project. We look forward to meeting you there.

- AutoGen Team

jackgerrits and others added 30 commits August 2, 2024 11:02
* WIP refactor instantiation context

* finish up changes

* Update python/src/agnext/core/_agent_runtime.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* Update python/src/agnext/core/_agent_runtime.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* add warning

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* add Azure Active Directory auth for samples

* Update README
* Validate desc, DRY

* Update python/src/agnext/core/_base_agent.py

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
…323)

* add notebooks for documentation

* Merge remote-tracking branch 'origin/main' into ekzhu-notebooks

* Add install

* Add to checks
* use myst_nb for notebook docs; refactor docs to separate concepts and code tutorial

* Get started tutorial

* fix types
Add gpt-4o-2024-08-06
* Initial work porting webarena to async

* Perhaps resolved some of the eval() issues.
* Doc: multi-agent design pattern

* Fix warnings.

* mypy

* fix type

* chore: Remove unused import and checkpoint code in langgraph_agent.py
* Re-added multimodality to mdconvert.

* Fixed formatting.
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Rename fields in agent metadata

* team one fixes

* another fix
* Revised prompts to match autogen experiments.

* Handle sh code blocks

* Move executor prompt into coder.py

* Fixed formatting.
* add checks for notebooks

* format

* Fix mypy

* format

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* check ledger formatting

* format file

* format file

* rename agent metadata field 'name'-->'type'

---------

Co-authored-by: Enhao Zhang <t-enhaozhang@microsoft.com>
* Add cookbook for openai assistant agent. Reformat

* update index

* add requests

* type requests
Co-authored-by: Kosta Petan <Kosta.Petan@microsoft.com>
* Fixed numerous issues with orchestrator, related to 342'

* Refined prompts, and added max wall-clock time to orchestrators.

* Fixed formatting.
* Remove commented code

* Removed unused code

* Add try except to catch json decode error

---------

Co-authored-by: afourney <adam.fourney@gmail.com>
* Azure container code execution

* fix check errors. Remove unnecessary file

* add TokenProvider class

* update deps

* addressing PR comments

* update docstring

* switch to aiohttp

* fix client timeout
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* update readme

* Add change log
* Python host runtime impl

* update

* ignore proto generated files

* move worker runtime to application

* Move example to samples

* Fix import

* fix

* update

* server client

* better shutdown

* fix doc conf

* add type
* Add proto files and add github action to block PR if changes to proto files required.

* remove action
jackgerrits and others added 23 commits October 4, 2024 10:08
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* remove subscription on client disconnect in worker runtime

* address PR feedback

* remove outdated comment

* remove public properties

* fix mypy issue

* address PR feedback

---------

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
…l events (#3665)

* Move tool to agent; refactor logging in agentchat

* Update notebook
* remove merging primitive from .editorconfig and gitignore

* use file scope namespace

* remove file-scope name

* fix format
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Fixing the HelloWorld sample and some refactoring of .NET code, adding App and Host classes in client and runtime.
* rebase and address PR comments

* address PR feedback
* Selector group chat that uses LLM to select the next speaker

* Merge remote-tracking branch 'origin/staging' into selector-groupchat

* Add allow_repeated_speaker option

* Add test for allowed_repeated_speaker=True

* Example for selector group chat

* format

* Rename and index

* title for notebook

* Merge remote-tracking branch 'origin/staging' into selector-groupchat
* update docs on agent chat.

* add langchain support

* fix formatting issues

* Update python/packages/autogen-core/docs/src/agentchat-user-guide/index.md

Co-authored-by: gagb <gagb@users.noreply.github.com>

* Update python/packages/autogen-core/docs/src/agentchat-user-guide/index.md

Co-authored-by: gagb <gagb@users.noreply.github.com>

* add company reseach and literature review examples with tools

* format fixes

* format and type fixes

* add selector groupchat to agentchat index page

* rename quick start as code exec

* type fixes

* format fix

* Remove blank cell from notebooks

---------

Co-authored-by: gagb <gagb@users.noreply.github.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Set logging of internal messages to debug

* Fix worker runtime tests
* migrate code executor and tests

* update extras

* update dependencies and examples

* fix imports

* fix uv lock

* add code_executor to toctree

---------

Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Style updates for website

* tab styling
* Update PR link in blog post (#3602)

* Update PR link in blog post

* Update index.mdx

* Create CI to tag issues with needs triage (#3605)

* Update issue templates (#3610)

* Update config.yml

* Delete .github/ISSUE_TEMPLATE.md

* Delete .github/ISSUE_TEMPLATE/general_issue.yml

* Update feature_request.yml

* Update feature_request.yml

* Update feature_request.yml

* Update feature_request.yml

* Update bug_report.yml

* Update .github/ISSUE_TEMPLATE/bug_report.yml

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* Update .github/ISSUE_TEMPLATE/config.yml

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* Update bug_report.yml

* Update config.yml

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* termination condition

* Termination condition

* termination condition in group chat manager

* Update module import

* Fix logging

* Clean up

* Fix doc string

---------

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
* add service defaults to Host

* add otel to app host

* ran format

* remove HelloAgents

* moving things around to fit the folder structure/naming conventions


---------

Co-authored-by: Xiaoyun Zhang <bigmiao.zhang@gmail.com>
* Add extension to handle pydantic docs

* Docs tweaks

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Add more FAQs to readme

* Update README.md

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* Update README.md

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* Update README.md

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
* Refactor logging in agentchat

* fix notebook

---------

Co-authored-by: Jack Gerrits <jack@jackgerrits.com>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
@jackgerrits jackgerrits merged commit acb36cc into main Oct 9, 2024
@jackgerrits jackgerrits deleted the staging branch October 9, 2024 19:25
@jackgerrits jackgerrits restored the staging branch October 9, 2024 19:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.