fix: set agent_name via rtc_session decorator, revert CLI flag
AgentServer in livekit-agents 1.4.x does not support --agent-name CLI flag. The agent_name must be set on @server.rtc_session() decorator. Also reverts docker-compose.yml command back to plain python agent.py start. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2
agent.py
2
agent.py
@@ -27,7 +27,7 @@ def prewarm(proc: JobProcess):
|
|||||||
server.setup_fnc = prewarm
|
server.setup_fnc = prewarm
|
||||||
|
|
||||||
|
|
||||||
@server.rtc_session()
|
@server.rtc_session(agent_name=os.environ.get("AGENT_NAME", "matrix-ai"))
|
||||||
async def entrypoint(ctx: JobContext):
|
async def entrypoint(ctx: JobContext):
|
||||||
logger.info("Job received for room %s", ctx.job.room.name)
|
logger.info("Job received for room %s", ctx.job.room.name)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
agent:
|
agent:
|
||||||
build: .
|
build: .
|
||||||
command: python agent.py start --agent-name matrix-ai
|
command: python agent.py start
|
||||||
env_file: .env
|
env_file: .env
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
network_mode: host
|
network_mode: host
|
||||||
|
|||||||
Reference in New Issue
Block a user