TypeScript Agents framework: My Google RealTime ag...
# ask-ai
f
TypeScript Agents framework: My Google RealTime agent does not execute tools. It can read their descriptions and parameters, but completely fails to execute them. The tools work in other configurations. Uniquely, it appears this provider needs tools defined twice - in different formats!? How do I convert an llm.ToolContext into the format required by the
geminiTools
parameter?
t
Thanks for reaching out, Steve. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're correct to notice two different tool formats — they serve different purposes. Quick answer: you cannot convert an
llm.ToolContext
into the
geminiTools
format. Why: •
llm.ToolContext
(tools created with
llm.tool(...)
) are for custom function-calling inside LiveKit Agents. •
geminiTools
(the
_gemini_tools
parameter on
RealtimeModel
) enables Google/Gemini-native integrations (Search, Code Execution, etc.). They are special, provider-native tools and are a different API surface. What that means for your agent: • Gemini Realtime will show tool descriptions but will not execute custom
llm.tool
function calls — Gemini Realtime only supports its native
geminiTools
. • If you need custom tool execution, use one of these alternatives: ◦ Use a non‑realtime Gemini LLM (
google.LLM
) together with your STT/TTS pipeline and pass
tools
normally so function-calling works. ◦ Use a provider that supports realtime function-calling (for example OpenAI Realtime) and attach your
llm.tool
tools there. If you’d like, I can: • Review a short snippet of your current agent config (the `llm`/`RealtimeModel` block and how you register tools) and recommend the minimal code changes to switch to a supported setup. • Show an example converting your session to
google.LLM
+ TTS/STT or to an OpenAI realtime config. Which option do you prefer? Sources: Tool definition and use | LiveKit docs | Gemini Live API plugin | LiveKit docs | Google Gemini LLM plugin guide | LiveKit Docs
f
So you're saying the Google RealTime provider cannot actually execute agent tools?! That's.... very poor. Are you certain?
t
You're right to be frustrated — to confirm: Google Realtime does not execute custom
llm.tool
tools. It only supports its native
geminiTools
integrations (Google/Gemini-provided features like Search or Code Execution). If you need custom tool execution, you can: • Use a non-realtime Gemini LLM (
google.LLM
) with your STT/TTS pipeline so
llm.tool
function-calling works, or • Use a realtime provider that supports function-calling (for example, OpenAI Realtime) and register your
llm.tool
tools there. If you want, share your current `llm`/RealtimeModel config and a short example tool definition and I’ll recommend the minimal changes to switch to one of these alternatives.
f
If what you say is true, it doesn't matter. The Google RealTime provider is - too all practical purposes - useless
t
I hear your frustration — you’re right to expect a realtime provider to run the tools you’ve built. To confirm: Google Realtime cannot execute custom
llm.tool
function calls; it only supports provider-native
geminiTools
. That limitation makes it unsuitable when your workflow depends on custom tool execution. What you can do next (concise options): • Switch to a realtime provider that supports function-calling (example: OpenAI Realtime) and register your
llm.tool
tools there. • Use Gemini non-realtime (
google.LLM
) with your STT/TTS so
llm.tool
function-calling runs as part of the normal LLM turn. • Keep Gemini Realtime for voice/latency-focused use cases that only need Gemini-native tools (Search, Code Execution) and move custom tool logic to a backend service the agent can call via prompts or webhook-like flows. If you’d like, paste your current `llm`/RealtimeModel config and one tool definition and I’ll show the minimal change to migrate to either OpenAI Realtime or `google.LLM`+TTS. Which migration should I prepare an example for?
f
so the advice: don't use Google RealTime [if you want to use agent tools]
t
You're right to be frustrated — don't use Google Realtime if you need custom
llm.tool
execution.
Why: Google Realtime only runs provider-native
geminiTools
(Search, Code Execution, etc.) and does not execute custom
llm.tool
function calls. That makes it impractical for workflows that rely on your own tools. Practical alternatives: • Use OpenAI Realtime (or another realtime provider that supports function-calling) and register your
llm.tool
tools there — keeps realtime behavior + tool execution. • Use
google.LLM
(non‑realtime) together with your STT/TTS pipeline so
llm.tool
function-calling runs during normal turns. • Keep Google Realtime only for use cases that rely solely on Gemini-native tools or ultra-low-latency voice where custom tools are handled by a separate backend you call via prompts/webhooks. If you want, share your current `llm`/RealtimeModel config and one tool definition and I’ll give the minimal example to migrate to OpenAI Realtime or to
google.LLM
+ TTS. Which would you prefer?
f
already said it doesn't matter about sharing code snippets. If Google RealTime is as incapable as you suggest (my tests indicate this is correct).... then the answer is simple: DO NOT USE
t
You’re right — confirmed: Google Realtime does not execute custom
llm.tool
function calls. I understand that makes it unusable for your workflow; that frustration is valid. If you want a single clear recommendation: do not use Google Realtime when you need custom agent tools. If you’d like help moving off it, I can provide a minimal migration example to either: • OpenAI Realtime (keeps realtime + custom tool execution), or •
google.LLM
(non‑realtime) + your STT/TTS pipeline (keeps Gemini but enables
llm.tool
). Which migration would you prefer?
f
nah, my agent code is already capable of multiple configurations and providers (realtime/pipeline). Now I know that the Google RealTime provider is defective, I can move on.