Zen 9b8dc8d707
add activation group for workflow with multiple cycles (#6711)
## Why are these changes needed?
1. problem
When the GraphFlowManager encounters cycles, it tracks remaining
indegree counts for the node's activation. However, this tracking
mechanism has a flaw when dealing with cycles. When a node first enters
a cycle, the GraphFlowManager evaluates all remaining incoming edges,
including those that loop back to the origin node. If the activation
prerequisites are not satisfied at that moment, the workflow will
eventually finish because the _remaining counter never reaches zero,
preventing the select_speaker() method from selecting any agents for
execution.
2. solution
change activation map to 2 layer for ditinguish remaining inside
different cycle and outside the cycle.
add a activation group and policy property for edge, compute the
remaining map when GraphFlowManager is init and check the remaining map
with activation group to avoid checking the loop back edges
<!-- Please give a short summary of the change and the problem this
solves. -->

## Related issue number

#6710

## Checks

- [x] I've included any doc changes needed for
<https://microsoft.github.io/autogen/>. See
<https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to
build and test documentation locally.
- [x] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [x] I've made sure all auto checks have passed.
2025-06-25 12:20:04 +08:00
..

Building the AutoGen Documentation

AutoGen documentation is based on the sphinx documentation system and uses the myst-parser to render markdown files. It uses the pydata-sphinx-theme to style the documentation.

Prerequisites

Ensure you have all of the dev dependencies for the autogen-core package installed. You can install them by running the following command from the root of the python repository:

uv sync
source .venv/bin/activate

Building Docs

To build the documentation, run the following command from the root of the python repository:

poe --directory ./packages/autogen-core/ docs-build

To serve the documentation locally, run the following command from the root of the python repository:

poe --directory ./packages/autogen-core/ docs-serve

[!NOTE] Sphinx will only rebuild files that have changed since the last build. If you want to force a full rebuild, you can delete the ./packages/autogen-core/docs/build directory before running the docs-build command.

Versioning the Documentation

The current theme - pydata-sphinx-theme - supports switching between versions of the documentation.

To version the documentation, you need to create a new version of the documentation by copying the existing documentation to a new directory with the version number. For example, to create a new version of the documentation for version 0.1.0, you would run the following command:

How are various versions built? - TBD.