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

How to craft examples for multi-agent systems (Playbook)

Hi All,

I am facing some issues in crafting examples for multi-agent systems using Playbook. Basically I have a main agent that talks to other child agents and those agents will report back to the main.

For example the workflow should be A (parent)->B(Child)->A->C(child)->A. I can route from A to B, but then B cannot go back to A after it has completed. My main playbook instructions are as follows:

  • -route to ${playbook B}. Store parameters
  • -route to ${playbook C}. Store parameters.
  • Summarize all parameters

For the B instructions, it is as follows.

  • -collect users inputs
  • run calculations
  • store as parameters
  • set playbook status as OK and return to main playbook

I can't use the command ${playbook A} as it complains of a loop detected.

As such, I tried to use examples for playbook A and B, but i'm facing issues here. Mainly as follows:

  • Playbook A: How do i create an example that clearly shows B being invoked, collect all the inputs and exit. Then invoke C and exit back to A. Do i need to write the whole APP flow here since this playbook controls it all.
  • Playbook B&C: I'm not able to create an example that shows B exiting and going to A. When I use the invoke playbook for A to mimic going back to A, it gives an error about referencing playbook.

Please advise on how to craft examples for the main and child playbooks for multi-agent approach. I do think that my instructions are clear enough. Please correct me if I'm wrong. Thank you. 

 

 

1 2 819
2 REPLIES 2

Hi @polion6,

Welcome to the Google Cloud Community!

It seems you're encountering an issue with Playbook's restriction against loops, making it challenging to return from child playbooks (B and C) to the main playbook (A).

Here are some possible solutions to help you with your scenario:

  1. Use Status Indicators and Conditional Routing: To avoid loops, instead of directly invoking Playbook A within Playbook B, set a status indicator in Playbook B. Then, use conditional routing in Playbook A to handle the flow based on the status indicator set by Playbook B.
  2. Design a Centralized Summary Function: Ensure that the main Playbook (A) is responsible for summarizing all collected parameters. Child Playbooks (B and C) should focus solely on their specific tasks and set their status indicators upon completion.

For more detailed information regarding crafting examples and best practices for Playbooks, you can refer to this documentation.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

Hi MJane,

Thanks for the reply. May I know how do i define status indicators? Are they like a parameter that I define and set the value. Are there specific examples on defining and setting status indicators. Thanks.