Skip to content

examples(inference): add playground inference agent#1553

Closed
rosetta-livekit-bot[bot] wants to merge 1 commit into
mainfrom
wheels-ugly-decreed
Closed

examples(inference): add playground inference agent#1553
rosetta-livekit-bot[bot] wants to merge 1 commit into
mainfrom
wheels-ugly-decreed

Conversation

@rosetta-livekit-bot
Copy link
Copy Markdown
Contributor

@rosetta-livekit-bot rosetta-livekit-bot Bot commented May 19, 2026

Summary

Turns the Inference example into a lightweight agent-builder playground that pairs with the corresponding Jukebox PR (livekit/agents-jukebox#TODO).

  • Editable system prompt. Adds a set_system_prompt RPC that rewrites agent.instructions live. Deduped against the current value so the per-keystroke fires from the frontend don't spam update_instructions.
  • "Open in Builder" CTA. New type: link control in the YAML with an href_template that opens Cloud Builder pre-populated with the current instructions (URL-encoded), llm, stt, tts, and modelMode=pipeline. project_id is the p_ placeholder so Cloud routes through login when needed and preserves the params on redirect.
  • Live transcript view. Adds a views[].source: transcript entry; the Jukebox frontend renders LiveKit TranscriptionReceived segments into the existing view-card slot — no agent-side push needed.
  • Defaults bumped. cartesia/sonic-2cartesia/sonic-3, openai/gpt-4o-miniopenai/gpt-4.1-mini, both in playground.yaml and the agent's DEFAULT_* constants. Seed INSTRUCTIONS aligned with the textarea's default so the first session matches what the user sees before any edit.

YAML schema also picks up doc comments for the new textarea / link control types and the transcript view source — the Jukebox PR has the corresponding parser + renderer changes.

Test plan

  • cd examples/inference && python agent.py dev — connect via Jukebox playground; verify prompt edits land (system prompt updated (N chars) in agent logs) and the agent's behaviour changes within a turn.
  • Pick a new STT / LLM / TTS — confirm the model swap still works after the prompt-editing changes.
  • Click "Open in Builder" — confirm a Cloud Builder URL opens in a new tab with instructions, llm, stt, tts, and modelMode=pipeline matching the current Playground state.
  • Default-only session (no edits) — verify the agent's initial prompt matches the textarea's seed.

Made with Cursor

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 19, 2026

⚠️ No Changeset found

Latest commit: e433be9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@u9g u9g closed this May 19, 2026
@u9g u9g deleted the wheels-ugly-decreed branch May 19, 2026 22:41
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants