Skip to content

Commit f2fc389

Browse files
u9gclaude
andcommitted
test(session-e2e): simplify echo-agent entrypoint to cli.run_app
The daemon launches the agent via the thin CLI (python -m livekit.agents console <entrypoint> --connect-addr), which discovers the server and dispatches to the TCP console itself. The agent file's __main__ console-dispatch hack was compensating for the old python agent.py launch path and is now dead code. Collapse it to the thin cli.run_app(server) form, matching agent-starter-python. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 997b748 commit f2fc389

1 file changed

Lines changed: 1 addition & 16 deletions

File tree

cmd/lk/testdata/echo-agent/agent.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,4 @@ async def entrypoint(ctx: JobContext):
3030

3131

3232
if __name__ == "__main__":
33-
import sys
34-
35-
argv = sys.argv[1:]
36-
if argv and argv[0] == "console":
37-
# The daemon launches `python agent.py console --connect-addr <addr>`, but
38-
# cli.run_app() sends `console` to the legacy click CLI (no --connect-addr),
39-
# so dispatch to the TCP console directly.
40-
from livekit.agents.cli.cli import _run_tcp_console
41-
42-
_run_tcp_console(
43-
server=server,
44-
connect_addr=argv[argv.index("--connect-addr") + 1],
45-
record="--record" in argv,
46-
)
47-
else:
48-
cli.run_app(server)
33+
cli.run_app(server)

0 commit comments

Comments
 (0)