Skip to content

Add progress updates documentation for tool calls (AIT-312)#3167

Open
matt423 wants to merge 2 commits intomainfrom
ait-312-tool-call
Open

Add progress updates documentation for tool calls (AIT-312)#3167
matt423 wants to merge 2 commits intomainfrom
ait-312-tool-call

Conversation

@matt423
Copy link
Member

@matt423 matt423 commented Jan 30, 2026

Description

Add Progress updates section which details the two approaches(messages & LiveObjects) and provides details and comparisons of the two approaches. Claude assisted but verified the code samples and writing.

Review App

Copilot Summary

This pull request adds comprehensive documentation on how to implement progress updates for long-running tool calls in the messaging system. It introduces two main approaches—using messages and LiveObjects—for reporting and tracking tool execution progress, with detailed code examples and guidance on when to use each method.

Progress updates documentation:

  • Added a new section describing how to stream progress updates for long-running tool calls, including the benefits for user experience and execution visibility.

Progress via messages:

  • Provided step-by-step examples for publishing and subscribing to tool_progress messages, demonstrating how to correlate updates with specific tool calls and update the UI accordingly.

Progress via LiveObjects:

  • Documented how to use LiveObjects (including LiveMap and LiveCounter) for real-time, state-based progress tracking, with code samples for both publishing and subscribing to progress state.
  • Included notes on enabling LiveObjects capability and the benefits of LiveCounter for distributed/concurrent updates.

Guidance and best practices:

  • Added a comparison table and recommendations for when to use messages versus LiveObjects, and illustrated how both approaches can be combined for comprehensive progress tracking.

Checklist

Summary by CodeRabbit

  • Documentation
    • Added comprehensive "Progress updates" documentation explaining two approaches for managing long-running tool calls: using Messages for discrete updates and LiveObjects for continuous numeric progress, including detailed code examples for publishing and subscribing to progress events.

✏️ Tip: You can customize this high-level summary in your review settings.

@matt423 matt423 added the review-app Create a Heroku review app label Jan 30, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

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.

  • 🔍 Trigger a full review

Walkthrough

Added comprehensive documentation section on delivering progress updates for long-running tool calls in the AI Transport messaging guide. Explains two approaches: Messages for discrete updates and LiveObjects for continuous numeric progress, with code examples and usage guidance.

Changes

Cohort / File(s) Summary
Progress Updates Documentation
src/pages/docs/ai-transport/messaging/tool-calls.mdx
Added "Progress updates" section with detailed explanations of two patterns for tool call progress reporting (Messages vs. LiveObjects), including code examples for publishing and subscribing, and guidance on when to use each approach.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Hop along through progress updates clear,
Messages dance, LiveObjects appear,
Long-running tools now have their way,
To whisper progress, come what may!
Documentation blooms, examples shine,
Your tool calls march in perfect time.

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes check ❓ Inconclusive The PR introduces duplicated content (two identical progress-updates sections), which is a potential quality issue but not out-of-scope since all changes relate to the linked issue objective. Review and remove the duplicated progress-updates section to ensure the documentation is clean and not redundant.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding documentation for progress updates in tool calls, with issue reference for context.
Linked Issues check ✅ Passed The PR addresses all core requirements from AIT-312: documenting progress updates for tool calls, comparing messages vs LiveObjects approaches, and providing concrete implementation examples.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ait-312-tool-call

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

@ably-ci ably-ci temporarily deployed to ably-docs-ait-312-tool--eix3tm January 30, 2026 11:33 Inactive
@matt423
Copy link
Member Author

matt423 commented Jan 30, 2026

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/pages/docs/ai-transport/messaging/tool-calls.mdx`:
- Around line 360-386: The subscription callback in channel.subscribe uses
toolCallId from message.extras.headers without checking for its presence, which
can cause toolProgress entries to be stored under undefined and collide; update
the callback in channel.subscribe to early-return when toolCallId is
null/undefined (or otherwise falsy) before calling toolProgress.set/get/delete
or renderProgressBar/renderCompleted so all cases ('tool_call', 'tool_progress',
'tool_result') safely skip processing when toolCallId is missing.

@matt423 matt423 marked this pull request as ready for review January 30, 2026 11:48
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.

I've made a few suggestions, my only other question would be, should we add Python and Java code snippets where appropriate too? There's this PR which has just been merged containing updates to all the code snippets in the AIT docs to also have Java and Python. #3154 What do you think?


You can deliver progress updates using two approaches:

- **Messages**: Best for discrete status updates and milestone events
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- **Messages**: Best for discrete status updates and milestone events
- Messages: Best for discrete status updates and milestone events


### Choosing the right approach <a id="progress-choosing"/>

Choose **messages** when:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Choose **messages** when:
Choose messages when:

@GregHolmes
Copy link
Contributor

I believe @ttypic will be adding Java and Python code snippets here.

@GregHolmes GregHolmes temporarily deployed to ably-docs-ait-312-tool--eix3tm February 2, 2026 13:05 Inactive
@GregHolmes
Copy link
Contributor

I believe @ttypic will be adding Java and Python code snippets here.

@ttypic 's changes have been merged in.

@GregHolmes GregHolmes temporarily deployed to ably-docs-ait-312-tool--eix3tm February 2, 2026 13:05 Inactive
matt423 and others added 2 commits February 2, 2026 14:30
Add comprehensive documentation for streaming progress updates during
long-running tool execution, addressing AIT-312.

Changes:
- Add "Progress updates" section to tool-calls.mdx
- Document progress updates via Messages (discrete events)
- Document progress updates via LiveObjects (state synchronization)
- Include complete setup and initialization examples
- Provide guidance on choosing between approaches
- Show combined approach using both Messages and LiveObjects

The documentation covers:
- Publishing progress updates with toolCallId correlation
- Subscribing to progress updates on the client
- LiveObjects setup with LiveCounter and LiveMap
- Use cases for each approach
- Complete code examples with proper imports
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.

4 participants