Skip to content

Termination condition for agentchat teams#3696

Merged
ekzhu merged 12 commits into
stagingfrom
termination-condition
Oct 9, 2024
Merged

Termination condition for agentchat teams#3696
ekzhu merged 12 commits into
stagingfrom
termination-condition

Conversation

@ekzhu

@ekzhu ekzhu commented Oct 9, 2024

Copy link
Copy Markdown
Contributor

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 <ekzhu@users.noreply.github.com>

* Update .github/ISSUE_TEMPLATE/config.yml

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

* Update bug_report.yml

* Update config.yml

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
@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

@afourney afourney left a comment

Copy link
Copy Markdown
Member

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
@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