Skip to main content

RandomAgentTarget

Target that represents a random selection from a list of agents.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Parameters:

Class Attributes

agent_names



model_config



nominated_name



Instance Methods

can_resolve_for_speaker_selection

Check if the target can resolve for speaker selection.

create_wrapper_agent

Create a wrapper agent for the target if needed. Parameters:

display_name

Get the display name for the target.

needs_agent_wrapper

Check if the target needs to be wrapped in an agent.

normalized_name

Get a normalized name for the target that has no spaces, used for function calling

resolve

Resolve to the actual agent object from the groupchat, choosing a random agent (except the current one) Parameters: