Skip to content

Commit

Permalink
Merge branch 'main' into update_version_040
Browse files Browse the repository at this point in the history
  • Loading branch information
jackgerrits authored Jan 8, 2025
2 parents efc25da + a427b38 commit 93a8806
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 64 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
[
# For main use the workflow target
{ ref: "${{github.ref}}", dest-dir: dev, uv-version: "0.5.13" },
{ ref: "${{github.ref}}", dest-dir: stable, uv-version: "0.5.13" },
{ ref: "v0.4.0.dev0", dest-dir: "0.4.0.dev0", uv-version: "0.5.11" },
{ ref: "v0.4.0.dev1", dest-dir: "0.4.0.dev1", uv-version: "0.5.11" },
{ ref: "v0.4.0.dev2", dest-dir: "0.4.0.dev2", uv-version: "0.5.11" },
Expand Down
2 changes: 1 addition & 1 deletion python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Alternatively, you can run all the checks with:
To create a new package, similar to `autogen-core` or `autogen-chat`, use the following:

```sh
uv sync
uv sync --python 3.12
source .venv/bin/activate
cookiecutter ./templates/new-package/
```
2 changes: 1 addition & 1 deletion python/packages/autogen-agentchat/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# AutoGen AgentChat

- [Documentation](https://microsoft.github.io/autogen/dev/user-guide/agentchat-user-guide/index.html)
- [Documentation](https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/index.html)
2 changes: 1 addition & 1 deletion python/packages/autogen-core/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# AutoGen Core

- [Documentation](https://microsoft.github.io/autogen/dev/user-guide/core-user-guide/index.html)
- [Documentation](https://microsoft.github.io/autogen/stable/user-guide/core-user-guide/index.html)

This file was deleted.

2 changes: 1 addition & 1 deletion python/packages/autogen-core/docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
]
}

html_js_files = ["custom-icon.js", "override-switcher-button.js"]
html_js_files = ["custom-icon.js"]
html_sidebars = {
"packages/index": [],
"user-guide/core-user-guide/**": ["sidebar-nav-bs-core"],
Expand Down
11 changes: 7 additions & 4 deletions python/packages/autogen-core/docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ A framework for building AI agents and applications
<div class="sd-card-title sd-font-weight-bold docutils">

{fas}`book;pst-color-primary`
Magentic-One </div>
Magentic-One [![PyPi magentic-one](https://img.shields.io/badge/PyPi-magentic--one-blue?logo=pypi)](https://pypi.org/project/magentic-one/)
</div>
A multi-agent assistant for web and file-based tasks.
Built on AgentChat.

```bash
% m1 "Find flights from Seattle to Paris and format the result in a table"
pip install magentic-one
m1 "Find flights from Seattle to Paris and format the result in a table"
```

+++
Expand All @@ -72,7 +74,7 @@ Get Started

:::

:::{grid-item-card} {fas}`palette;pst-color-primary` Studio [![PyPi autogenstudio](https://img.shields.io/badge/PyPi-autogen--studio-blue?logo=pypi)](https://pypi.org/project/autogenstudio/)
:::{grid-item-card} {fas}`palette;pst-color-primary` Studio [![PyPi autogenstudio](https://img.shields.io/badge/PyPi-autogenstudio-blue?logo=pypi)](https://pypi.org/project/autogenstudio/)
:shadow: none
:margin: 2 0 0 0
:columns: 12 12 6 6
Expand All @@ -81,7 +83,8 @@ An app for prototyping and managing agents without writing code.
Built on AgentChat.

```bash
% autogenstudio ui --port 8080
pip install autogenstudio
autogenstudio ui --port 8080
```

+++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@
"## Implementing an Agent\n",
"\n",
"To implement an agent, the developer must subclass the {py:class}`~autogen_core.RoutedAgent` class\n",
"and implement the {py:meth}`~autogen_core.RoutedAgent.on_message_impl` method.\n",
"This method is invoked when the agent receives a message. For example,\n",
"and implement a message handler method for each message type the agent is expected to handle using\n",
"the {py:meth}`~autogen_core.message_handler` decorator.\n",
"For example,\n",
"the following agent handles a simple message type `MyMessageType` and prints the message it receives:"
]
},
Expand Down Expand Up @@ -85,7 +86,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This agent only handles `MyMessageType` and messages will be delivered to `handle_my_message_type` method. Developers can have multiple message handlers for different message types by using `@message_handler` decorator and setting the type hint for the `message` variable in the handler function. You can also leverage [python typing union](https://docs.python.org/3/library/typing.html#typing.Union) for the `message` variable in one message handler function if it better suits agent's logic.\n",
"This agent only handles `MyMessageType` and messages will be delivered to `handle_my_message_type` method. Developers can have multiple message handlers for different message types by using {py:meth}`~autogen_core.message_handler` decorator and setting the type hint for the `message` variable in the handler function. You can also leverage [python typing union](https://docs.python.org/3/library/typing.html#typing.Union) for the `message` variable in one message handler function if it better suits agent's logic.\n",
"See the next section on [message and communication](./message-and-communication.ipynb)."
]
},
Expand Down Expand Up @@ -192,17 +193,17 @@
"source": [
"## Running the Single-Threaded Agent Runtime\n",
"\n",
"The above code snippet uses `runtime.start()` to start a background task\n",
"The above code snippet uses {py:meth}`~autogen_core.SingleThreadedAgentRuntime.start` to start a background task\n",
"to process and deliver messages to recepients' message handlers.\n",
"This is a feature of the\n",
"local embedded runtime {py:class}`~autogen_core.SingleThreadedAgentRuntime`.\n",
"\n",
"To stop the background task immediately, use the `stop()` method:"
"To stop the background task immediately, use the {py:meth}`~autogen_core.SingleThreadedAgentRuntime.stop` method:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -216,18 +217,18 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"You can resume the background task by calling `start()` again.\n",
"You can resume the background task by calling {py:meth}`~autogen_core.SingleThreadedAgentRuntime.start` again.\n",
"\n",
"For batch scenarios such as running benchmarks for evaluating agents,\n",
"you may want to wait for the background task to stop automatically when\n",
"there are no unprocessed messages and no agent is handling messages --\n",
"the batch may considered complete.\n",
"You can achieve this by using the `stop_when_idle()` method:"
"You can achieve this by using the {py:meth}`~autogen_core.SingleThreadedAgentRuntime.stop_when_idle` method:"
]
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -240,16 +241,16 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"You can also directly process messages one-by-one without a background task using:"
"To close the runtime and release resources, use the {py:meth}`~autogen_core.SingleThreadedAgentRuntime.close` method:"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"await runtime.process_next()"
"await runtime.close()"
]
},
{
Expand All @@ -276,7 +277,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.11"
"version": "3.11.5"
}
},
"nbformat": 4,
Expand Down
2 changes: 2 additions & 0 deletions python/packages/autogen-ext/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# autogen-ext

[Documentation](https://microsoft.github.io/autogen/stable/user-guide/extensions-user-guide/index.html)

0 comments on commit 93a8806

Please sign in to comment.