Update Node starter to LiveKit Agents 1.5#54
Conversation
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>
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>
| 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`. |
There was a problem hiding this comment.
I don't think it's a good idea to say you can also subclass voice.Agent, since they should be equally powerful(?)
There was a problem hiding this comment.
Both are equally powerful just differ in syntax
There was a problem hiding this comment.
yeah so no need to have the second line of the comment
There was a problem hiding this comment.
Removed the second comment line.
rektdeckard
left a comment
There was a problem hiding this comment.
I think we should wait for stable release to update our public templates, but otherwise this looks good.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
| 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`. |
There was a problem hiding this comment.
yeah so no need to have the second line of the comment
| }, | ||
| "dependencies": { | ||
| "@livekit/agents": "^1.4.7", | ||
| "@livekit/agents": "1.5.x", |
There was a problem hiding this comment.
Changed the range to ^1.5.0. I also upgraded the starter to Zod 4.
Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Updates the Node starter to the stable LiveKit Agents 1.5 release line and adapts the starter to the 1.5 API.
@livekit/agents1.5.x, currently resolving to 1.5.0.@livekit/rtc-node^0.13.31to satisfy the Agents 1.5 peer requirement.Agent.createAPI and current tool/toolset examples.mainchanges, including Node 24 native type stripping and the Gemma 31B default model.pnpm-lock.yamlandpnpm-workspace.yamluntracked, matching the existing starter template policy.Validation
pnpm typecheck— passed.pnpm lint— passed.pnpm test— passed (3 tests).pnpm peers check— passed; no peer dependency issues.pnpm build— not available because currentmainintentionally removed the build script in favor of running TypeScript directly with Node 24.Dependency installation resolved
@livekit/agents1.5.0 and@livekit/rtc-node0.13.31. Local verification ran with Node 22.15.1 and emitted the expected engine warning because the merged starter now requires Node 24.