Add snapshots documentation for point-in-time agent state capture and restore#733
Add snapshots documentation for point-in-time agent state capture and restore#733zastrowm wants to merge 3 commits intostrands-agents:mainfrom
Conversation
| @@ -0,0 +1,136 @@ | |||
| import { Agent } from '@strands-agents/sdk' | |||
| import { takeSnapshot, loadSnapshot } from '@strands-agents/sdk/agent/snapshot' | |||
There was a problem hiding this comment.
Issue: Import path verification needed
Suggestion: Please verify that @strands-agents/sdk/agent/snapshot is the intended public API path in the TypeScript SDK. If snapshots are part of the core SDK exports, consider using import { takeSnapshot, loadSnapshot, type Snapshot } from '@strands-agents/sdk' instead for consistency with other SDK imports.
| ```python | ||
| import json | ||
| from strands import Agent | ||
| from strands.types._snapshot import Snapshot |
There was a problem hiding this comment.
Issue: Import from private module
The import from strands.types._snapshot import Snapshot uses an underscore-prefixed module (_snapshot), which typically indicates a private/internal API in Python conventions.
Suggestion: Verify if Snapshot should be exported from a public path (e.g., from strands.types.snapshot import Snapshot or from strands import Snapshot). If the SDK intends this to be the public API, consider removing the underscore prefix from the module name in the SDK.
|
Assessment: Comment This is well-structured documentation for a new feature. The content is clear, comprehensive, and includes practical use cases that demonstrate real-world value (checkpointing, branching conversations). Review Categories
The documentation itself is well-written with good structure and helpful examples. The suggestions above are about ensuring the API references align with SDK conventions. |
Documentation Preview ReadyYour documentation preview has been successfully deployed! Preview URL: https://d3ehv1nix5p99z.cloudfront.net/pr-cms-733/docs/user-guide/quickstart/overview/ Updated at: 2026-04-02T22:42:42.461Z |
| --8<-- "user-guide/concepts/agents/snapshots.ts:take_snapshot" | ||
| ``` | ||
|
|
||
| The `"session"` preset captures `messages`, `state`, and `systemPrompt`. |
There was a problem hiding this comment.
Issue: Session preset differences not explained
The Python "session" preset captures messages, state, conversation_manager_state, and interrupt_state (excluding system_prompt), while the TypeScript "session" preset captures messages, state, and systemPrompt. This difference could confuse users switching between SDKs.
Suggestion: Add a brief note explaining why the presets differ between languages, or consider adding a callout/admonition that highlights this SDK-specific difference.
Description
Adds documentation for the new Snapshots feature, which lets users capture and restore agent state at any point in time. The page covers basic usage (take/load), field selection with presets and include/exclude, application data, serialization, and practical use cases like checkpointing and branching conversations. Both Python and TypeScript examples are included via tabbed code blocks.
Also updates the State Management page to cross-link to the new Snapshots page alongside the existing Session Management reference.
Related Issues
strands-agents/sdk-python#1138
Type of Change
Checklist
npm run devBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.