My agent doesn't work locally and in production

I use python 3.14.5 and livekit-agents 1.5.8 and it doesn’t work, when I run it locally, the agent doesn’t talk, but the logs don’t signal any errors, which is weird.

I decided to create other agents to use locally in the same folder and they work perfectly but it seems that the most important agent, the one in production doesn’t seem to work. I know that if it doesn’t work locally it will not work in livekit cloud. I have been trying to find the issue for hours and it doesn’t work. The code doesn’t have any syntax errors whatsoever.

Here is my AgentSession configuration and for both openai and phonic it does not work :

session = AgentSession(

    turn_handling=TurnHandlingOptions(

    turn_detection=MultilingualModel(),

    interruption={

        "mode": "adaptive",

    },

),

    user_away_timeout=15.0,

    stt=gladia.STT(api_key=gladia_key, languages=\["fr", "en", "es"\]),

    llm=phonic.realtime.RealtimeModel(voice="sabrina",default_language="fr")

   

    \# llm=openai.realtime.RealtimeModel(

    \#     model="gpt-realtime-1.5",

    \#     voice="coral",

    \#     turn_detection=TurnDetection(

    \#         type="semantic_vad",

    \#         eagerness="auto",

    \#         interrupt_response=True,

    \#     ),

    \# ),

)

Here are the logs of the console :

uv run agent.py console
C:\Users\ndoum\OneDrive\Desktop\Garage Voice Agent\my_env\Lib\site-packages\livekit\rtc\event_emitter.py:160: DeprecationWarning: ‘asyncio.iscoroutinefunction’ is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
if asyncio.iscoroutinefunction(callback):
Agents Starting console mode :rocket:

DEBUG:asyncio:Using proactor: IocpProactor
11:43:43.656 DEBUG asyncio Using proactor: IocpProactor
INFO:livekit.agents:starting worker
11:43:43.661 INFO livekit.agents starting worker {“version”: “1.5.8”, “rtc-version”: “1.1.7”}
INFO:livekit.agents:plugin registered
11:43:43.663 INFO livekit.agents plugin registered
{“plugin”: “livekit.plugins.openai”, “version”: “1.5.8”}
INFO:livekit.agents:plugin registered
11:43:43.665 INFO livekit.agents plugin registered
{“plugin”: “livekit.plugins.gladia”, “version”: “1.5.8”}
INFO:livekit.agents:plugin registered
11:43:43.668 INFO livekit.agents plugin registered
{“plugin”: “livekit.plugins.ai_coustics”, “version”: “0.2.13”}
INFO:livekit.agents:plugin registered
11:43:43.670 INFO livekit.agents plugin registered
{“plugin”: “livekit.plugins.turn_detector.base”, “version”: “1.5.8”}
INFO:livekit.agents:starting inference executor
11:43:43.672 INFO livekit.agents starting inference executor
INFO:livekit.agents:initializing process
11:43:43.698 INFO livekit.agents initializing process {“pid”: 1536, “inference”: true}
INFO:livekit.agents:process initialized
11:44:05.568 INFO livekit.agents process initialized
{“pid”: 1536, “inference”: true, “elapsed_time”: 21.86}
INFO:livekit.agents:HTTP server listening on :49797
11:44:05.575 INFO livekit.agents HTTP server listening on :49797
WARNING:livekit.agents:no warmed process available for job, waiting for one to be created
11:44:05.580 WARNING livekit.agents no warmed process available for job, waiting for one to be created
{“job_id”: “mock-job-abdcc1049ef1”}
INFO:livekit.agents:initializing job runner
11:44:05.587 INFO livekit.agents initializing job runner {“tid”: 13688}
INFO:livekit.agents:job runner initialized
11:44:05.591 INFO livekit.agents job runner initialized {“tid”: 13688, “elapsed_time”: 0.0}
DEBUG:asyncio:Using proactor: IocpProactor
DEBUG asyncio Using proactor: IocpProactor
C:\Users\ndoum\OneDrive\Desktop\Garage Voice Agent\my_env\Lib\site-packages\livekit\rtc\event_emitter.py:160: DeprecationWarning: ‘asyncio.iscoroutinefunction’ is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
if asyncio.iscoroutinefunction(callback):

So I decided to use the Agent Console by looking I saw that Phonic had an api error, replaced it with openai realtime try to use the console and the agent still doesn’t speak but weirdly enough it spoke in the livekit agent console

From your logs, the worker and job runner start correctly, so this is likely an audio I/O or inference issue in console mode rather than a syntax error.

In console mode, LiveKit doesn’t use WebRTC—only local audio devices and LiveKit Inference credentials. If the agent speaks in Agent Console (Cloud) but not locally, check:

  1. Environment variables: LIVEKIT_API_KEY, LIVEKIT_API_SECRET, and LIVEKIT_URL must be set for inference in console mode.

  2. Audio devices: Run
    uv run agent.py console --list-devices
    then explicitly set --input-device and --output-device.

  3. Test text-only:
    uv run agent.py console --text
    If it responds in text, the issue is local audio output.

Building on @RabbaniF22’s framing (audio I/O or inference path, not syntax), two complementary causes worth eliminating in parallel:

  • Python 3.14.5 is bleeding-edge for livekit-agents 1.5.8. The deprecation warning you logged on asyncio.iscoroutinefunction in livekit-rtc hints at async-callback compat that hasn’t caught up; the registration path can silently no-op. That matches “no errors, no output” and explains why Cloud Console (stable Python) works while local doesn’t. Downgrade to Python 3.12 or 3.13.
  • interruption={"mode": "adaptive"} needs the Cloud /bargein gateway. Per a thread yesterday, Barge-in is gated to Cloud-hosted agents with a small trial allowance for self-hosted. Cloud Console works because it runs Cloud-side; locally you may be silently falling back to VAD or hitting the trial cap. Swap to interruption={"mode": "vad"} while isolating.

Also bump to livekit-agents==1.5.9 (shipped two days ago with a track-republish-on-reconnect fix).

If RabbaniF22’s --text test responds correctly and the agent still doesn’t speak after the Python downgrade, the entrypoint isn’t reaching await session.start(...). Share that code if you hit that wall.