Skip to content

Commit cb13593

Browse files
Update to livekit-agents 1.4, add Python 3.14 support (#47)
* Update to livekit-agents 1.4, add Python 3.14 support * Use explicit dispatch by default Set agent_name="my-agent" on the rtc_session decorator so the agent must be explicitly dispatched to a room rather than auto-joining every new room. Update the taskfile template substitution to match the new decorator-based pattern.
1 parent b66728d commit cb13593

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ build-backend = "setuptools.build_meta"
66
name = "agent-starter-python"
77
version = "1.0.0"
88
description = "Simple voice AI assistant built with LiveKit Agents for Python"
9-
requires-python = ">=3.10, <3.14"
9+
requires-python = ">=3.10, <3.15"
1010

1111
dependencies = [
12-
"livekit-agents[silero,turn-detector]~=1.3",
12+
"livekit-agents[silero,turn-detector]~=1.4",
1313
"livekit-plugins-noise-cancellation~=0.2",
1414
"python-dotenv",
1515
]

src/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def prewarm(proc: JobProcess):
5757
server.setup_fnc = prewarm
5858

5959

60-
@server.rtc_session()
60+
@server.rtc_session(agent_name="my-agent")
6161
async def my_agent(ctx: JobContext):
6262
# Logging setup
6363
# Add any other context you want in all log entries here

taskfile.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ tasks:
3030
- test -z "$LIVEKIT_AGENT_NAME"
3131
cmds:
3232
- |
33-
old="WorkerOptions("
34-
new="WorkerOptions(agent_name=\"{{ .LIVEKIT_AGENT_NAME }}\", "
33+
old='agent_name="my-agent"'
34+
new='agent_name="{{ .LIVEKIT_AGENT_NAME }}"'
3535
file="{{ .PYTHON_MAIN }}"
3636
tmp="$(mktemp)"
3737
while IFS= read -r line; do

0 commit comments

Comments
 (0)