diff --git a/core/src/main/java/com/google/adk/flows/llmflows/BaseLlmFlow.java b/core/src/main/java/com/google/adk/flows/llmflows/BaseLlmFlow.java index 5ec103093..fe4142ce8 100644 --- a/core/src/main/java/com/google/adk/flows/llmflows/BaseLlmFlow.java +++ b/core/src/main/java/com/google/adk/flows/llmflows/BaseLlmFlow.java @@ -348,6 +348,9 @@ private Flowable runOneStep(InvocationContext context) { .author(context.agent().name()) .branch(context.branch()) .build(); + // Explicitly set the event timestamp to 0 so the postprocessing logic would generate + // events with fresh timestamp. + mutableEventTemplate.setTimestamp(0L); Flowable restOfFlow = callLlm(context, llmRequestAfterPreprocess, mutableEventTemplate)