Skip to content

feat: update session manager docs#581

Open
JackYPCOnline wants to merge 2 commits intostrands-agents:mainfrom
JackYPCOnline:session_manager
Open

feat: update session manager docs#581
JackYPCOnline wants to merge 2 commits intostrands-agents:mainfrom
JackYPCOnline:session_manager

Conversation

@JackYPCOnline
Copy link
Contributor

@JackYPCOnline JackYPCOnline commented Feb 25, 2026

Description

Updates the Session Management documentation page to add full TypeScript SDK coverage alongside the existing Python content.

The TypeScript SDK uses a different, snapshot-based session model compared to Python's message-level persistence. This PR documents that model so TypeScript users have a complete reference.

Key changes:

  • Removed the ts_not_supported banner — session management is now supported in the TypeScript SDK
  • Added TypeScript tabs throughout: basic usage, FileStorage, S3Storage, storage directory/key structures, and how session management works
  • Documented the TypeScript-specific snapshot model: snapshot_latest vs immutable history, saveLatestOn strategy table, snapshotTrigger callback with all SnapshotTriggerParams fields, and loadSnapshotId for restoring from a specific snapshot
  • Added a "Custom Storage Backends (TypeScript)" section documenting the SnapshotStorage interface
  • Noted TypeScript-specific S3 behavior: bucket must pre-exist, s3Client vs region config options
  • Added two TypeScript-specific best practice bullets

Python content is unchanged.

Related Issues

Type of Change

  • Content update/revision

Checklist

  • I have read the CONTRIBUTING document
  • My changes follow the project's documentation style
  • I have tested the documentation locally using mkdocs serve
  • Links in the documentation are valid and working

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@strands-agent
Copy link
Contributor

Documentation Deployment Complete

Your documentation preview has been successfully deployed!

Preview URL: https://d3ehv1nix5p99z.cloudfront.net/pr-581/

@strands-agent
Copy link
Contributor

Documentation Deployment Complete

Your documentation preview has been successfully deployed!

Preview URL: https://d3ehv1nix5p99z.cloudfront.net/pr-581/

@@ -60,138 +71,249 @@ The conversation, and associated state, is persisted to the underlying filesyste

Copy link
Contributor

Choose a reason for hiding this comment

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

Issue: Missing space between "systems" and opening parenthesis.

Suggestion: Change to Multi-agent systems (Graph/Swarm)

@@ -228,76 +350,108 @@ Here's a sample IAM policy that grants these permissions for a specific bucket:

Copy link
Contributor

Choose a reason for hiding this comment

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

Issue: The original Python documentation included a "2. Data Models" subsection that documented the Session, SessionAgent, SessionMessage models and "Multi-Agent State" with links to the API reference. This content appears to have been removed when adding the TypeScript tabs.

Suggestion: Add a second subsection under the Python tab to preserve this documentation. Something like:

    ### 2. Data Models

    Session data is stored using these key data models:

    **Session**

    The [`Session`](../../../api-reference/python/types/session.md#strands.types.session.Session) model is the top-level container...
    
    (rest of the original content)

This is important reference material for Python users understanding the session internals.

@github-actions
Copy link
Contributor

Assessment: Comment

This is excellent documentation work that adds comprehensive TypeScript SDK coverage for session management. The snapshot-based model is well-explained with clear examples for snapshotTrigger, saveLatestOn strategies, and custom storage backends.

Review Summary
  • Missing Content: The Python "Data Models" section (documenting Session, SessionAgent, SessionMessage) was removed during the refactoring. This valuable reference material should be preserved in the Python tab.
  • Minor: One small formatting issue with a missing space.

The TypeScript-specific additions (snapshot types, persistence triggers table, SnapshotTriggerParams documentation) are thorough and will be very helpful for TypeScript users. Nice work adding the TypeScript-specific best practices at the end!

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