While using a dialogflow mega-agent, according to a user setting I want to be able to query a specific sub agent at a time. I have 3 sub agents. Each subagent has similar training phrases but should request different data. The user should be able to select which sub agent they want to use and the query should only go to the selected subagent
To specify one or more sub-agents for a detect intent request, set the subAgents
field of QueryParameters
.
For example:
{
"queryInput": {
"text": {
"text": "reserve a meeting room for six people",
"languageCode": "en-US"
}
},
"queryParams": {
"subAgents": [
{"project": "projects/sub-agent-1-project-id"},
{"project": "projects/sub-agent-2-project-id"}
]
}
}
For more information on Dialogflow ES mega agents, see the Mega agents documentation.