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

TextMessageTermination Condition #5732

Open
1 task done
ekzhu opened this issue Feb 26, 2025 · 6 comments · May be fixed by #5742
Open
1 task done

TextMessageTermination Condition #5732

ekzhu opened this issue Feb 26, 2025 · 6 comments · May be fixed by #5742
Assignees
Milestone

Comments

@ekzhu
Copy link
Collaborator

ekzhu commented Feb 26, 2025

Confirmation

  • I confirm that I am a maintainer and so can use this template. If I am not, I understand this issue will be closed and I will be asked to use a different template.

Issue body

A termination condition that stops the team when a TextMessage is emitted from a specific source, or any source.

For example, to terminate when a specific agent produced a TextMessage:

TextMessageTermination(source="assistant")

To terminate when any agent produced a TextMessage

TextMessageTermination()

For example

assistant = AssistantAgent(...)
team = RoundRobinGroupChat([assistant], termination_condition=TextMessageTermination())
result = team.run(...)

As part of this issue, also update the documentation:

@EItanya
Copy link
Contributor

EItanya commented Feb 27, 2025

I 1000% agree with this. In fact I think it could be awesome with SocietyOfMindAgent. I can create a quick PR?

@ekzhu
Copy link
Collaborator Author

ekzhu commented Feb 27, 2025

@EItanya Thanks! Assigned to you.

EItanya added a commit to EItanya/autogen that referenced this issue Feb 27, 2025
@EItanya EItanya linked a pull request Feb 27, 2025 that will close this issue
3 tasks
@EItanya
Copy link
Contributor

EItanya commented Feb 27, 2025

@ekzhu #5742

@EItanya
Copy link
Contributor

EItanya commented Feb 27, 2025

I actually had a quick question about the SocietyOfMindAgent generally, I can also create another issue.

I noticed that the SocietyOfMindAgent does not support streaming chunks:

if isinstance(inner_msg, ModelClientStreamingChunkEvent):
.

Our use-case "requires" streaming responses back from the sub-team, and probably doesn't require a final message output from the society of mind agent. Should we create a custom version without that, or potentially make the society of mind more configurable for that use-case?

EItanya added a commit to EItanya/autogen that referenced this issue Feb 27, 2025
@ekzhu
Copy link
Collaborator Author

ekzhu commented Feb 27, 2025

The ModelClientStreamingChunkEvent is yielded but not added to the inner messages. So it should be in the stream.

SocietyOfMindAgent is a very opinionated implementation of nested chat. So I recommend creating custom agent for any serious nested chat scenario.

@EItanya
Copy link
Contributor

EItanya commented Feb 27, 2025

Sounds good, I will do that. I still pushed a few fixes the the SocietyOfMindAgent in my PR to fix the declarative approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants