Skip to content

v0.4.0

Choose a tag to compare

@yuanhao yuanhao released this 21 Feb 22:48
· 375 commits to main since this release

What's New

  • Lifecycle callbacks — before_turn, after_turn, on_error for observability and control
  • State persistence — save_messages() / restore_messages() for pause/resume workflows
  • PartialEq on core types — Content, Message, AgentMessage, Usage, CacheConfig, ToolResult
  • Full serde coverage — ToolExecutionStrategy, ContextConfig, ExecutionLimits now serialize/deserialize
  • ExtensionMessage struct — replaces inline Extension { role, data } variant with a proper struct adding a kind field for categorization

Breaking Changes

  • AgentMessage::Extension serialization format changed. The old #[serde(flatten)] format ({"role": "x", "key1": "val1"}) is replaced with a nested struct: {"role": "extension", "kind": "...", "data": {...}}. Any previously serialized Extension values are incompatible with the new format.
  • AgentLoopConfig has 3 new required fields — before_turn, after_turn, on_error (all Option, set to None for previous behavior).

Documentation