synthesize method

  1. @override
Future<Map<String, dynamic>> synthesize(
  1. AiRunContext context
)
override

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,
  };
}