Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New AutoGen Architecture Preview #3600

Merged
merged 610 commits into from
Oct 9, 2024
Merged

New AutoGen Architecture Preview #3600

merged 610 commits into from
Oct 9, 2024

Conversation

jackgerrits
Copy link
Member

@jackgerrits jackgerrits commented Oct 2, 2024

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 <[email protected]>

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

Co-authored-by: Eric Zhu <[email protected]>

* add warning

---------

Co-authored-by: Eric Zhu <[email protected]>
* 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 <[email protected]>
…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.
* 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 <[email protected]>
* check ledger formatting

* format file

* format file

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

---------

Co-authored-by: Enhao Zhang <[email protected]>
* Add cookbook for openai assistant agent. Reformat

* update index

* add requests

* type requests
* 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 <[email protected]>
* 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
* 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
* 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 <[email protected]>
…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
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 <[email protected]>

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

Co-authored-by: gagb <[email protected]>

* 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 <[email protected]>
Co-authored-by: Eric Zhu <[email protected]>
* 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 <[email protected]>
Co-authored-by: Eric Zhu <[email protected]>
* 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 <[email protected]>

* Update .github/ISSUE_TEMPLATE/config.yml

Co-authored-by: Eric Zhu <[email protected]>

* Update bug_report.yml

* Update config.yml

---------

Co-authored-by: Eric Zhu <[email protected]>

* 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 <[email protected]>
* 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 <[email protected]>
* Add extension to handle pydantic docs

* Docs tweaks

---------

Co-authored-by: Eric Zhu <[email protected]>
* Add more FAQs to readme

* Update README.md

Co-authored-by: Eric Zhu <[email protected]>

* Update README.md

Co-authored-by: Eric Zhu <[email protected]>

* Update README.md

---------

Co-authored-by: Eric Zhu <[email protected]>
Co-authored-by: Ryan Sweet <[email protected]>
* Refactor logging in agentchat

* fix notebook

---------

Co-authored-by: Jack Gerrits <[email protected]>
Co-authored-by: Jack Gerrits <[email protected]>
@jackgerrits jackgerrits merged commit acb36cc into main Oct 9, 2024
49 of 54 checks passed
@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.