polite-dog-12152
05/02/2026, 5:07 AMtall-airline-16756
05/02/2026, 5:07 AMtall-airline-16756
05/02/2026, 5:08 AMtool_search and `call_tool`; keeps a fixed tool list so providers can reuse prompt caches while still loading tool implementations on demand.
Quick example (Python):
from livekit.agents.beta.toolsets import ToolProxyToolset
class TravelAgent(Agent):
def __init__(self):
super().__init__(
instructions="You are a travel planning assistant. Use tool_search to find the right tools.",
tools=[
ToolProxyToolset(
id="travel_tools",
tools=[
WeatherToolset(),
FlightToolset(),
convert_currency,
],
max_results=3,
)
],
)
Notes:
• Default search uses BM25 ranking; you can switch to KeywordSearchStrategy or implement a custom SearchStrategy.
• Supported lazy-loaded items: standalone function tools, Toolset groups, and MCPToolset servers.
• Feature is Python-only and marked Beta.
Do you want an example using ToolSearchToolset, a custom search strategy, or help integrating this into your existing agent code?
Sources: Function tool definition | LiveKit Documentation, with interactive elementspolite-dog-12152
05/02/2026, 5:24 AMtall-airline-16756
05/02/2026, 5:24 AMcall_tool (keeps a fixed proxy list and invokes tools on demand).
• How to implement a custom SearchStrategy (replace BM25 with your own ranking).
• Help integrating lazy loading into your existing agent code — if so, please share a short snippet or describe your agent setup (Python version, agent framework/code sample)., with interactive elementspolite-dog-12152
05/02/2026, 5:29 AMtall-airline-16756
05/02/2026, 5:29 AMToolProxyToolset / ToolSearchToolset or a fixed tool list?
5. Where is your agent/runtime hosted vs. the model provider (same region or across regions)? Any network latency numbers (ping/traceroute)?
6. Do you see delays before inference starts (request queued) or only after inference completes? Any timestamps/logs you can share for a single request (send time, model start, model end, response received)?
7. Are you doing any post‑processing (serialization, reranking, embeddings search) after model output?
Based on common causes, likely contributors are:
• Non‑streaming response buffering on the provider side.
• Tool discovery or external API calls invoked during the turn.
• Network latency between your runtime and the model provider.
• Prompt construction, retrieval/embedding lookups, or reranking work done before/after inference.
• Prompt cache misses or repeated context prep each turn.
Share answers (or a short request/response timeline) and I’ll suggest targeted checks and fixes.
, with interactive elementspolite-dog-12152
05/02/2026, 5:30 AMtall-airline-16756
05/02/2026, 5:30 AM