From adk-sessions-memory
Use this skill to migrate ADK 2.0 sessions between storage backends or user contexts. Triggers on: "ADK migrate session", "move session to Vertex", "promote session from in-memory to persistent", "transfer ADK session", "session export/import", "ADK session backup", "session storage migration". Generates code that exports a session from one SessionService and imports into another, preserving events, state, and invocation history.
How this skill is triggered — by the user, by Claude, or both
Slash command
/adk-sessions-memory:session-migrateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Move ADK 2.0 sessions across users, apps, or storage backends. Useful for promoting from dev → prod, archival, or transferring ownership.
Move ADK 2.0 sessions across users, apps, or storage backends. Useful for promoting from dev → prod, archival, or transferring ownership.
| From | To | Why |
|---|---|---|
InMemorySessionService | VertexAiSessionService | Promote dev session to persistent storage |
| One Vertex project | Another | Cross-environment migration |
| User A | User B | Transfer ownership / handoff |
| Live session | Archive bucket | Compliance retention |
from google.adk.sessions import InMemorySessionService, VertexAiSessionService
# Source: in-memory dev session
src = InMemorySessionService()
session = await src.create_session(app_name="demo", user_id="dev_user")
# ... run agent against session ...
# Export the full session payload
payload = await src.export_session(session.id)
# payload includes: state, events, invocations, metadata
# Destination: persistent Vertex session
dst = VertexAiSessionService(project="prod-project", location="us-central1")
new_session = await dst.import_session(
payload,
target_app_name="demo",
target_user_id="prod_user",
)
print(f"Migrated: {session.id} → {new_session.id}")
sessions = await src.list_sessions(app_name="demo")
for s in sessions:
payload = await src.export_session(s.id)
await dst.import_session(payload, target_app_name="demo", target_user_id=s.user_id)
Migrate only sessions newer than a date, or for specific users:
import datetime
cutoff = datetime.datetime(2026, 1, 1)
for s in await src.list_sessions(app_name="demo"):
if s.created_at >= cutoff:
await dst.import_session(await src.export_session(s.id), ...)
Move sessions from one logical app to another (e.g., schema upgrade from v1 → v2):
new_session = await dst.import_session(
payload,
target_app_name="demo_v2",
transform=lambda state: {**state, "schema_version": 2},
)
len(new_session.events) == len(session.events)session-rewind-checkpoint for time-travel within a sessionnpx claudepluginhub healthcare-ai-consulting-llc/adk-2-toolkit --plugin adk-sessions-memoryCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.