Skip to content

docs(examples): make basic_agent a copy of agent-starter-python - #8749

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

Why

basic_agent.py is meant to be the starter agent, but it had drifted from agent-starter-python: different models, and a pile of feature demos added by feature PRs. Most of those demos are now SDK defaults (AEC warmup, markdown and emoji filters, false interruption resume) or deprecated (metrics_collected).

Changes

  • Replace basic_agent.py with the starter's src/agent.py. The header links to the starter and lk agent init.
  • Add livekit-plugins-ai-coustics to the voice_agents example dependencies, for the starter's noise cancellation.
  • Update the README snippets to the starter's models and EndCallTool, and show GPT-Live instead of the deprecated OpenAI Realtime API.
  • 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.

basic_agent.py was the only inference.responses.LLM example (#8213). If we want to keep one, it should be its own file.

Related

Testing

ruff check and ruff format --check pass. Loaded the agent and the README snippet with dummy credentials. Not run against LiveKit Cloud.

@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.

2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

@server.rtc_session()
async def entrypoint(ctx: JobContext) -> None:
# each log entry will include these fields
@server.rtc_session(agent_name="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.

🔴 Starter agent missing from rooms

After the documented dev launch, rtc_session registers my-agent, so rooms created without explicit dispatch get no assistant. The hardcoded name also overrides LIVEKIT_AGENT_NAME, so dispatches targeting a previously configured name no longer reach it.

Learn more

The root README’s example launch command starts the worker without a dispatch step. The worker’s dispatch contract says named workers do not receive jobs automatically when a room is created. The name resolution order also puts the decorator’s name ahead of LIVEKIT_AGENT_NAME, which the previous unnamed decorator honored.

Example: Run the example in dev and join a new room with a room token that does not request an agent. The client joins but never hears a greeting, because no job starts for the named starter.

Recommended fix: If the explicit name must stay to match upstream, add a my-agent dispatch step to the documented dev flow and document how to migrate an existing custom name. Otherwise, retain the unnamed decorator and make the dispatch policy change in the source starter first.

Devin Review


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

This branch has not been deployed

No deployments
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