agentix.serde¶
serde ¶
JSON (de)serialization for the core types.
The agent transcript isn't plain JSON: Message.role is an enum and
Message.meta["tool_calls"] holds live :class:ToolCall objects (so provider
adapters can replay tool turns). This module is the explicit codec that turns the
transcript — and run state — into JSON-able dicts and back. It's the substance of
persistence, and is reusable for logging, audit export, or wire transfer.