-
Notifications
You must be signed in to change notification settings - Fork 881
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Migrate pydantic * Upgrade poetry * Adapt to manage checkpoint using an AstncSaver * Adjust Tools model * Add checkpoint * Update poetry * Format * Fix tests * Modify tables * Fix gpt4o * Fix bots * Fix retrieval * Adding eugenes suggestions * Fix state handling inconsistency between different agent types * Improve doc * Update backend/pyproject.toml * lint fix * lint --------- Co-authored-by: “lgesuellip” <“[email protected]”> Co-authored-by: Eugene Yurtsev <[email protected]> Co-authored-by: Eugene Yurtsev <[email protected]>
- Loading branch information
1 parent
541ae6f
commit 2cf3bf7
Showing
27 changed files
with
3,411 additions
and
2,723 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,26 @@ | ||
# backend | ||
|
||
## Database Migrations | ||
|
||
### Migration 5 - Checkpoint Management Update | ||
This migration introduces a significant change to thread checkpoint management: | ||
|
||
#### Changes | ||
- Transitions from single-table pickle storage to a robust multi-table checkpoint management system | ||
- Implements LangGraph's latest checkpoint architecture for improved state persistence | ||
- Preserves existing checkpoint data by renaming `checkpoints` table to `old_checkpoints` | ||
- Introduces three new tables for better checkpoint management: | ||
- `checkpoints`: Core checkpoint metadata | ||
- `checkpoint_blobs`: Actual checkpoint data storage (compatible with LangGraph state serialization) | ||
- `checkpoint_writes`: Tracks checkpoint write operations | ||
- Adds runtime initialization via `ensure_setup()` in the lifespan event | ||
|
||
#### Impact | ||
- **Breaking Change**: Historical threads/checkpoints (pre-migration) will not be accessible in the UI | ||
- Previous checkpoint data remains preserved but inaccessible in the new system | ||
- Designed to work seamlessly with LangGraph's state persistence requirements | ||
|
||
#### Migration Details | ||
- **Up Migration**: Safely preserves existing data by renaming the table | ||
- **Down Migration**: Restores original table structure if needed | ||
- New checkpoint management tables are automatically created at application startup |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.