Repository navigation
feat(cli): Implement save-session-on-runtime feature for periodic session checkpointing - #5510
hamdi-sakly wants to merge 3 commits into
Conversation
|
Hi @hamdi-sakly , Thank you for your contribution! We appreciate you taking the time to submit this pull request. Please fix the failing mypy-diff and unit tests before we can proceed with a review. |
|
Hi , @rohityan I already fixed the failing mypy-diff and unit tests . |
|
Hi @hamdi-sakly, thank you so much for your contribution and for putting together this PR to address #5466! In the meantime, Since runtime session persistence in |
feat(cli): Implement save-session-on-runtime feature for periodic session checkpointing
This commit introduces the --save_session_on_runtime feature for the ADK
CLI, enabling periodic session checkpointing during interactive agent
sessions.
Feature Overview
When enabled with --save-session-on-runtime, the agent session state is
automatically saved to disk every 60 seconds during interactive
sessions.
On subsequent runs with the same agent, the last checkpoint is
automatically loaded instead of starting a fresh session.
Implementation Details
Session data saved includes:
Sessions are stored in:
Uses asyncio background tasks to avoid blocking the interactive
session
Includes proper error handling to prevent disrupting the user
experience
Automatically creates the .adk directory if it does not exist
Configuration
Enabled via:
Files Modified
src/google/adk/cli/cli.py
Core implementation in run_interactively and run_cli
src/google/adk/cli/cli_tools_click.py
CLI option definition and parameter wiring
Unit Tests
Added: - tests/unittests/cli/test_save_session_on_runtime.py
Test Coverage
functions
run_interactively
Test Status
closes : #5466