From adk-sessions-memory
Use this skill to enable ADK 2.0 session rewind — revert a session to a prior invocation state and replay from there. Triggers on: "ADK rewind session", "ADK checkpoint", "undo last agent step", "replay ADK session", "rewindable sessions", "ADK time travel debug", "revert session state". Generates code that captures invocation IDs, calls session.rewind(to=...), and re-runs the agent from the chosen checkpoint.
How this skill is triggered — by the user, by Claude, or both
Slash command
/adk-sessions-memory:session-rewind-checkpointThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
ADK 2.0 ships rewindable sessions — you can revert state to any prior invocation and re-run from there.
ADK 2.0 ships rewindable sessions — you can revert state to any prior invocation and re-run from there.
from google.adk.sessions import InMemorySessionService
from google.adk.runners import Runner
session_service = InMemorySessionService()
runner = Runner(agent=root_agent, session_service=session_service)
# Run a few turns
session = await session_service.create_session(app_name="demo", user_id="u1")
await runner.run_async(session=session, input="Plan a trip to Tokyo")
await runner.run_async(session=session, input="Make it 5 days")
await runner.run_async(session=session, input="Add a day in Kyoto")
# List invocation checkpoints
for inv in session.invocations:
print(inv.id, inv.created_at, inv.user_input[:50])
# Rewind to before the Kyoto add
target_id = session.invocations[-2].id
await session_service.rewind_session(session, to_invocation=target_id)
# Re-run with a different input from that checkpoint
await runner.run_async(session=session, input="Add a day in Osaka instead")
For non-volatile rewind use a persistent session service:
from google.adk.sessions import VertexAiSessionService
session_service = VertexAiSessionService(
project="my-project",
location="us-central1",
)
Vertex stores all invocations; rewind works the same way.
# Replay a session with a tweaked agent to compare outputs
from copy import deepcopy
forked = deepcopy(session)
await session_service.rewind_session(forked, to_invocation=target_id)
forked_runner = Runner(agent=tweaked_agent, session_service=session_service)
await forked_runner.run_async(session=forked, input=user_input)
# Diff session.events vs forked.events
session.invocations is non-empty before rewindto_invocation ID exists in the session historylen(session.events) reflects the truncated statesession-migrate for moving a session between users / apps / storage backendsCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub healthcare-ai-consulting-llc/adk-2-toolkit --plugin adk-sessions-memory