synthesize method
Produces the final structured output after plan execution.
The default implementation returns a copy of AiRunContext.state. Override this to shape user-facing output, remove internal details, or combine tool results into a smaller response.
Implementation
@override
Future<Map<String, dynamic>> synthesize(AiRunContext context) async {
return {
'task': context.goal.task,
'state': context.state,
};
}