Cannot create agent when `.env` contains empty vars
Creating agent with lk agent create fails when .env contains an empty env var (a var with empty value).
The error is twirp error internal: failed to convert secrets
A sample .env file to reproduce:
FOO=1
BAR=
BAZ=3
Here is the full log:
❯ lk agent create --verbose --secrets-file .env.lk
2025-09-09T23:43:59.521-0400 DEBUG lk config/livekit.go:91 loading livekit.toml file
Using project [test]
2025-09-09T23:44:00.809-0400 DEBUG lk lk/agent.go:363 Creating agent {"working-dir": "."}
Using agent configuration [livekit.toml]
Creating new agent
Using secrets file [.env.lk]
Detected project type [python.uv]
Using existing Dockerfile
twirp error internal: failed to convert secrets
Changing the .env file to
FOO=1
BAR=2
BAZ=3
solves the problem.
This is an error on the service side, not on the CLI. Will log the issue in appropriate place. cc @yoonsio
Thanks!
I would argue that the issue should stay open until it is fixed. Unless it is a nofix.
By the end of the day, the lk tool fails. For me as the end user, it does not matter if it is a server side error or a client side. My experience is the Livekit agents tool fails as a whole.
Also, is the service side open source? If not, is there any ETA on this issue?
@korya no, the service is closed-source. I'm happy to leave it open as a placeholder until we resolve on our end.