agentle.agents.message_history_fixer

Bulletproof message history validation and auto-fix system. Prevents the “function response parts” error in all scenarios.

Functions

deepcopy(x[, memo, _nil])

Deep copy operation on arbitrary Python objects.

Classes

Any(*args, **kwargs)

Special type indicating an unconstrained type.

AssistantMessage(*[, role])

Represents a message from an assistant in the system.

DeveloperMessage(*[, role])

Represents a message from a developer in the system.

MessageHistoryFixer([strict_mode])

Automatically detects and fixes message history inconsistencies that could cause the "function response parts" error.

Sequence()

All the operations on a read-only sequence.

ToolExecutionResult(*[, type, ...])

Represents the result of a tool execution within a step.

ToolExecutionSuggestion(*[, type, id, args])

Represents a suggestion to execute a specific tool.

UserMessage(*[, role])

Represents a message from a user in the system.