kodeagent.history_formatter.ReActHistoryFormatter#

class kodeagent.history_formatter.ReActHistoryFormatter[source]#

Formats ReAct agent history with action-based tool calls.

ReAct agents use an action/args structure for tool calls and track pending tool calls to add placeholders for interrupted executions.

__init__()#

Methods

__init__()

format_tool_call(msg, state)

Format ReAct action as tool call.

pydantic_to_dict(msg)

Convert Pydantic message to dict with proper formatting and metadata.

should_format_as_tool_call(msg)

Check if message has action field for tool call.