feat(storage): add unified persistence layer for agent checkpoints and thread journals#110
Merged
mikehostetler merged 6 commits intomainfrom Feb 2, 2026
Merged
feat(storage): add unified persistence layer for agent checkpoints and thread journals#110mikehostetler merged 6 commits intomainfrom
mikehostetler merged 6 commits intomainfrom
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-019c1e80-b090-76a8-aaac-98140f9966bd Co-authored-by: Amp <[email protected]>
…s and thread journals This commit introduces a comprehensive storage and persistence mechanism for the Jido framework, enabling agents to hibernate and thaw their state. Key changes include: - Added a new `Jido.Persist` module to manage hibernation and restoration of agents, ensuring that only thread pointers are stored in checkpoints. - Implemented `Jido.Storage` behavior with an ETS-based storage adapter for fast in-memory operations. - Introduced a `Jido.Thread` module to manage an append-only log of interaction entries, enhancing the tracking of agent activities. - Updated agent strategies to support optional thread tracking during command execution, allowing for better observability of instruction flows. These enhancements improve the overall functionality and robustness of the Jido AI framework, facilitating richer interactions and better state management for agents.
- Merge persistence.md content into storage.md as unified guide - Add 'Choosing Your Persistence Model' decision table - Add 'Automatic Lifecycle with InstanceManager' section - Add 'When NOT to Persist' section - Add 'Migration from Legacy API' section - Fix API naming: Jido.AgentPool -> Jido.Agent.WorkerPool - Update cross-references in configuration.md, runtime.md, worker-pools.md, phoenix-integration.md - Delete redundant persistence.md Amp-Thread-ID: https://ampcode.com/threads/T-019c1f12-5bc6-77bd-9a00-513d1f8af4ee Co-authored-by: Amp <[email protected]>
- Add all ungrouped modules to appropriate groups - Add new groups: State Operations, Sensors, Thread, Exceptions - Rename 'Agent Components' to 'Agent Internals' - Include all sub-modules for Skills, Actions, Storage, Observability - Remove persistence.md from docs config (consolidated into storage.md) Amp-Thread-ID: https://ampcode.com/threads/T-019c1f12-5bc6-77bd-9a00-513d1f8af4ee Co-authored-by: Amp <[email protected]>
Amp-Thread-ID: https://ampcode.com/threads/T-019c1f12-5bc6-77bd-9a00-513d1f8af4ee Co-authored-by: Amp <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the Jido Storage unified persistence layer based on the JIDO_STORAGE.md specification.
Changes
New Modules
Jido.Storage- Unified storage behaviour with 6 callbacks for checkpoints and journalsJido.Storage.ETS- ETS adapter (ephemeral, for dev/test)Jido.Storage.File- File-based adapter (durable)Jido.Persist- Hibernate/thaw coordinator, invariant enforcerModified Modules
Jido- Addedstorage:option touse Jidomacro,hibernate/2andthaw/3functionsJido.Agent- Addedcheckpoint/2andrestore/2callbacks with default implementationsDocumentation
guides/storage.mdguide (~800 lines)Tests
mix qualitypassesKey Features
Jido.Storagebehaviour - One adapter handles both checkpoints (overwrite) and journals (append-only)%{id, rev}pointer, never full Threadexpected_rev:option for conflict detectioncheckpoint/2andrestore/2for custom serializationUsage