Describe the bug
With the deprecation of python agent.py console/dev in favor of lk agent dev / lk agent console (per the 1.6.8 release notes, #6656), the new Go-based CLI only supports setting log level via the --log-level flag on lk agent dev. There is no environment variable equivalent (e.g. LIVEKIT_LOG_LEVEL, LOG_LEVEL), which the old Python CLI workflow relied on. This is also tracked as a general feature request in livekit/agents#4340, but it especially affects the new lk agent commands since they are now the recommended entrypoint.
Additionally, lk agent console does not expose a --log-level flag at all (per the CLI docs: https://docs.livekit.io/reference/developer-tools/livekit-cli/agent/#console), so there is currently no supported way to reduce verbosity in console mode.
To Reproduce
- Run
lk agent dev (or lk agent console) in a project.
- Set
LIVEKIT_LOG_LEVEL=info (or similar) in the environment.
- Observe that DEBUG-level logs are still printed.
- Attempt to pass
--log-level to lk agent console — flag does not exist.
Expected behavior
lk agent dev should respect a LIVEKIT_LOG_LEVEL (or similar) environment variable, consistent with how deployed agents on LiveKit Cloud already do (per https://docs.livekit.io/deploy/agents/logs/#log-levels).
lk agent console should support a --log-level flag (or the same environment variable) so verbosity can be controlled locally, matching lk agent dev.
Environment
lk CLI version: <fill in your lk --version output>
- OS:
- livekit-agents version:
Additional context
Related: livekit/agents#4340 (log level via env var / ServerOptions)
Describe the bug
With the deprecation of
python agent.py console/devin favor oflk agent dev/lk agent console(per the 1.6.8 release notes, #6656), the new Go-based CLI only supports setting log level via the--log-levelflag onlk agent dev. There is no environment variable equivalent (e.g.LIVEKIT_LOG_LEVEL,LOG_LEVEL), which the old Python CLI workflow relied on. This is also tracked as a general feature request in livekit/agents#4340, but it especially affects the newlk agentcommands since they are now the recommended entrypoint.Additionally,
lk agent consoledoes not expose a--log-levelflag at all (per the CLI docs: https://docs.livekit.io/reference/developer-tools/livekit-cli/agent/#console), so there is currently no supported way to reduce verbosity in console mode.To Reproduce
lk agent dev(orlk agent console) in a project.LIVEKIT_LOG_LEVEL=info(or similar) in the environment.--log-leveltolk agent console— flag does not exist.Expected behavior
lk agent devshould respect aLIVEKIT_LOG_LEVEL(or similar) environment variable, consistent with how deployed agents on LiveKit Cloud already do (per https://docs.livekit.io/deploy/agents/logs/#log-levels).lk agent consoleshould support a--log-levelflag (or the same environment variable) so verbosity can be controlled locally, matchinglk agent dev.Environment
lkCLI version: <fill in yourlk --versionoutput>Additional context
Related: livekit/agents#4340 (log level via env var / ServerOptions)