Dialogflow Messenger missing function call details in Agent Builder response

I’m working with Agent Builder and trying to implement Function Tools. Based on the documentation, when my agent decides to use a tool, I should receive function call information in the API response.

{
  "result": {
    "userQuery": "temperature check for San Francisco",
    "language": "en",
    "messages": [
      {
        "type": "BOT",
        "functionCall": {
          "resource": "<function-resource-id>",
          "method": "fetch-temperature",
          "params": {
            "city": "San Francisco"
          }
        }
      }
    ]
  }
}

Testing in the Agent Builder console works perfectly. When I ask about temperature, the network call to dialogflow.clients6.google.com shows the function call details:

"result": {
  "userQuery": "what's the temperature in Berlin?",
  "language": "en",
  "messages": [
    {
      "type": "BOT",
      "functionCall": {
        "resource": "projects/myproject/locations/us/agents/abc123/tools/def456",
        "method": "fetchTemperature",
        "params": {
          "city": "Berlin, Germany",
          "scale": "fahrenheit"
        }
      }
    }
  ]
}

However, when using Dialogflow Messenger integration, the API calls dialogflow.googleapis.com/v3/ and returns empty response data:

"result": {
  "userQuery": "what's the temperature in Berlin?",
  "language": "en",
  "messages": [
    {}
  ]
}

This causes subsequent requests to fail with an error about waiting for function execution results. The console and messenger seem to behave differently with the same agent configuration. Why doesn’t the messenger integration return function call information?

yeah this is defintely a known bug with the messenger widget. had the same headache trying to get function calls working properly. the easiest fix i found was just ditching the default messenger and building a simple custom chat ui that calls the api directly. takes maybe an hour to set up basic html/js and you get all the function data you need.

This inconsistency between Agent Builder console and Dialogflow Messenger is actually a known limitation with the current implementation. The messenger widget uses a different API endpoint that doesn’t fully support Function Tools integration yet. I encountered this exact issue last month when deploying a weather bot. The root cause is that Dialogflow Messenger relies on the v3 REST API which has incomplete Function Tools support compared to the console’s internal API. Google’s documentation mentions this briefly but it’s easy to miss. As a workaround, you’ll need to implement your own chat interface using the Agent Builder SDK directly instead of the pre-built messenger widget. This gives you access to the full API response including function call details. Alternatively, you can handle function execution on the backend using fulfillment webhooks, though this requires restructuring your agent’s flow somewhat. Google has indicated they’re working on bringing full Function Tools support to all integration channels, but no timeline has been provided yet.

Been dealing with this exact pain point for months now. The core issue is that Dialogflow Messenger wasn’t designed with Function Tools in mind originally.

What’s happening is the messenger integration has its own middleware layer that processes responses before they reach your application. This layer strips out function call metadata because it assumes functions should be handled server-side through fulfillment webhooks.

I solved this by creating a hybrid approach. Keep using the messenger widget for the UI, but override its API calls by intercepting the requests at the network level. You can do this by:

  1. Capturing the user input from the messenger
  2. Making your own detectIntent call to get the full response with function details
  3. Executing your function logic
  4. Feeding the final result back to the messenger display

This way you get both the clean messenger UI and access to function call data. Takes about 50 lines of JavaScript to wire up properly.

The alternative is waiting for Google to fix their messenger implementation, but I wouldn’t hold my breath. This has been broken for over a year now.

I ran into this same frustrating issue about two weeks ago while building a customer service bot. The problem stems from how Dialogflow Messenger handles Function Tools internally. When you use the messenger integration, it actually intercepts function calls and attempts to execute them automatically rather than passing the raw function call data to your application. This behavior differs significantly from what you see in the console testing environment. The empty message object you’re receiving indicates that the messenger is expecting your function to return a response directly, but since it can’t properly execute the function call, it returns nothing. What worked for me was switching to the detectIntent API calls directly from my frontend instead of relying on the messenger widget. You lose some of the built-in UI conveniences, but you gain full control over the function execution flow. The detectIntent method properly returns the functionCall object as documented, allowing you to handle the function execution logic in your own code and then send the results back via the fulfillIntentRequest.