Need programmatic agent handoff & tool calls in JS (latency + break issues)

Author: azartalentCreated Aug 22, 2025Updated Aug 22, 2025

We are using @openai/agents-realtime in ReactJS. Currently, tool calls (showCurrentAgent, agentComplete, etc.) and agent handoffs must be handled via instructions.

Problems faced: • Sometimes the model does not call the tool or stalls after a tool call → conversation breaks. • Tool calls via instructions add noticeable latency for simple UI updates.

Request: Please add support for: 1. Direct tool invocation from JS (without waiting for model output). 2. Agent handoff events / callbacks so we can switch agents programmatically. 3. Option to bypass model for UI-only tools (like showCurrentAgent).

This would reduce latency and avoid conversation stalls when the model fails to call tools as instructed.

Source: openai/openai-realtime-agents