Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Termination condition for agentchat teams #3696

Merged
merged 12 commits into from
Oct 9, 2024
Merged

Conversation

ekzhu
Copy link
Collaborator

@ekzhu ekzhu commented Oct 9, 2024

Resolves #3684

Example usage:

from autogen_agentchat.agents import CodingAssistantAgent, CodeExecutorAgent
from autogen_agentchat.teams import RoundRobinGroupChat, StopMessageTermination

coding_assistant = CodingAssistantAgent("Coding_Assistant", model_client=...)
executor_agent = CodeExecutorAgent("Code_Executor", code_executor=...)
team = RoundRobinGroupChat([coding_assistant, executor_agent])
await team.run("Write a program that prints 'Hello, world!'", termination_condition=StopMessageTermination())

See python/packages/autogen-agentchat/src/autogen_agentchat/teams/_termination.py and python/packages/autogen-agentchat/tests/test_termination_condition.py for other built in termination conditions and how to use them.

jackgerrits and others added 5 commits October 2, 2024 18:41
* Update PR link in blog post

* Update index.mdx
* Update config.yml

* Delete .github/ISSUE_TEMPLATE.md

* Delete .github/ISSUE_TEMPLATE/general_issue.yml

* Update feature_request.yml

* Update feature_request.yml

* Update feature_request.yml

* Update feature_request.yml

* Update bug_report.yml

* Update .github/ISSUE_TEMPLATE/bug_report.yml

Co-authored-by: Eric Zhu <[email protected]>

* Update .github/ISSUE_TEMPLATE/config.yml

Co-authored-by: Eric Zhu <[email protected]>

* Update bug_report.yml

* Update config.yml

---------

Co-authored-by: Eric Zhu <[email protected]>
@ekzhu ekzhu marked this pull request as draft October 9, 2024 00:16
@ekzhu ekzhu marked this pull request as ready for review October 9, 2024 04:57
Copy link
Member

@afourney afourney left a comment

Choose a reason for hiding this comment

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

Wow. This is a lot richer than what I was expecting for a first PR in this space. In any case, I think it looks good -- the team is the component best suited for determining termination.

@ekzhu ekzhu merged commit 64365b6 into staging Oct 9, 2024
27 checks passed
@ekzhu ekzhu deleted the termination-condition branch October 9, 2024 16:26
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.

4 participants