Skip to content

chimera.types

chimera.types defines the dataclasses that flow across the provider / loop / tool boundary. Importing from a single module avoids circular imports between layers.

TypeFieldsPurpose
ToolCallid, name, arguments (dict)One LLM-emitted tool invocation.
ToolResultoutput (str), error (str | None)Return value of BaseTool.execute(). success property is error is None.
CommandResultstdout, stderr, returncodeResult of a shell command.
TestResultpassed, failed, skipped, outputTest-runner result.
TypeFields
Messagerole ("system" | "user" | "assistant" | "tool"), content, tool_calls, tool_call_id
ContentBlockbase class for typed content
TextContenttext
ImageContentmedia_type, data
TypeFields
StepResulttool_calls, tool_results, text, usage, cost
AgentResultoutput, success, steps, tool_calls, cost, error, messages
TypeFields
ChangeTypeenum: CREATE, MODIFY, DELETE
FileChangepath, change_type, before, after

PendingApproval (chimera.types.PendingApproval) wraps a tool call that needs human confirmation. Carries the tool_name, args, and a callable to resolve the decision.

Most user code does not import chimera.types directly — common types are re-exported from the top-level chimera:

from chimera import Agent, ToolResult, AgentResult