Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Agent Builder - Conversational agent - Playbook - Conversational Messenger

Hi,

I have created a Conversational agent with settings: Conversation start = Playbook, see the screenshot. In the default playbook I have defined all the instructions and tools, and when testing the agent in the simulator, it works fine. It answers the user's questions as expected.

However, when I try to integrate the agent with Conversational Messenger (as I want to deploy the agent on a website) it suddenly doesn't use the playbook as the entry point, but rather the flow with the default Start Page, and the default intent. I can tell that based on the answers it generates. Why is that? I don't want to define my agent using the rule-based routing/flow. I want to keep it rather generative.

Any ideas how to deploy the agent while it will use my playbook to handle the questions? I tried to define transitions to my playbook in the Routes and also in the Event Handlers under the Start Page in Flow definition, but it doesn't work. 

Thanks for any help, or maybe workaround suggestions.

Regards

Brano

 

brano_1-1732374601926.png

 

 

 

brano_0-1732374580645.png

 

0 4 2,598
4 REPLIES 4

Hi @brano,

Welcome to Google Cloud Community!

Understanding the Issue:

When you deploy an agent to Conversational Messenger, it defaults to using the flow's Start Page and default intent as the entry point. This design is intended to guide users through a structured conversation flow. If you're trying to use a playbook as the entry point instead of the flow, Conversational Messenger doesn't support this directly out of the box.

The issue might arise because in the simulator, the agent may start directly with the playbook, bypassing the default flow. However, when deployed to Conversational Messenger, it initializes with the flow as the starting point, and any transitions defined in the playbook do not override this default behavior.

Here’s how you can likely solve this, with a focus on making the playbook the true starting point within the Conversational Messenger flow:

Modify the Default Start Page: Instead of trying to force a transition from the start page, modify the start page itself to immediately initiate your playbook.

  • Within the Start Page: Remove the default intent. Instead, add a custom event handler. This handler, triggered upon entry to the start page, should execute a specific action to start your playbook. The exact method depends on your Conversational AI platform (Dialogflow, etc.), but generally involves:
    • Calling a function or webhook: This function would directly interact with your agent's backend (where your playbook resides) to initiate the playbook conversation. This might involve sending a special "start playbook" message.
    • Using a system entity/intent: If your platform supports it, define a system entity or intent specifically to trigger the playbook. The start page would then detect this implicit "start playbook" action.

You can read through this documentation regarding flow-based agent basics.

I hope the above information is helpful.

Hi @ibaui,

thanks for your post. I am trying to proceed as you suggested, but I not able to remove the default intent. I am getting this error message:

<eye3 title='FAILED_PRECONDITION'/> generic::FAILED_PRECONDITION: Flows/Pages/TransitionRouteGroups are referencing the intent. Please remove these references first: [Default Start Flow].

Is it even possible to delete the default intent?

Hello,

Same problem here, did you find a solution ? the bot is correctly responding in the console but not in the widget ( conversational messenger)

Unfortunately, I haven't found a completely satisfactory solution or workaround. As an alternative, I've implemented the chatbot assistant using LangChain on Vertex AI (the reasoning engine) and built a custom user interface with the Streamlit framework.

However, this approach requires much more development effort compared to using the Agent Builder. Furthermore, it doesn't inherently provide all the features and functionalities that the Agent Builder offers out-of-the-box.