Skip to content

Adopt @livekit/agents 1.5.0 (pre-release)#54

Open
toubatbrian wants to merge 5 commits into
mainfrom
brian/agents-1.5.0-prerelease
Open

Adopt @livekit/agents 1.5.0 (pre-release)#54
toubatbrian wants to merge 5 commits into
mainfrom
brian/agents-1.5.0-prerelease

Conversation

@toubatbrian

@toubatbrian toubatbrian commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adopts the upcoming @livekit/agents 1.5.0 by pinning the published pre-release and adapting src/ to the 1.5.0 API.

Version bump (package.json)

  • dependencies."@livekit/agents": ^1.4.7 → exact 0.0.0-next-20260624041820 (the next dist-tag pre-release).
  • @livekit/plugins-ai-coustics (^0.2.14) is intentionally unchanged — it is a separately-versioned noise-cancellation package, not part of the agents-js 1.5.0 release. There are no @livekit/agents-plugin-* deps in this starter (it is fully inference-based).

The exact 0.0.0-next-20260624041820 pin is for reproducible validation against the pre-release and should be repinned to stable 1.5.0 once it is published.

src/ adaptations

  • src/agent.ts: updated the commented-out tools example from the old object-map syntax (tools: { getWeather: llm.tool({...}) }) to the 1.5.0 flat-array syntax with a required name:
    tools: [
      llm.tool({ name: 'getWeather', description, parameters, execute }),
    ]
    Also added a one-line note that voice.Agent.create({ ... }) is now available as an alternative to subclassing voice.Agent (the class-based form is kept and remains valid).
  • src/main.ts and src/agent.test.ts: no changes required — the session setup (inference.STT/TTS/TurnDetector, turnHandling, voice.AgentSession, session.start, generateReply, ai-coustics noise cancellation) and the eval test API (session.run, result.expect.nextEvent().isMessage().judge(), noMoreEvents()) all type-check and pass unchanged against the pre-release.

Validation

All run against 0.0.0-next-20260624041820:

  • pnpm install — ✅ resolves and installs the exact pre-release
  • pnpm typecheck — ✅ pass
  • pnpm build — ✅ pass (dist/main.js)
  • pnpm lint — ✅ pass
  • pnpm test (vitest, 3 eval tests via the LiveKit inference gateway) — ✅ 3 passed

agents-cli smoke test

Ran the worker on the pre-release (node dist/main.js devregistered worker, version: 0.0.0-next-20260624041820) and drove it in text mode with agents-cli:

  • new --agent my-agent --mode text → session created.
  • Greeting turn (--resume --until 'conversation_item_added(.item.message.role="ASSISTANT")') → outcome ok, exit 0, no error events. Greeting: "Hi there. How can I help you today?"
  • User turn (--say "hello") → outcome ok, exit 0, no error events. Reply: "Hello. What can I help you with today?"

No error events, agent greets and replies correctly, exit code 0 — the starter runs cleanly on the 1.5.0 pre-release.

toubatbrian and others added 3 commits June 23, 2026 21:33
Bump @livekit/agents to the 0.0.0-next-20260624041820 pre-release (next
dist-tag) to validate against the upcoming 1.5.0 release. Pinned exactly
for reproducible validation; to be repinned to stable 1.5.0 on release.

Update the commented-out tools example in agent.ts to the 1.5.0 flat-array
tool syntax with a required `name` (llm.tool({ name, ... }) in a `tools: [...]`
array), and note that voice.Agent.create({...}) is now available as an
alternative to subclassing voice.Agent.

Co-authored-by: Cursor <cursoragent@cursor.com>
toubatbrian and others added 2 commits June 23, 2026 22:04
check-template-files fails when pnpm-lock.yaml is tracked, and these files
(absent on main) altered CI's install so prettier wasn't resolved. Untrack
them to align with main.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread src/agent.ts
super({
instructions: dedent`
// Build a custom voice AI assistant with the functional `Agent.create` API
// (introduced in @livekit/agents 1.5.0). You can also subclass `voice.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.

I don't think it's a good idea to say you can also subclass voice.Agent, since they should be equally powerful(?)

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.

are they?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Both are equally powerful just differ in syntax

Comment thread src/agent.ts
// tools keep working across agent handoffs. Add the toolset to this `tools` array like any
// other tool:
//
// let supportClient: SupportClient | undefined;

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.

maybe we should actually have a working example here? what's a simple backend service that we could connect to that requires a long-running connection that we could showcase?

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

I think we should wait for stable release to update our public templates, but otherwise this looks good.

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