Skip to content

docs: simplify AI agent example#4383

Merged
NathanFlurry merged 2 commits intomainfrom
simplify-agent-example
Mar 8, 2026
Merged

docs: simplify AI agent example#4383
NathanFlurry merged 2 commits intomainfrom
simplify-agent-example

Conversation

@NathanFlurry
Copy link
Member

Summary

Simplified the AI agent example in the README and landing page by removing streaming complexity. Replaced the nested streamText streaming loop with a single generateText call, removed the unused actions block, and simplified the client code accordingly.

The example now more clearly showcases the core queue-driven message processing pattern without the streaming indirection.

Type of change

  • Documentation update

Replace nested streaming loop with a single generateText call. Remove unused actions block. Simplifies the queue-driven message processing pattern while maintaining the run handler pattern showcase.
@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4383 March 8, 2026 07:19 Destroyed
@railway-app
Copy link

railway-app bot commented Mar 8, 2026

🚅 Deployed to the rivet-pr-4383 environment in rivet-frontend

Service Status Web Updated (UTC)
website 😴 Sleeping (View Logs) Web Mar 8, 2026 at 7:38 am
frontend-cloud 😴 Sleeping (View Logs) Web Mar 8, 2026 at 7:30 am
frontend-inspector 😴 Sleeping (View Logs) Web Mar 8, 2026 at 7:27 am
mcp-hub ✅ Success (View Logs) Web Mar 8, 2026 at 7:20 am
ladle ❌ Build Failed (View Logs) Web Mar 8, 2026 at 7:20 am

@claude
Copy link

claude bot commented Mar 8, 2026

PR Review for #4383 (docs: simplify AI agent example)

The simplification goal is valid - removing the getHistory action reduces noise. A few observations:

PR Description Mismatch: The summary says 'Replaced the nested streamText streaming loop with a single generateText call' but the diff still uses streamText. The call was only reformatted (multi-line to single-line), not replaced. The description should be corrected.

Readability Regression: Collapsing the streamText call onto one line makes the example harder to read, opposite of the stated goal. Documentation examples should prioritize clarity. Consider keeping the multi-line format, or if the intent is to truly simplify, switch to generateText and remove the streaming loop entirely.

Minor - process.stdout.write is Node.js-specific: Adding this concrete implementation is nice, but ties the client snippet to Node.js. Since this example appears on the landing page (ProblemSection.tsx) targeting a broader audience including browser developers, a neutral placeholder might be more appropriate.

Positive:

  • Removing actions: { getHistory } is a clean simplification that keeps the example focused.
  • The added inline comments improve scanability.
  • The queue message shortening is fine.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 8, 2026

More templates

@rivetkit/cloudflare-workers

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/cloudflare-workers@4383

@rivetkit/framework-base

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/framework-base@4383

@rivetkit/next-js

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/next-js@4383

@rivetkit/react

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/react@4383

rivetkit

pnpm add https://pkg.pr.new/rivet-dev/rivet/rivetkit@4383

@rivetkit/sql-loader

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sql-loader@4383

@rivetkit/sqlite-vfs

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sqlite-vfs@4383

@rivetkit/traces

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/traces@4383

@rivetkit/workflow-engine

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/workflow-engine@4383

@rivetkit/virtual-websocket

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/virtual-websocket@4383

@rivetkit/engine-runner

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner@4383

@rivetkit/engine-runner-protocol

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner-protocol@4383

commit: bdb7fd4

@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4383 March 8, 2026 07:27 Destroyed
@NathanFlurry NathanFlurry merged commit 9185b7a into main Mar 8, 2026
12 of 17 checks passed
@NathanFlurry NathanFlurry deleted the simplify-agent-example branch March 8, 2026 07:42
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.

1 participant