Expand description
Versioned state schemas: explicit schema versioning and migration for durable state.
Following the principle of “state as a first-class citizen” (Hitchhiker’s Guide to Agentic AI, Section 18.6), all serialized state carries an explicit schema version so that forward/backward migration is safe and auditable.
§Schema History
| Version | Description |
|---|---|
| v0 | Implicit — no schema version field present (legacy snapshots, pre-2025) |
| v1 | Initial explicit schema. Adds per-message metadata scaffolding. |
| v2 | Snapshot-local turn linkage and diagnostics; unrelated state remains on v1. |
§Migration
Every VersionedState implementor provides a migrate() method that walks
from its current version to the target, one step at a time. A snapshot at v0
is first migrated to v1, then to v2, and so on. This keeps each migration
step small and testable.
Structs§
- Schema
Version - Explicit schema version for durable agent state.
Traits§
- Versioned
State - Trait for types whose serialized representation carries a schema version and can be migrated forward to a newer version.