Skip to content

docs(examples): make basic_agent a copy of agent-starter-node - #3055

Open
bcherry wants to merge 3 commits into
mainfrom
bcherry/sync-starter-templates
Open

bcherry wants to merge 3 commits into
mainfrom
bcherry/sync-starter-templates

Conversation

@bcherry

@bcherry bcherry commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

basic_agent.ts is meant to be the starter agent, but it had drifted from agent-starter-node: different models, and a pile of feature demos added by feature PRs. Most of those demos are now SDK defaults (AEC warmup, text filters, false interruption resume, TTS-aligned transcripts).

Changes Made

  • Replace basic_agent.ts with the starter's src/agent.ts and src/main.ts, in one file. The header links to the starter and lk agent init.
  • Add @livekit/plugins-ai-coustics to the examples, for the starter's noise cancellation.
  • Rewrite the README snippet, which used removed APIs (WorkerOptions, livekit.turnDetector), with the starter's models, the end call tool, and GPT-Live as the speech-to-speech option.
  • Stop the README from telling contributors to edit basic_agent.ts for plugin changes.
  • Add "Starter templates" to AGENTS.md: every copy of the starter agent, including Agent Builder's defaults, and a rule that basic_agent stays a copy, with new feature demos going in their own example.

Pre-Review Checklist

  • Build passes: pnpm build, eslint, and prettier pass locally
  • Video demo: not applicable, no SDK change

Testing

  • pnpm build passes. The README snippet type-checks.
  • Not run against LiveKit Cloud

Related

@changeset-bot

changeset-bot Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 16f62c2

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

cli.runApp(
new ServerOptions({
agent: fileURLToPath(import.meta.url),
agentName: 'my-agent',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 Basic agent no longer auto-joins

agentName: 'my-agent' leaves rooms that rely on automatic dispatch without a voice agent. ServerOptions also ignores LIVEKIT_AGENT_NAME when a name is set in code.

Learn more

The connectivity walkthrough starts the basic agent in dev mode and opens a call without documenting any explicit dispatch. ServerOptions documents that a named server receives only explicit dispatches, and its name resolution gives a name in code precedence over LIVEKIT_AGENT_NAME. The worker then registers that resolved name. The development command can succeed while the call never reaches the example's entrypoint.

Example: Start the sample with only LiveKit credentials, then open a new room with a token that has no agent dispatch. The worker registers as my-agent, but no job arrives and the caller hears no greeting. A frontend that explicitly targets support and previously set LIVEKIT_AGENT_NAME=support also no longer selects this worker.

Recommended fix: Preserve the example's previous name resolution by omitting the hardcoded name. If the repository copy must retain the starter's explicit dispatch contract, update the connectivity walkthrough to dispatch my-agent and explain which setting controls the name.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

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