Evaluate When • AI Agent SDK
evaluate_when: Evaluate the 'when' condition against the given context.
evaluate_when
Method
</div>
Evaluate the ‘when’ condition against the given context.
Uses the shared evaluate_condition function from the conditions module for DRY compliance with AgentFlow condition evaluation.
Signature
def evaluate_when(context: Dict[str, Any]) -> boolParameters
ParamField
Dict[str, Any]Dictionary containing variables for evaluation. May include workflow variables, previous outputs, etc.
Returns
ResponseField
boolTrue if condition is met or no condition is set. False if condition is not met.
Uses
evaluate_condition
Used By
Source
View on GitHubpraisonaiagents/task/task.py at line 996