kodeagent.history_formatter.CodeActHistoryFormatter#

class kodeagent.history_formatter.CodeActHistoryFormatter[source]#

Formats CodeAct agent history with code-based pseudo tool calls.

CodeAct agents use a code field and format it as a pseudo tool call with the name ‘code_execution’. They do not track pending tool calls.

__init__()#

Methods

__init__()

format_tool_call(msg, state)

Format CodeAct code as pseudo 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 code field for tool call.