Mojentic.Examples.React.SummarizationAgent (Mojentic v1.2.0)

Copy Markdown View Source

Summarization agent for the ReAct pattern.

This agent generates the final answer based on accumulated context, synthesizing all the information gathered during the ReAct loop.

Summary

Functions

Receives and processes a FinishAndSummarize event.

Functions

receive_event_async(broker, event)

Receives and processes a FinishAndSummarize event.

Generates a final answer based on the complete context history.

Parameters

  • broker: LLM broker for generating the final summary
  • event: FinishAndSummarize event containing complete context

Returns

  • {:ok, []} - Terminal event (stops the loop)
  • {:ok, [FailureOccurred.t()]} on error