Go to file
Leonardo Pinheiro 6cfa29b018 Add langchain tool adapter in autogen-ext (#570)
* add langhcain tool adapter

* remove langchain package

* fix type errors

* test type fixes

* fix imports

* install extras in CI

* improve typing and use to_thread

* pin min langchain version

* install all extras in ci test

* update to langchain 0.3.1

* install extras in CI

* ignore pyright errors

* add missing uv sync extra reqs

---------

Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-09-30 19:36:20 -04:00
.devcontainer Merge work in progress autogen 0.4 to main 2024-09-30 10:15:34 -04:00
.github Add langchain tool adapter in autogen-ext (#570) 2024-09-30 19:36:20 -04:00
docs/design Update references (#657) 2024-09-28 04:01:08 +00:00
dotnet Merge dotnet conflict (#3) 2024-09-30 19:32:48 -04:00
protos Rysweet dotnet refactor (#624) 2024-09-24 09:26:30 -07:00
python Add langchain tool adapter in autogen-ext (#570) 2024-09-30 19:36:20 -04:00
.gitattributes Fix lfs 2024-09-30 15:50:28 -04:00
.gitignore Merge work in progress autogen 0.4 to main 2024-09-30 10:15:34 -04:00
CITATION.cff Update CITATION.cff (#3427) 2024-08-27 07:02:18 +00:00
CODE_OF_CONDUCT.md CODE_OF_CONDUCT.md committed 2023-08-18 04:43:48 -07:00
CONTRIBUTING.md Rysweet contibruting.md (#460) 2024-09-11 17:40:16 -04:00
CONTRIBUTORS.md Add missing contributors (#3426) 2024-08-27 17:31:22 +00:00
LICENSE cleanup 2023-09-19 12:38:26 +00:00
LICENSE-CODE LICENSE-CODE committed 2023-08-18 04:43:49 -07:00
README.md Merge work in progress autogen 0.4 to main 2024-09-30 10:15:34 -04:00
SECURITY.md Merge work in progress autogen 0.4 to main 2024-09-30 10:15:34 -04:00
SUPPORT.md Merge work in progress autogen 0.4 to main 2024-09-30 10:15:34 -04:00
TRANSPARENCY_FAQS.md Merge work in progress autogen 0.4 to main 2024-09-30 10:15:34 -04:00

README.md

AutoGen Logo

PyPI version NuGet version Twitter

AutoGen

AutoGen is an open-source framework for building AI agent systems. It simplifies the creation of event-driven, distributed, scalable, and resilient AI applications. Using AutoGen, you can quickly build systems where AI agents collaborate and perform tasks autonomously or with human oversight.

AutoGen streamlines AI development and research, enabling the use of multiple large language models (LLMs), integrated tools, and advanced multi-agent design patterns. You can develop and test your agent systems locally, then seamlessly deploy to a distributed cloud environment as your needs grow.

🔥 September 18, 2024: AutoGen 0.5 is a new architecture for AutoGen! This new version is in preview release and being developed in the open over the next several weeks as we refine the documentation, samples, and work with our users on evolving this new version. 🚀

  • AutoGen 0.5 represents a rearchitecutre of the system to make it more scalable, resilient, and interoperable across multiple programming languages.
  • It is designed to be more modular and extensible, with a focus on enabling a wide range of applications and use cases.
  • This redesign features full .NET and Python libraries, with more languages to come. Agents may be written in different languages and interoperate with one another over a common messaging protocol using the CloudEvents standard.

Install

Python

AutoGen requires Python 3.10+. It has multiple packages.

pip install autogen-agentchat autogen-core autogen-ext

See packages for more information about available packages.

.NET

(Add .NET installation instruction here)

↑ Back to Top ↑

Quickstart

Python

import asyncio
import os
from autogen_core.components.models import chat_completion_client_from_json as client_from_json
from autogen_agentchat import CodingAssistant, CodeExecutorAgent, RoundRobinTeam, console_output
from autogen_ext.code_executors import DockerCommandLineCodeExecutor

async def main():
    chat_completion_client = client_from_json(os.environ["MODEL_CLIENT_JSON"])
    async with DockerCommandLineCodeExecutor(work_dir="coding") as executor:
        assistant = CodingAssistant("assistant", chat_completion_client=chat_completion_client)
        executor_agent = CodeExecutorAgent(
            "code_executor", executor=executor,
        )
        team = RoundRobinTeam(agents=[assistant, executor_agent])
        result = await team.run("Plot a chart of NVDA and TESLA stock price change YTD. Save the plot to a file called plot.png", output=console_output)

if __name__ == "__main__":
    asyncio.run(main())

C#

(Add .NET quickstart here)

↑ Back to Top ↑

Using AutoGen

The version you are looking at is AutoGen 0.5, which introduces a new architecture. The best place to start is the documentation.

The new architecture provides the following features:

  • Asynchronous Messaging: Agents communicate via asynchronous messages, supporting both event-driven and request/response interaction patterns.
  • Scalable & Distributed: Design complex, distributed agent networks that can operate across organizational boundaries.
  • Modular & Extensible: Customize your system with pluggable components, including custom agents, memory services, tool registries, and model libraries.
  • Cross-Language Support: Interoperate agents across different programming languages. Currently supports Python and .NET, with more languages coming soon.
  • Observability & Debugging: Built-in tools for tracking, tracing, and debugging agent interactions and workflows.

We are actively developing this new architecture, but we are excited to share our progress with you. We are looking for your feedbacks and contributions to help shape the future of AutoGen.

The current stable release is AutoGen 0.2. You can find the documentation here.

↑ Back to Top ↑

Roadmap

  • [AutoGen 0.2] - This is the current stable release of AutoGen. We will continue to accept bug fixes and minor enhancements to this version.
  • [AutoGen 0.5] - This is the first release of the new event-driven architecture. This release is still in preview. We will be focusing on stability of the interfaces, documentation, tutorials, samples, and a collection of base agents from which you can inherit. We are also working on compatibility interfaces for those familiar with prior versions of AutoGen.
  • [future] - We are excited to work with our community to define the future of AutoGen. We are looking for feedback and contributions to help shape the future of this project.Here are some major planned items:
    • Add support for more languages
    • Add support for more base agents and patterns
    • Add compatibility with Bot Framework Activity Protocol

↑ Back to Top ↑

FAQs

Q: What is AutoGen 0.5?

AutoGen 0.5 is a rewrite of AutoGen from the ground up to create a more robust, scalable, easier to use, cross-language library for building AI Agents.

Q: Why these changes?

We listened to our AutoGen users, learned from what was working, and adapted to fix what wasn't. We brought together wide ranging teams working on many different types of AI Agents and collaborated to design an improved framework with a more flexible programming model and better scalability.

Q: Who should use it?

This code is still experimental. We encourage adventurous early adopters to please try it out, give us feedback, and contribute.

Q: I'm using AutoGen 0.2, should I upgrade?

If you consider yourself an early adopter, you are comfortable making some changes to your code, and are willing to try it out, then yes.

Q: How do I still use AutoGen 0.2?

Just keep doing what you were doing before.

Q: How do I migrate?

We are working on a migration guide. Until then, see the documentation.

Q: What is happening next? When will this release be ready?

We are still working on improving the documentation, samples, and enhancing the code. We will prepare a release announcement when these things are completed in the next few weeks.

Q: What is the history of this project?

The rearchitecture of AutoGen came from multiple Microsoft teams coming together to build the next generation of AI agent framework - merging ideas from several predecessor projects. The team decided to bring this work to OSS as an evolution of AutoGen in September 2024. Prior to that, AutoGen has been developed and maintained by a community of contributors.

Q: What is the official channel for support?

Use GitHub Issues for bug reports and feature requests. Use GitHub Discussions for general questions and discussions.

↑ Back to Top ↑

Microsoft and any contributors grant you a license to the Microsoft documentation and other content in this repository under the Creative Commons Attribution 4.0 International Public License, see the LICENSE file, and grant you a license to any code in the repository under the MIT License, see the LICENSE-CODE file.

Microsoft, Windows, Microsoft Azure, and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.

Privacy information can be found at https://go.microsoft.com/fwlink/?LinkId=521839

Microsoft and any contributors reserve all other rights, whether under their respective copyrights, patents, or trademarks, whether by implication, estoppel, or otherwise.

↑ Back to Top ↑