Skip to content

Update guardrails demo to use webrtc - #248

Merged
tadaspetra merged 2 commits into
mainfrom
cursor/skills-examples-regeneration-ed22
Aug 3, 2026
Merged

Update guardrails demo to use webrtc#248
tadaspetra merged 2 commits into
mainfrom
cursor/skills-examples-regeneration-ed22

Conversation

@cursor

@cursor cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Automated regeneration triggered by merge of elevenlabs/skills#108 (Update skills from changelog 2026-07-27).

Generation results

  0 generated · 18 verified · 1 updated · 0 failed
  Total time: 10m 38s
# Example Result Time
1 agents/expo/quickstart ✓ Verified 59s
2 agents/nextjs/guardrails ~ Updated 2m 6s
3 agents/nextjs/quickstart ✓ Verified 44s
4 dubbing/nextjs/quickstart ✓ Verified 26s
5 music/nextjs/quickstart ✓ Verified 41s
6 music/python/quickstart ✓ Verified 18s
7 music/typescript/quickstart ✓ Verified 14s
8 sound-effects/nextjs/quickstart ✓ Verified 25s
9 sound-effects/python/quickstart ✓ Verified 13s
10 sound-effects/typescript/quickstart ✓ Verified 20s
11 speech-engine/nextjs/quickstart ✓ Verified 59s
12 speech-to-text/nextjs/realtime ✓ Verified 50s
13 speech-to-text/python/quickstart ✓ Verified 25s
14 speech-to-text/typescript/quickstart ✓ Verified 23s
15 text-to-speech/nextjs/quickstart ✓ Verified 15s
16 text-to-speech/python/quickstart ✓ Verified 18s
17 text-to-speech/typescript/quickstart ✓ Verified 23s
18 voice-changer/nextjs/quickstart ✓ Verified 16s
19 voice-isolator/nextjs/quickstart ✓ Verified 23s

Changed directories

 agents/nextjs/guardrails/example/app/api/agent/route.ts      |  2 ++
 agents/nextjs/guardrails/example/app/api/conversation-token/route.ts | 42 +++++++++++++++-------
 agents/nextjs/guardrails/example/app/page.tsx      |  9 +++--
 agents/nextjs/guardrails/example/package.json      |  2 +-
 4 files changed, 36 insertions(+), 19 deletions(-)

Assessment

These changes are meaningful — they reflect updated ElevenAgents guardrails skill patterns:

  • WebRTC token migration: conversation-token route now uses getWebrtcToken() instead of getSignedUrl(), and the client uses conversationToken instead of signedUrl/connectionType: websocket
  • Guardrail config: Added model and historyMessageCount fields to the investment-recommendations guardrail
  • Error handling: Uses ElevenLabsError with proper status code propagation
  • Dependency pin: livekit-client override changed from 2.19.1 to 2.16.1
Open in Web View Automation 

Note

Low Risk
Changes are limited to example apps, setup scripts, and a scaffold helper—no production auth or data paths—though the WebRTC migration could affect anyone copying the guardrails demo pattern.

Overview
The agents/nextjs/guardrails example moves voice sessions from WebSocket + signed URL to WebRTC: the conversation-token API calls getWebrtcToken() and returns { token }, and the client starts the session with conversationToken instead of signedUrl / connectionType: "websocket". API errors now use ElevenLabsError with upstream status codes when available.

Agent creation adds model (gemini-2.5-flash-lite) and historyMessageCount: 1 on the custom investment-advice guardrail. livekit-client is pinned to 2.16.1 (down from 2.19.1) in the example package.json and guardrails setup.sh.

Python quickstart scripts (music, sound-effects, speech-to-text, text-to-speech) write streamed audio with writelines, catch ApiError (and clearer KeyError for missing API keys) instead of broad Exception handlers. The scaffold script uses min for reference picking and drops an unused slug binding.

Reviewed by Cursor Bugbot for commit 23383db. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-authored-by: tadas <tadas@elevenlabs.io>
@tadaspetra
tadaspetra marked this pull request as ready for review August 3, 2026 18:15

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ecf22de. Configure here.

Comment thread agents/nextjs/guardrails/example/package.json
@tadaspetra tadaspetra changed the title chore: regenerate examples from updated skills Update guardrails demo to use webrtc Aug 3, 2026
Match setup.sh to the WebRTC-safe livekit-client override, and tighten
Python lint so CI ruff check passes.

Co-authored-by: Cursor <cursoragent@cursor.com>

@tadaspetra tadaspetra left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@tadaspetra
tadaspetra merged commit 62ceda6 into main Aug 3, 2026
3 checks passed
@tadaspetra
tadaspetra deleted the cursor/skills-examples-regeneration-ed22 branch August 3, 2026 18:44
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