Skip to content

docs: Add 4 provider-specific AI Transport getting started guides#3103

Open
GregHolmes wants to merge 2 commits intomainfrom
AIT-107-Create-AIT-Getting-Started-guides
Open

docs: Add 4 provider-specific AI Transport getting started guides#3103
GregHolmes wants to merge 2 commits intomainfrom
AIT-107-Create-AIT-Getting-Started-guides

Conversation

@GregHolmes
Copy link
Contributor

@GregHolmes GregHolmes commented Jan 15, 2026

Summary

Adds 4 getting started guides for AI Transport, each using a real provider SDK:

  • Anthropic - Uses @anthropic-ai/sdk with claude-sonnet-4-5
  • OpenAI - Uses openai SDK with gpt-4o
  • Vercel AI SDK - Uses ai@^6 with provider-agnostic streaming
  • LangGraph - Uses @langchain/langgraph with @langchain/anthropic

Each guide walks through:

  • Project setup with provider-specific dependencies
  • JWT authentication with Ably
  • Defining a send_email tool in the provider's format
  • Streaming agent responses via Ably's message-per-response pattern
  • Human-in-the-loop tool call approval flow
  • A client that displays streamed tokens and handles approval prompts

@coderabbitai
Copy link

coderabbitai bot commented Jan 15, 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.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 61eb25ef-6293-4752-96d6-578878cd619f

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch AIT-107-Create-AIT-Getting-Started-guides

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.

@GregHolmes GregHolmes force-pushed the AIT-107-Create-AIT-Getting-Started-guides branch 3 times, most recently from 7a3ebe5 to 02439a7 Compare January 16, 2026 12:36
@mschristensen mschristensen force-pushed the AIT-129-AIT-Docs-release-branch branch from 20df5cb to 01ab0f8 Compare January 16, 2026 16:50
Base automatically changed from AIT-129-AIT-Docs-release-branch to main January 16, 2026 17:48
@GregHolmes GregHolmes force-pushed the AIT-107-Create-AIT-Getting-Started-guides branch from 02439a7 to 0039e1d Compare January 23, 2026 12:05
@GregHolmes GregHolmes requested review from a team and mschristensen January 23, 2026 12:05
@GregHolmes GregHolmes self-assigned this Jan 23, 2026
@GregHolmes GregHolmes added the review-app Create a Heroku review app label Jan 23, 2026
@ably-ci ably-ci temporarily deployed to ably-docs-ait-107-creat-p5bp23 January 23, 2026 12:06 Inactive
@GregHolmes GregHolmes force-pushed the AIT-107-Create-AIT-Getting-Started-guides branch 3 times, most recently from 86956c7 to 1a6be6c Compare February 16, 2026 15:57
@GregHolmes GregHolmes requested a review from m-hulbert February 17, 2026 10:37
@GregHolmes GregHolmes changed the title docs: Add AI Transport getting started guide for JavaScript/TypeScript docs: Add 4 provider-specific AI Transport getting started guides Feb 17, 2026
@GregHolmes GregHolmes force-pushed the AIT-107-Create-AIT-Getting-Started-guides branch from 2c964ba to cd08990 Compare February 17, 2026 10:50
@GregHolmes GregHolmes requested a review from rainbowFi February 17, 2026 10:50
@rainbowFi rainbowFi force-pushed the AIT-107-Create-AIT-Getting-Started-guides branch from cd08990 to 4da227e Compare February 17, 2026 14:07
@GregHolmes GregHolmes requested review from zknill and removed request for a team, mschristensen and zknill February 17, 2026 15:12
@GregHolmes GregHolmes added review-app Create a Heroku review app and removed review-app Create a Heroku review app labels Feb 24, 2026
@ably-ci ably-ci temporarily deployed to ably-docs-ait-107-creat-rqd9yk February 24, 2026 16:45 Inactive
@GregHolmes GregHolmes added review-app Create a Heroku review app and removed review-app Create a Heroku review app labels Feb 24, 2026
@ably-ci ably-ci temporarily deployed to ably-docs-ait-107-creat-tb65bi February 24, 2026 17:01 Inactive
@rainbowFi rainbowFi added review-app Create a Heroku review app and removed review-app Create a Heroku review app labels Feb 25, 2026
@ably-ci ably-ci temporarily deployed to ably-docs-ait-107-creat-siyfur February 25, 2026 10:55 Inactive
@rainbowFi
Copy link
Contributor

