echoing-lamp-18687
12/16/2025, 7:09 AMfierce-zoo-69908
12/16/2025, 7:51 AMfierce-zoo-69908
12/16/2025, 7:51 AMechoing-lamp-18687
12/16/2025, 9:27 AMlively-winter-88668
12/16/2025, 9:43 AMechoing-lamp-18687
12/16/2025, 9:46 AM11:35:34.789 ERROR asyncio Task exception was never retrieved
future: <Task finished name='Task-22'
coro=<RoomIO._on_user_text_input.<locals>._read_text() done, defined at
/home/karandeep/Development/agent-starter-python/.venv/lib/python3.10/site-packages/l…
exception=RuntimeError('AgentSession is closing, cannot use generate_reply()')>
Traceback (most recent call last):
File
"/home/karandeep/Development/agent-starter-python/.venv/lib/python3.10/site-packages/…
line 408, in _read_text
text_input_result = text_input_cb(
File
"/home/karandeep/Development/agent-starter-python/.venv/lib/python3.10/site-packages/…
line 54, in _default_text_input_cb
sess.generate_reply(user_input=ev.text)
File
"/home/karandeep/Development/agent-starter-python/.venv/lib/python3.10/site-packages/…
line 941, in generate_reply
raise RuntimeError("AgentSession is closing, cannot use generate_reply()")
RuntimeError: AgentSession is closing, cannot use generate_reply()
{"room": "voice_assistant_room_1526", "pid": 510405, "job_id": "AJ_mpGGNgbXdLzQ", "room_id":
"RM_bqKpR7ukAufx"}
Traceback (most recent call last):
File
"/home/karandeep/Development/agent-starter-python/.venv/lib/python3.10/site-packages/livekit/agents/voice/room_io/room_io.py", line
408, in _read_text
text_input_result = text_input_cb(
File "/home/karandeep/Development/agent-starter-python/.venv/lib/python3.10/site-packages/livekit/agents/voice/room_io/types.py",
line 54, in _default_text_input_cb
sess.generate_reply(user_input=ev.text)
File "/home/karandeep/Development/agent-starter-python/.venv/lib/python3.10/site-packages/livekit/agents/voice/agent_session.py",
line 941, in generate_reply
raise RuntimeError("AgentSession is closing, cannot use generate_reply()")
RuntimeError: AgentSession is closing, cannot use generate_reply()lively-winter-88668
12/16/2025, 10:24 AMgenerate_reply(). I'm not 100% convinced this is just the MCP server. Are you able to share your MCP server?echoing-lamp-18687
12/16/2025, 10:29 AMsession = AgentSession(
# Speech-to-text (STT) is your agent's ears, turning the user's speech into text that the LLM can understand
# See all available models at <https://docs.livekit.io/agents/models/stt/>
stt=deepgram.STTv2(
model="flux-general-en",
eager_eot_threshold=0.4,
),
# A Large Language Model (LLM) is your agent's brain, processing user input and generating a response
# See all available models at <https://docs.livekit.io/agents/models/llm/>
llm=openai.LLM(model="gpt-4o-mini"),
# Text-to-speech (TTS) is your agent's voice, turning the LLM's text into speech that the user can hear
# See all available models as well as voice selections at <https://docs.livekit.io/agents/models/tts/>
tts=elevenlabs.TTS(
model="eleven_turbo_v2_5",
voice_id="Xb7hH8MSUJpSbSDYk0k2",
),
# VAD and turn detection are used to determine when the user is speaking and when the agent should respond
# See more at <https://docs.livekit.io/agents/build/turns>
turn_detection=MultilingualModel(),
vad=ctx.proc.userdata["vad"],
# allow the LLM to generate a response while waiting for the end of turn
# See more at <https://docs.livekit.io/agents/build/audio/#preemptive-generation>
preemptive_generation=True,
mcp_servers=[
mcp.MCPServerHTTP(url="<https://backend.composio.dev/v3/mcp/939df709-071c-484a-8cec-15d2cd1febe7?user_id=68f2376bbc13f312fec2bd96>")
]
)lively-winter-88668
12/16/2025, 11:15 AMcurl https://backend.composio.dev/v3/mcp/939df709-071c-484a-8cec-15d2cd1febe7?user_id=68f2376bbc13f312fec2bd96 I get redirected to https://backend.composio.dev/v3/mcp/939df709-071c-484a-8cec-15d2cd1febe7/mcp?user_id=68f2376bbc13f312fec2bd96 (note the /mcp before the ?).
I suspect the LiveKit MCP server is not correctly handling the redirect. Can you try with the modified MCP server above? When I test with this updated URL, it seems to load the tools successfully (without the extra /mcp it was not loading the tools)echoing-lamp-18687
12/16/2025, 11:16 AMechoing-lamp-18687
12/16/2025, 1:26 PMlively-winter-88668
12/16/2025, 3:29 PMDo livekit push events when calling toolWe have https://docs.livekit.io/agents/build/events/#function_tools_executed that fires after all the tools are complete