I’m working with Vertex AI Agent Builder and trying to set up Function Tools. The documentation illustrates that when an agent decides to utilize a tool, the response should contain a toolCall object with relevant tool information.
{
"queryResult": {
"text": "check temperature in San Francisco",
"languageCode": "en",
"responseMessages": [
{
"source": "VIRTUAL_AGENT",
"toolCall": {
"tool": "<tool-identifier>",
"action": "fetch-temperature",
"inputParameters": {
"city": "San Francisco"
}
}
}
]
}
}
This works flawlessly in the Agent Builder playbook. When I inquire about temperature, the network request to dialogflow.clients6.google.com/v3alpha1/ retrieves the full toolCall object:
{
"queryResult": {
"text": "what's the temperature in Berlin?",
"languageCode": "en",
"responseMessages": [
{
"source": "VIRTUAL_AGENT",
"toolCall": {
"tool": "projects/myproject/locations/us/agents/12345678-abcd-1234-5678-123456789012/tools/98765432-efgh-5678-9012-987654321098",
"action": "fetchTemperature",
"inputParameters": {
"city": "Berlin, Germany",
"scale": "fahrenheit"
}
}
}
]
}
}
However, when utilizing the Dialogflow Messenger integration, it accesses dialogflow.googleapis.com/v3/ and the toolCall is not present:
{
"queryResult": {
"text": "what's the temperature in Berlin?",
"languageCode": "en",
"responseMessages": [
{}
]
}
}
This creates complications since the session anticipates tool execution results, leading to errors such as “Session is waiting for tool call result of tool and action fetchTemperature”.
What causes the difference in behavior between the playbook and Dialogflow Messenger? How can I ensure that the toolCall data is included in Dialogflow Messenger responses?