mirror of
https://github.com/microsoft/autogen.git
synced 2025-12-30 00:30:23 +00:00
Minor Updates to AGS Docs (#5010)
* update docs * update docs * update ags documentation * update uv lock * update usage
This commit is contained in:
parent
115fefa132
commit
9f351c50ff
21
README.md
21
README.md
@ -7,6 +7,7 @@
|
||||
[](https://www.linkedin.com/company/105812540)
|
||||
[](https://aka.ms/autogen-discord)
|
||||
[](https://microsoft.github.io/autogen/)
|
||||
|
||||
</div>
|
||||
|
||||
# AutoGen
|
||||
@ -74,13 +75,13 @@ asyncio.run(main())
|
||||
|
||||
The AutoGen ecosystem provides everything you need to create AI agents, especially multi-agent workflows -- framework, developer tools, and applications.
|
||||
|
||||
The *framework* uses a layered and extensible design. Layers have clearly divided responsibilities and build on top of layers below. This design enables you to use the framework at different levels of abstraction, from high-level APIs to low-level components.
|
||||
The _framework_ uses a layered and extensible design. Layers have clearly divided responsibilities and build on top of layers below. This design enables you to use the framework at different levels of abstraction, from high-level APIs to low-level components.
|
||||
|
||||
- [Core API](./python/packages/autogen-core/) implements message passing, event-driven agents, and local and distributed runtime for flexibility and power. It also support cross-language support for .NET and Python.
|
||||
- [AgentChat API](./python/packages/autogen-agentchat/) implements a simpler but opinionated API rapid for prototyping. This API is built on top of the Core API and is closest to what users of v0.2 are familiar with and supports familiar multi-agent patterns such as two-agent chat or group chats.
|
||||
- [Extensions API](./python/packages/autogen-ext/) enables first- and third-party extensions continuously expanding framework capabilities. It support specific implementation of LLM clients (e.g., OpenAI, AzureOpenAI), and capabilities such as code execution.
|
||||
|
||||
The ecosystem also supports two essential *developer tools*:
|
||||
The ecosystem also supports two essential _developer tools_:
|
||||
|
||||
<div align="center">
|
||||
<img src="https://media.githubusercontent.com/media/microsoft/autogen/refs/heads/main/python/packages/autogen-studio/docs/ags_screen.png" alt="AutoGen Studio Screenshot" width="500">
|
||||
@ -97,17 +98,17 @@ With AutoGen you get to join and contribute to a thriving ecosystem. We host wee
|
||||
|
||||
<div align="center">
|
||||
|
||||
| | [](./python) | [](./dotnet) | [](./python/packages/autogen-studio) |
|
||||
|----------------------|--------------------------------------------------------------------------------------------|-------------------|-------------------|
|
||||
| Installation | [](https://microsoft.github.io/autogen/dev/user-guide/agentchat-user-guide/installation.html) | * | [](https://microsoft.github.io/autogen/dev/user-guide/autogenstudio-user-guide/installation.html) |
|
||||
| Quickstart | [](https://microsoft.github.io/autogen/dev/user-guide/agentchat-user-guide/quickstart.html#) | * | * |
|
||||
| Tutorial | [](https://microsoft.github.io/autogen/dev/user-guide/agentchat-user-guide/tutorial/models.html) | *| * |
|
||||
| API Reference | [](https://microsoft.github.io/autogen/dev/reference/index.html#) | * | [](https://microsoft.github.io/autogen/dev/user-guide/autogenstudio-user-guide/usage.html) |
|
||||
| Packages | [](https://pypi.org/project/autogen-core/) <br> [](https://pypi.org/project/autogen-agentchat/) <br> [](https://pypi.org/project/autogen-ext/) | * | [](https://pypi.org/project/autogenstudio/) |
|
||||
| | [](./python) | [](./dotnet) | [](./python/packages/autogen-studio) |
|
||||
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Installation | [](https://microsoft.github.io/autogen/dev/user-guide/agentchat-user-guide/installation.html) | \* | [](https://microsoft.github.io/autogen/dev/user-guide/autogenstudio-user-guide/installation.html) |
|
||||
| Quickstart | [](https://microsoft.github.io/autogen/dev/user-guide/agentchat-user-guide/quickstart.html#) | \* | [](https://microsoft.github.io/autogen/dev/user-guide/autogenstudio-user-guide/usage.html#) |
|
||||
| Tutorial | [](https://microsoft.github.io/autogen/dev/user-guide/agentchat-user-guide/tutorial/models.html) | \* | [](https://microsoft.github.io/autogen/dev/user-guide/autogenstudio-user-guide/usage.html#) |
|
||||
| API Reference | [](https://microsoft.github.io/autogen/dev/reference/index.html#) | \* | [](https://microsoft.github.io/autogen/dev/user-guide/autogenstudio-user-guide/usage.html) |
|
||||
| Packages | [](https://pypi.org/project/autogen-core/) <br> [](https://pypi.org/project/autogen-agentchat/) <br> [](https://pypi.org/project/autogen-ext/) | \* | [](https://pypi.org/project/autogenstudio/) |
|
||||
|
||||
</div>
|
||||
|
||||
**Releasing soon*
|
||||
\*_Releasing soon_
|
||||
|
||||
Interested in contributing? See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines on how to get started. We welcome contributions of all kinds, including bug fixes, new features, and documentation improvements. Join our community and help us make AutoGen better!
|
||||
|
||||
|
||||
@ -49,15 +49,6 @@ AutoGen Studio offers four main interfaces to help you build and manage multi-ag
|
||||
- Setup and test endpoints based on a team configuration
|
||||
- Run teams in a docker container
|
||||
|
||||
This revision improves clarity by:
|
||||
|
||||
- Organizing capabilities into clearly numbered sections
|
||||
- Using more precise language
|
||||
- Breaking down complex features into digestible points
|
||||
- Maintaining consistent formatting and structure
|
||||
- Eliminating awkward phrasing and grammatical issues
|
||||
- Adding context about how each interface serves users
|
||||
|
||||
### Roadmap
|
||||
|
||||
Review project roadmap and issues [here](https://github.com/microsoft/autogen/issues/4006) .
|
||||
|
||||
@ -9,35 +9,83 @@ myst:
|
||||
|
||||
There are two ways to install AutoGen Studio - from PyPi or from source. We **recommend installing from PyPi** unless you plan to modify the source code.
|
||||
|
||||
1. **Install from PyPi**
|
||||
## Create a Virtual Environment (Recommended)
|
||||
|
||||
We recommend using a virtual environment (e.g., conda) to avoid conflicts with existing Python packages. With Python 3.10 or newer active in your virtual environment, use pip to install AutoGen Studio:
|
||||
We recommend using a virtual environment as this will ensure that the dependencies for AutoGen Studio are isolated from the rest of your system.
|
||||
|
||||
```bash
|
||||
pip install -U autogenstudio
|
||||
```
|
||||
``````{tab-set}
|
||||
|
||||
2. **Install from Source**
|
||||
`````{tab-item} venv
|
||||
|
||||
> Note: This approach requires some familiarity with building interfaces in React.
|
||||
Create and activate:
|
||||
|
||||
If you prefer to install from source, ensure you have Python 3.10+ and Node.js (version above 14.15.0) installed. Here's how you get started:
|
||||
```bash
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
```
|
||||
|
||||
- Clone the AutoGen Studio repository and install its Python dependencies:
|
||||
To deactivate later, run:
|
||||
|
||||
```bash
|
||||
pip install -e .
|
||||
```
|
||||
```bash
|
||||
deactivate
|
||||
```
|
||||
|
||||
- Navigate to the `samples/apps/autogen-studio/frontend` directory, install dependencies, and build the UI:
|
||||
`````
|
||||
|
||||
```bash
|
||||
npm install -g gatsby-cli
|
||||
npm install --global yarn
|
||||
cd frontend
|
||||
yarn install
|
||||
yarn build
|
||||
```
|
||||
`````{tab-item} conda
|
||||
|
||||
[Install Conda](https://docs.conda.io/projects/conda/en/stable/user-guide/install/index.html) if you have not already.
|
||||
|
||||
|
||||
Create and activate:
|
||||
|
||||
```bash
|
||||
conda create -n autogen python=3.10
|
||||
conda activate autogen
|
||||
```
|
||||
|
||||
To deactivate later, run:
|
||||
|
||||
```bash
|
||||
conda deactivate
|
||||
```
|
||||
|
||||
|
||||
`````
|
||||
|
||||
|
||||
|
||||
``````
|
||||
|
||||
## Install Using pip (Recommended)
|
||||
|
||||
You can install AutoGen Studio using pip, the Python package manager.
|
||||
|
||||
```bash
|
||||
pip install -U autogenstudio
|
||||
```
|
||||
|
||||
### Install from Source\*\*
|
||||
|
||||
> Note: This approach requires some familiarity with building interfaces in React.
|
||||
|
||||
If you prefer to install from source, ensure you have Python 3.10+ and Node.js (version above 14.15.0) installed. Here's how you get started:
|
||||
|
||||
- Clone the AutoGen Studio repository and install its Python dependencies:
|
||||
|
||||
```bash
|
||||
pip install -e .
|
||||
```
|
||||
|
||||
- Navigate to the `samples/apps/autogen-studio/frontend` directory, install dependencies, and build the UI:
|
||||
|
||||
```bash
|
||||
npm install -g gatsby-cli
|
||||
npm install --global yarn
|
||||
cd frontend
|
||||
yarn install
|
||||
yarn build
|
||||
```
|
||||
|
||||
For Windows users, to build the frontend, you may need alternative commands to build the frontend.
|
||||
|
||||
@ -47,7 +95,7 @@ For Windows users, to build the frontend, you may need alternative commands to b
|
||||
|
||||
```
|
||||
|
||||
### Running the Application
|
||||
## Running the Application
|
||||
|
||||
Once installed, run the web UI by entering the following in a terminal:
|
||||
|
||||
@ -62,8 +110,8 @@ AutoGen Studio also takes several parameters to customize the application:
|
||||
- `--host <host>` argument to specify the host address. By default, it is set to `localhost`.
|
||||
- `--appdir <appdir>` argument to specify the directory where the app files (e.g., database and generated user files) are stored. By default, it is set to the a `.autogenstudio` directory in the user's home directory.
|
||||
- `--port <port>` argument to specify the port number. By default, it is set to `8080`.
|
||||
- `--upgrade-database` argument to upgrade the database schema (assuming there are changes in the version you are installing). By default, it is set to `False`.
|
||||
- `--upgrade-database` argument to force-upgrade it's internal database schema (assuming there are changes in the version you are installing). By default, it is set to `False`.
|
||||
- `--reload` argument to enable auto-reloading of the server when changes are made to the code. By default, it is set to `False`.
|
||||
- `--database-uri` argument to specify the database URI. Example values include `sqlite:///database.sqlite` for SQLite and `postgresql+psycopg://user:password@localhost/dbname` for PostgreSQL. If this is not specified, the database URI defaults to a `database.sqlite` file in the `--appdir` directory.
|
||||
- `--database-uri` argument to specify the database URI. Example values include `sqlite:///database.sqlite` for SQLite and `postgresql+psycopg://user:password@localhost/dbname` for PostgreSQL. If this is not specified, the database URI defaults to a `autogen.db` file in the `--appdir` directory.
|
||||
|
||||
Now that you have AutoGen Studio installed and running, you are ready to explore its capabilities, including defining and modifying agent workflows, interacting with agents and sessions, and expanding agent skills.
|
||||
|
||||
@ -7,51 +7,103 @@ myst:
|
||||
|
||||
# Usage
|
||||
|
||||
The expected usage behavior is that developers use the provided Team Builder interface to to define teams - create agents, attach tools and models to agents, and define termination conditions. Once the team is defined, users can run the team in the Playground to interact with the team to accomplish tasks.
|
||||
AutoGen Studio provides a Team Builder interface where developers can define multiple components and behaviors. Users can create teams, add agents to teams, attach tools and models to agents, and define team termination conditions.
|
||||
After defining a team, users can test it in the Playground view to accomplish various tasks through direct interaction.
|
||||
|
||||

|
||||
|
||||
## Declarative Specification of Componenents
|
||||
|
||||
AutoGen Studio uses a declarative specification system to build its GUI components. At runtime, the AGS API loads these specifications into AutoGen AgentChat objects to address tasks.
|
||||
|
||||
Here's an example of a declarative team specification:
|
||||
|
||||
```json
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"component_type": "team",
|
||||
"name": "sample_team",
|
||||
"participants": [
|
||||
{
|
||||
"component_type": "agent",
|
||||
"name": "assistant_agent",
|
||||
"agent_type": "AssistantAgent",
|
||||
"system_message": "You are a helpful assistant. Solve tasks carefully. When done respond with TERMINATE",
|
||||
"model_client": {
|
||||
"component_type": "model",
|
||||
"model": "gpt-4o-2024-08-06",
|
||||
"model_type": "OpenAIChatCompletionClient"
|
||||
},
|
||||
"tools": []
|
||||
}
|
||||
],
|
||||
"team_type": "RoundRobinGroupChat",
|
||||
"termination_condition": {
|
||||
"component_type": "termination",
|
||||
"termination_type": "MaxMessageTermination",
|
||||
"max_messages": 3
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This example shows a team with a single agent, using the `RoundRobinGroupChat` type and a `MaxMessageTermination` condition limited to 3 messages.
|
||||
|
||||
```{note}
|
||||
Work is currently in progress to make the entire AgentChat API declarative. This will allow all agentchat components to be `dumped` into the same declarative specification format used by AGS.
|
||||
```
|
||||
|
||||
## Building an Agent Team
|
||||
|
||||
AutoGen Studio is tied very closely with all of the component abstractions provided by AutoGen AgentChat. This includes - {py:class}`~autogen_agentchat.teams`, {py:class}`~autogen_agentchat.agents`, {py:class}`~autogen_core.models`, {py:class}`~autogen_core.tools`, termination {py:class}`~autogen_agentchat.conditions`.
|
||||
<div style="padding:58.13% 0 0 0;position:relative; border-radius:5px; border-bottom:10px"><iframe src="https://player.vimeo.com/video/1043133833?badge=0&autopause=0&player_id=0&app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture; clipboard-write; encrypted-media" style="position:absolute;top:0;left:0;width:100%;height:100%;" title="AutoGen Studio v0.4x - Drag and Drop Interface"></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>
|
||||
|
||||
Users can define these components in the Team Builder interface either via a declarative specification or by dragging and dropping components from a component library.
|
||||
<br/>
|
||||
|
||||
AutoGen Studio integrates closely with all component abstractions provided by AutoGen AgentChat, including {py:class}`~autogen_agentchat.teams`, {py:class}`~autogen_agentchat.agents`, {py:class}`~autogen_core.models`, {py:class}`~autogen_core.tools`, and termination {py:class}`~autogen_agentchat.conditions`.
|
||||
|
||||
The Team Builder interface allows users to define components through either declarative specification or drag-and-drop functionality:
|
||||
|
||||
Team Builder Operations:
|
||||
|
||||
- Create a new team
|
||||
- Edit Team JSON directly (toggle visual builder mode off) or
|
||||
- Use the visual builder, drag-and-drop components from the library:
|
||||
- Teams: Add agents and termination conditions
|
||||
- Agents: Add models and tools
|
||||
- Save team configurations
|
||||
|
||||
Component Library Management:
|
||||
|
||||
- Create new galleries via Gallery -> New Gallery
|
||||
- Edit gallery JSON as needed
|
||||
- Set a **default** gallery (click pin icon in sidebar) to make components available in Team Builder
|
||||
|
||||
## Interactively Running Teams
|
||||
|
||||
AutoGen Studio Playground allows users to interactively test teams on tasks and review resulting artifacts (such as images, code, and text).
|
||||
The AutoGen Studio Playground enables users to:
|
||||
|
||||
Users can also review the “inner monologue” of team as they address tasks, and view profiling information such as costs associated with the run (such as number of turns, number of tokens etc.), and agent actions (such as whether tools were called and the outcomes of code execution).
|
||||
- Test teams on specific tasks
|
||||
- Review generated artifacts (images, code, text)
|
||||
- Monitor team "inner monologue" during task execution
|
||||
- View performance metrics (turn count, token usage)
|
||||
- Track agent actions (tool usage, code execution results)
|
||||
|
||||
## Importing and Reusing Team Configurations
|
||||
|
||||
AutoGen Studio provides a Gallery view which provides a built-in default gallery. A Gallery is simply is a collection of components - teams, agents, models tools etc. Furthermore, users can import components from 3rd party community sources either by providing a URL to a JSON Gallery spec or pasting in the gallery JSON. This allows users to reuse and share team configurations with others.
|
||||
AutoGen Studio's Gallery view offers a default component collection and supports importing external configurations:
|
||||
|
||||
- Gallery -> New Gallery -> Import
|
||||
- Set as default gallery (in side bar, by clicking pin icon)
|
||||
- Reuse components in Team Builder. Team Builder -> Sidebar -> From Gallery
|
||||
- Create/Import galleries through Gallery -> New Gallery -> Import
|
||||
- Set default galleries via sidebar pin icon
|
||||
- Access components in Team Builder through Sidebar -> From Gallery
|
||||
|
||||
### Using AutoGen Studio Teams in a Python Application
|
||||
### Python Integration
|
||||
|
||||
An exported team can be easily integrated into any Python application using the `TeamManager` class with just two lines of code. Underneath, the `TeamManager` rehydrates the team specification into AutoGen AgentChat agents that are subsequently used to address tasks.
|
||||
Team configurations can be integrated into Python applications using the `TeamManager` class:
|
||||
|
||||
```python
|
||||
|
||||
from autogenstudio.teammanager import TeamManager
|
||||
|
||||
tm = TeamManager()
|
||||
result_stream = tm.run(task="What is the weather in New York?", team_config="team.json") # or wm.run_stream(..)
|
||||
|
||||
result_stream = tm.run(task="What is the weather in New York?", team_config="team.json") # or wm.run_stream(..)
|
||||
```
|
||||
|
||||
To export a team configuration, click on the export button in the Team Builder interface. This will generate a JSON file that can be used to rehydrate the team in a Python application.
|
||||
|
||||
<!-- ### Deploying AutoGen Studio Teams as APIs
|
||||
|
||||
The team can be launched as an API endpoint from the command line using the autogenstudio commandline tool.
|
||||
|
||||
```bash
|
||||
autogenstudio serve --team=team.json --port=5000
|
||||
```
|
||||
|
||||
Similarly, the team launch command above can be wrapped into a Dockerfile that can be deployed on cloud services like Azure Container Apps or Azure Web Apps. -->
|
||||
To export team configurations, use the export button in Team Builder to generate a JSON file for Python application use.
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
# AutoGen Studio
|
||||
|
||||
[](https://badge.fury.io/py/autogenstudio)
|
||||
[](https://pepy.tech/project/autogenstudio)
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
AutoGen Studio is an AutoGen-powered AI app (user interface) to help you rapidly prototype AI agents, enhance them with skills, compose them into workflows and interact with them to accomplish tasks. It is built on top of the [AutoGen](https://microsoft.github.io/autogen) framework, which is a toolkit for building AI agents.
|
||||
|
||||
|
||||
BIN
python/packages/autogen-studio/docs/ags_screen.png
(Stored with Git LFS)
BIN
python/packages/autogen-studio/docs/ags_screen.png
(Stored with Git LFS)
Binary file not shown.
@ -35,7 +35,8 @@ dependencies = [
|
||||
"pyyaml",
|
||||
"autogen-core==0.4.0",
|
||||
"autogen-agentchat==0.4.0",
|
||||
"autogen-ext[magentic-one]==0.4.0"
|
||||
"autogen-ext[magentic-one]==0.4.0",
|
||||
"azure-identity",
|
||||
]
|
||||
optional-dependencies = {web = ["fastapi", "uvicorn"], database = ["psycopg"]}
|
||||
|
||||
|
||||
2
python/uv.lock
generated
2
python/uv.lock
generated
@ -660,6 +660,7 @@ dependencies = [
|
||||
{ name = "autogen-agentchat" },
|
||||
{ name = "autogen-core" },
|
||||
{ name = "autogen-ext", extra = ["magentic-one"] },
|
||||
{ name = "azure-identity" },
|
||||
{ name = "fastapi" },
|
||||
{ name = "loguru" },
|
||||
{ name = "numpy" },
|
||||
@ -690,6 +691,7 @@ requires-dist = [
|
||||
{ name = "autogen-agentchat", editable = "packages/autogen-agentchat" },
|
||||
{ name = "autogen-core", editable = "packages/autogen-core" },
|
||||
{ name = "autogen-ext", extras = ["magentic-one"], editable = "packages/autogen-ext" },
|
||||
{ name = "azure-identity" },
|
||||
{ name = "fastapi" },
|
||||
{ name = "fastapi", marker = "extra == 'web'" },
|
||||
{ name = "loguru" },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user