Skip to content

Commit e5f1120

Browse files
seahycclaude
andcommitted
Handle agent_tool_request event type in MessageHandler
When the ElevenLabs agent calls a server-side tool (webhook), the SDK receives an agent_tool_request message but previously hit the default case, logging "Unknown event type: agent_tool_request". This is a valid event type that should be handled. Since it is informational only (the agent_tool_response already handles the result), we just pass it to the debug callback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d529c54 commit e5f1120

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/src/messaging/message_handler.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ class MessageHandler {
9696
_handleMcpConnectionStatus(json);
9797
break;
9898

99+
case 'agent_tool_request':
100+
// Agent is about to call a tool (webhook, etc.) - informational only
101+
callbacks.onDebug?.call(json);
102+
break;
103+
99104
case 'agent_tool_response':
100105
callbacks.onDebug?.call(json);
101106
_handleAgentToolResponse(json);

0 commit comments

Comments
 (0)