Skip to content

Aegis graph docs#6417

Merged
ekzhu merged 20 commits into
microsoft:mainfrom
abhinav-aegis:aegis-graph-docs
Apr 29, 2025
Merged

Aegis graph docs#6417
ekzhu merged 20 commits into
microsoft:mainfrom
abhinav-aegis:aegis-graph-docs

Conversation

@abhinav-aegis
Copy link
Copy Markdown
Contributor

Why are these changes needed?

Related issue number

Checks

Documentation for Graph based workflow. I kept this separate from pull request #6333 so that you can just merge in the code without the documentation changes if needed.

abhinav-aegis and others added 16 commits April 18, 2025 13:43
…_group_chat/_graph/_graph_builder.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
…#6402)

## Why are these changes needed?
*Problem*

Previously, in `DockerCommandLineCodeExecutor`, cancellation tasks were
added directly to `self._cancellation_tasks` using
`asyncio.create_task()`:
```python
self._cancellation_tasks.append(asyncio.create_task(self._kill_running_command(command)))
```
This caused issues when cancellation tasks were created from multiple
event loops, leading to loop mismatch errors during executor shutdown.

*Solution*
This PR fixes the issue by introducing a dedicated internal event loop
for managing cancellation tasks.
Cancellation tasks are now scheduled in a fixed event loop using
`asyncio.run_coroutine_threadsafe()`:
```python
                    future: ConcurrentFuture[None] = asyncio.run_coroutine_threadsafe(
                        self._kill_running_command(command), self._loop
                    )
                    self._cancellation_futures.append(future)
```

*Additional Changes*
- Added detailed logging for easier debugging.
- Ensured clean shutdown of the internal event loop and associated
thread.


*Note*
This change ensures that all cancellation tasks are handled consistently
in a single loop, preventing cross-loop conflicts and improving executor
stability in multi-threaded environments.

## Related issue number

<!-- For example: "Closes microsoft#1234" -->
Closes microsoft#6395 

## Checks

- [ ] 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.

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
…agent (microsoft#6407)

## Why are these changes needed?
Starting from AutoGen v0.5.5, tools are internally managed through
`StaticWorkbench`.
However, both tools and workbench were being serialized and
deserialized, which caused conflicts during deserialization:
	•	When both are restored, the constructor raises:
```
ValueError: Tools cannot be used with a workbench.
```

The changes address this issue by:
1.	Removing tools from serialization/deserialization:
• tools are now considered internal state of `StaticWorkbench`, and are
no longer serialized.
• Only workbench is serialized, ensuring consistency and avoiding
duplication.
2.	Ensuring logical integrity:
• Since tools are not used directly after initialization, persisting
them separately serves no functional purpose.
• This avoids scenarios where both are populated, violating constructor
constraints.

Summary:

This change prevents tools/workbench conflicts by fully delegating tool
management to `StaticWorkbench` and avoiding unnecessary persistence of
tools themselves.


<!-- Please give a short summary of the change and the problem this
solves. -->

## Related issue number

Closes microsoft#6405 

## Checks

- [ ] 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.

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
## Why are these changes needed?

Anthropic models are supported by AWS bedrock. ChatCompletionClient can
be created for anthropic bedrock models using this changes. This enables
the user to do the following
- Add any anthropic models and version from AWS bedrock
- Can use ChatCompletionClient for bedrock anthropic models

## Related issue number
Closes microsoft#5226

---------

Co-authored-by: harini.narasimhan <harini.narasimhan@eagleview.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
## Why are these changes needed?

Add missing dependency to tracing docs

<!-- Please give a short summary of the change and the problem this
solves. -->

## Related issue number

<!-- For example: "Closes microsoft#1234" -->

Closes microsoft#6419

## Checks

- [ ] 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.
- [ ] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [ ] I've made sure all auto checks have passed.
Copy link
Copy Markdown
Contributor

@ekzhu ekzhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I revised the user guide

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.54%. Comparing base (9f8e892) to head (5de4f88).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6417   +/-   ##
=======================================
  Coverage   78.54%   78.54%           
=======================================
  Files         225      225           
  Lines       16521    16521           
=======================================
  Hits        12976    12976           
  Misses       3545     3545           
Flag Coverage Δ
unittests 78.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ekzhu ekzhu merged commit bfdf816 into microsoft:main Apr 29, 2025
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants