feat(agents): add first-run diagnostics#5577
Open
shizhigu wants to merge 7 commits intolivekit:mainfrom
Open
Conversation
7b01310 to
de02fc8
Compare
2b405ea to
45274ab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
python agent.py doctorwith--json,--online,--deep, and--strict.console,dev,start, andconnect; only fatal results block startup.The default doctor path is intentionally side-effect-free: it does not create rooms, call model providers, download files, mutate env, or write local files.
--onlineonly does a safe LiveKit URL/connectivity check, and--deeponly runs checks that plugins explicitly expose.A few compatibility edges are pinned by tests: legacy plugins stay quiet, plugin metadata imports are lazy so plugin import remains compatible with older agents installs,
console --textskips audio-device preflight, empty CLI credential strings do not clearAgentServervalues, credential-like details are redacted in JSON output, and Python versions newer than the tested range warn instead of blocking.Non-goals
doctordoes not validate provider tokens by calling provider APIs.doctordoes not download model files or create LiveKit rooms.Tests
uv run --extra mcp pytest tests/test_cli_doctor.py tests/test_plugin_diagnostics.py tests/test_plugin_diagnostic_metadata.py tests/test_drain_timeout.py35 passedmake checkgit diff --checkLIVEKIT_URL=wss://diagnostics-test.livekit.cloud LIVEKIT_API_KEY=api-key LIVEKIT_API_SECRET=api-secret uv run examples/voice_agents/basic_agent.py doctor --json