I haven't gone through all the details yet, but a couple of quick questions

  • what's the motivation for the authenticated users step? We don't do this for the Pub/Sub getting started and it adds further complexity to an already long tutorial
  • there are a lot of files here, compared to the existing getting started guides. Is there an easy way that we can package these up for customers to download from this page if they don't fancy doing a lot of copy/paste work?

@GregHolmes
Copy link
Contributor Author

I haven't gone through all the details yet, but a couple of quick questions

  • what's the motivation for the authenticated users step? We don't do this for the Pub/Sub getting started and it adds further complexity to an already long tutorial
  • there are a lot of files here, compared to the existing getting started guides. Is there an easy way that we can package these up for customers to download from this page if they don't fancy doing a lot of copy/paste work?

Thank you for the comments @rainbowFi

For the first Q, I went with the auth step because AIT is architecturally different from Pub/Sub getting started guides, in that it always involves a backend agent + frontend client, and the client needs JWTs (not an API key). The human-in-the-loop flow also relies on a clientId from the JWT. I do agree it is heavy, we could slim it down by linking to a shared auth snippet or providing a ready-to-run auth server, so the guide focuses on the AI-specific parts, but this would complicate the maintenance of these guides for anyone in the future. What do you think?

For the second Q, I agree, 3-5 files per guide is a lot of copy/paste. The simplest option could be where ever we store the feature guides code, we store the getting started guides in there too. It's currently a PR in docs, but I think it's still up for debate on where it's going. Something @mschristensen and @m-hulbert were discussing. We already have runnable examples in /examples/ for the message patterns, but these don't use actual providers. So unless we ask the user in the flow of the example to provide their API Key for the specific provider, the examples wouldn't otherwise be feasible.

@GregHolmes GregHolmes force-pushed the AIT-107-Create-AIT-Getting-Started-guides branch from 4da227e to 5c75a83 Compare March 4, 2026 12:11
Add comprehensive getting started guide covering:
- JWT-based user authentication with verified identities
- Mock LLM implementation for provider-agnostic examples
- Agent that streams token responses using message-per-response pattern
- Interactive client with readline for user prompts
- Message correlation using promptId headers
- Channel rule setup for message appends

Also update navigation to include getting started section.
…guides

Split the single JavaScript/TypeScript getting-started guide (which used a mock LLM) into four provider-specific guides: Anthropic, OpenAI, Vercel AI SDK, and LangGraph. Each guide uses the real provider SDK, includes human-in-the-loop (HITL) tool call approval via a send_email tool, and follows a consistent structure with code split into digestible blocks.
@GregHolmes GregHolmes force-pushed the AIT-107-Create-AIT-Getting-Started-guides branch from 5c75a83 to 7156557 Compare March 4, 2026 14:33
@GregHolmes GregHolmes requested a review from kaschula March 4, 2026 14:33
Copy link
Contributor

@rainbowFi rainbowFi left a comment

Choose a reason for hiding this comment

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

Thanks @GregHolmes

For the first question, I think it's better to have everything on one page rather than linking to some common example page. We don't want people to have to click through multiple pages to get this single "Getting Started" working, and I agree with you that the auth is necessary.

For the second one, let's say the code lives in whatever location we pick for the feature guide code, because it's the same problem of people needing a quick way to access it. I'm not going to gate approval of this PR on that discussion coming to a conclusion. Can you make sure that the work is tracked somewhere?

In terms of the actual content, I've put one request inline and tested the Anthropic example. I haven't reviewed the code for quality, if you have any concerns then I suggest you ask an engineer to take a look.


The JWT includes two claims:
- `x-ably-clientId`: Establishes a verified identity that appears on all messages the user publishes.
- `ably.channel.*`: Assigns a role that agents can use to distinguish users from other agents on the channel.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this strictly required for anything else that is covered in the getting started guide? The way we're going to track AI transport usage will add an agent/human identifier to the connection parameters, so I'd rather not start people doing this through the JWT.


The JWT includes two claims:
- `x-ably-clientId`: Establishes a verified identity that appears on all messages the user publishes.
- `ably.channel.*`: Assigns a role that agents can use to distinguish users from other agents on the channel.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this claim strictly required for anything in this Getting Started Guide? The plan for AI transport usage tracking is to specify human or agent as part of the connection parameters, so I don't want people also doing that through the JWT.

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.

3 participants