Skip to content

Conversation

@jplikesbikes
Copy link
Contributor

This pr implements issue #907 it separates the concerns of deleting the session from the adk SessionService and adding the session to the MemoryService during session clean up in the SessionManager

It splits the auto_cleanup parameter into two separate parameters delete_session_on_cleanup and
save_session_to_memory_on_cleanup

These parameters are exposed when creating the ADKAgent

@jplikesbikes jplikesbikes changed the title Fixes #907: [ag-ui-adk] Finegrained configuration of SessionManager [ag-ui-adk] Fixes #907 Finegrained configuration of SessionManager Jan 9, 2026
@jplikesbikes jplikesbikes marked this pull request as ready for review January 9, 2026 21:10
Copy link
Collaborator

@contextablemark contextablemark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jplikesbikes Thank you for another great submission!

Besides the one comment, this one needs more tests, specifically :

  • There are tests for both flags false and both true in the "end of session" behavior, but needs to be tests for the two "mixed" combinations.

  • Additional cleanup loop tests for the same mixed settings as well as cleanup loop behavior with both set to false.

  • Test that flags make it through to agent._session_manager when either the direct ADKAgent constructor is used or when ADKAgent.from_app is used

  • Edge case tests

    • What happens when save session is true, but memory service is set to None?
    • Verify that sessions with pending_tool_calls are preserved even when delete_session_on_cleanup=True

Copy link
Collaborator

@contextablemark contextablemark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm... will run e2e tests and merge

@contextablemark
Copy link
Collaborator

E2E tests confirmed with #928

@contextablemark contextablemark merged commit 90b6830 into ag-ui-protocol:main Jan 13, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants