Skip to main content

OnContextCondition

Defines a condition for transitioning to another agent or nested chats using context variables and the ContextExpression class.
This is for context variable-based condition evaluation (does not use the agent’s LLM).
These are evaluated before the OnCondition and after work conditions.
Parameters:

Class Attributes

available



condition



model_config



target



Instance Methods

has_target_type

Check if the target type matches the specified type.
Parameters: Returns:

target_requires_wrapping

Check if the target requires wrapping in an agent.
Returns:
bool: True if the target requires wrapping, False otherwise
Returns: