Dialogflow Messenger missing toolCall response from Vertex AI Agent functions

I’m working with Vertex AI Agent Builder and trying to implement function tools. The problem is that I get different responses depending on how I test the agent.

When testing in Agent Builder playbook:
I ask “what’s the temperature today” and the network request shows a proper toolCall response:

{
  "queryResult": {
    "text": "what's the temperature in Berlin?",
    "languageCode": "en",
    "responseMessages": [
      {
        "source": "VIRTUAL_AGENT",
        "toolCall": {
          "tool": "projects/myproject/locations/us/agents/abc123-def4-5678-90gh-ijklmnop1234/tools/xyz789-abc1-2345-6789-defghijk0123",
          "action": "fetchTemperature",
          "inputParameters": {
            "city": "Berlin, Germany",
            "scale": "fahrenheit"
          }
        }
      }
    ]
  }
}

When using Dialogflow Messenger integration:
The same question returns an empty response without the toolCall data:

{
  "queryResult": {
    "text": "what's the temperature in Berlin?",
    "languageCode": "en",
    "responseMessages": [
      {}
    ]
  }
}

This causes issues because my client code never receives the function call details, and subsequent requests fail with “Session is waiting for tool call result of tool and action fetchTemperature”.

Why does the playbook testing environment return toolCall data while Dialogflow Messenger doesn’t? How can I get the function calling information in the messenger integration?

This is normal behavior - the two environments work differently. The playbook testing interface shows everything for debugging, including toolCall objects.

Dialogflow Messenger hides toolCall responses because it’s built for end users, not debugging. It expects your webhook to handle function execution and return a final response.

Here’s what’s happening:

  1. User asks about temperature
  2. Vertex AI generates toolCall (you see it in playbook, but messenger hides it)
  3. Your webhook should catch this toolCall
  4. Execute the function and return results
  5. Agent processes results and gives final answer

You need a webhook endpoint that:

  • Receives the toolCall from Vertex AI
  • Executes your fetchTemperature function
  • Returns the result back to the agent
  • Agent then responds with actual temperature to user

I hit this exact same issue last year building a weather bot. Think of toolCalls as internal system messages - users shouldn’t see them.

Check your agent’s webhook configuration and make sure it’s handling the function execution properly. The messenger will only show the final response, never the intermediate toolCall steps.

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.