Skip to content

Conversation

@mschristensen
Copy link
Contributor

@mschristensen mschristensen commented Dec 11, 2025

Description

This PR adds a Sessions & Identity section to the AI Transport docs:

  • Adds an overview page which describes how session management works with a decoupled, channel-oriented approacg
    • Describes the difference with the traditional connection-oriented approach and the benefits of the channel-oriented solution
    • Describes how identity management and authorization works in channel-oriented sessions
  • Adds a page on identifying users and agents, covering:
    • Why identity matters (preventing spoofing, message attribution, personalized behavior, and authorization decisions)
    • How to authenticate users with token-based auth and agents with API keys
    • How to specify capabilities for fine-grained permissions
    • How to establish verified identity using clientId for both users and agents
    • How to add roles and custom attributes using authenticated claims and message metadata
  • Adds a page on resuming sessions, covering:
    • How to hydrate presence when rejoining a session
    • How users resume sessions by reattaching and hydrating conversation history
    • How agents resume sessions by recovering execution state and catching up on missed messages using channel history
  • Adds a page on online status, covering:
    • Why online status matters for session abandonment detection, multi-device coordination, and agent availability
    • How to go online using presence.enter() from single or multiple devices
    • How to go offline explicitly or after disconnection, with configurable timeouts
    • How to view who is online by retrieving presence members or subscribing to presence changes
    • How to detect when a user is completely offline across all devices

Checklist

@coderabbitai
Copy link

coderabbitai bot commented Dec 11, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/AIT-131-session-management

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mschristensen mschristensen added the review-app Create a Heroku review app label Dec 11, 2025
@ably-ci ably-ci temporarily deployed to ably-docs-feature-ait-1-ix6kyu December 11, 2025 10:20 Inactive
@GregHolmes GregHolmes self-requested a review December 11, 2025 12:10
@GregHolmes GregHolmes force-pushed the AIT-129-AIT-Docs-release-branch branch from 8c010c8 to 5014fd3 Compare December 12, 2025 09:41
@GregHolmes GregHolmes force-pushed the feature/AIT-131-session-management branch from c124c9d to 5259a2b Compare December 12, 2025 09:54
@GregHolmes GregHolmes temporarily deployed to ably-docs-feature-ait-1-ix6kyu December 12, 2025 09:55 Inactive
@GregHolmes GregHolmes force-pushed the AIT-129-AIT-Docs-release-branch branch 2 times, most recently from a863e09 to 2f792d4 Compare December 15, 2025 09:37
@mschristensen mschristensen force-pushed the feature/AIT-131-session-management branch from 5259a2b to bf0b24f Compare December 16, 2025 11:48
@ably-ci ably-ci temporarily deployed to ably-docs-feature-ait-1-ix6kyu December 16, 2025 11:48 Inactive
@mschristensen mschristensen force-pushed the feature/AIT-131-session-management branch from bf0b24f to e93fbeb Compare December 16, 2025 17:02
@ably-ci ably-ci temporarily deployed to ably-docs-feature-ait-1-ix6kyu December 16, 2025 17:03 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-feature-ait-1-ix6kyu December 16, 2025 20:18 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-feature-ait-1-ix6kyu December 16, 2025 23:12 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-feature-ait-1-ix6kyu December 17, 2025 09:47 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-feature-ait-1-ix6kyu December 17, 2025 10:07 Inactive
@mschristensen mschristensen marked this pull request as ready for review December 17, 2025 10:07
Copy link
Contributor

@GregHolmes GregHolmes left a comment

Choose a reason for hiding this comment

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

Looks good! I've added some comments here. Some of them are for one section, but should be considered throughout the PR. Let me know what you think.

@mschristensen mschristensen force-pushed the feature/AIT-131-session-management branch from ace2aba to 1517dd1 Compare December 22, 2025 15:11
@matt423 matt423 force-pushed the AIT-129-AIT-Docs-release-branch branch from 400eb09 to f8056cb Compare December 23, 2025 10:41
Adds an overview page for a Sessions & Identity section which describes the channel-oriented session model and its benefits over the traditional connection-oriented model.

Describes how identity relates to session management and how this works in the context of channel-oriented sessions.

Shows how to use identified clients to assign a trusted identity to users and obtain this identity from the agent side.

Shows how to use Ably capabilities to control which operations
authenticated users can perform on which channels.

Shows how to use authenticated user claims to associated a role or other attribute with a user.

Updates the docs to describe how to handle authentication, capabilities, identity and roles/attributes for agents separately from end users.

Describes how to use presence to mark users and agents as online/offline. Includes description of synthetic leaves in the event of abrupt disconnection.

Describe how to subscribe to presence to see who is online, and take action when a user is offline across all devices.

Add docs for resuming user and agent sessions, linking to hydration patterns for different token streaming approaches for user resumes and describing agent resume behaviour with message catch up.
@mschristensen mschristensen force-pushed the feature/AIT-131-session-management branch from 86093bf to a5cabbc Compare December 23, 2025 12:10
Copy link
Member

@paddybyers paddybyers left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-app Create a Heroku review app

Development

Successfully merging this pull request may close these issues.

5 participants