ekit.agents: unhandled exception while running the...
# ask-ai
r
ekit.agents: unhandled exception while running the job task Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/opentelemetry/util/_decorator.py", line 71, in async_wrapper return await func(*args, **kwargs) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/livekit/agents/ipc/job_proc_lazy_main.py", line 240, in _traceable_entrypoint await self._job_entrypoint_fnc(job_ctx) File "/Users/rhythmvij/Desktop/LupitorNewProjects/VoiceAgentMultiDeploy/voiceagentmulti/agentMulti.py", line 608, in entrypoint stt = google.STT( ^^^^^^ NameError: name 'google' is not defined 2025-08-16 145050,347 - ERROR livekit.agents - unhandled exception while running the job task Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/opentelemetry/util/_decorator.py", line 71, in async_wrapper return await func(*args, **kwargs) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/livekit/agents/ipc/job_proc_lazy_main.py", line 240, in _traceable_entrypoint await self._job_entrypoint_fnc(job_ctx) File "/Users/rhythmvij/Desktop/LupitorNewProjects/VoiceAgentMultiDeploy/voiceagentmulti/agentMulti.py", line 608, in entrypoint stt = google.STT( ^^^^^^
t
Thanks for reaching out, Rhythm. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! That
NameError: name 'google' is not defined
usually pops up when the Google plugin isn’t properly imported or set up in your script. No worries though, here’s how you can fix it: 1. Install the Google Plugin: First, make sure you have the LiveKit Google plugin installed by running:
pip install "livekit-agents[google]~=1.0"
2. Import the Plugin: Then, add this import line to your script:
from livekit.plugins import google
3. Check Your Authentication: Make sure your Google API key is set up in your environment variables. You can do this in a
.env
file or directly in your code as
GOOGLE_API_KEY
. Here’s a simple example of how to use the Google plugin in your `AgentSession`:
Copy code
from livekit.plugins import google

session = AgentSession(
    llm=google.LLM(
        model="gemini-2.0-flash",
    ),
    # Feel free to add other components like STT, TTS, etc. as you need
)
Just double-check that your
GOOGLE_API_KEY
environment variable is set up correctly with your API key, and you should be good to go!