From 4e3f3cd91ab9b8791332283b4b60033717072c09 Mon Sep 17 00:00:00 2001 From: adk-bot Date: Wed, 22 Oct 2025 21:04:44 +0000 Subject: [PATCH] docs: Add documentation for rewind_session feature --- docs/sessions/index.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/sessions/index.md b/docs/sessions/index.md index 43f91b2f2..d16cf4c28 100644 --- a/docs/sessions/index.md +++ b/docs/sessions/index.md @@ -70,6 +70,20 @@ local testing, ADK also offers cloud-based and database service options. archive* potentially spanning across conversations. Managed by a `MemoryService`. +## Rewinding a Session + +You can rewind a session to a previous state using the `runner.rewind_async` method. This is useful for debugging or re-running parts of a conversation. + +**Example:** +```python +await runner.rewind_async( + user_id="test_user", + session_id="test_session", + rewind_before_invocation_id="" +) +``` +For a complete example, see the [rewind_session sample](https://github.com/google/adk-python/tree/main/contributing/samples/rewind_session). + ## What's Next? In the following sections, we'll dive deeper into each of these components: @@ -82,4 +96,4 @@ In the following sections, we'll dive deeper into each of these components: context. Understanding these concepts is fundamental to building agents that can engage -in complex, stateful, and context-aware conversations. +in complex, stateful, and context-aware conversations. \ No newline at end of file