ReactInitiator, which primes the model with a goal and a tool list, and
ReactThought, which signals a thinking step. Also exports the
MELLEA_FINALIZER_TOOL sentinel string used to signal loop termination. These
components are consumed by mellea.stdlib.frameworks.react, which orchestrates the
reasoning-acting cycle until the model invokes final_answer or the step budget
is exhausted.
Classes
CLASS ReactInitiator
ReactInitiator is used at the start of the ReACT loop to prime the model.
Args:
goal: The objective of the react loop.tools: Tools available to the agent.Noneis treated as an empty list.
goal: The objective of the react loop wrapped as a content block.tools: The tools made available to the react agent.
FUNC parts
- list[Component | CBlock]: A list containing the goal content block.
FUNC format_for_llm
Component into a TemplateRepresentation or string.
Returns: a TemplateRepresentation whose tools always includes a finalizer tool.
CLASS ReactThought
ReactThought signals that a thinking step should be done.
Methods:
FUNC parts
ReactThought has no sub-components; it solely triggers a thinking step.
Returns:
- list[Component | CBlock]: Always an empty list.
FUNC format_for_llm
Component into a TemplateRepresentation or string.
Returns: a TemplateRepresentation whose tools always includes a finalizer tool.