---
# System prepended metadata

title: Multi-agent Collaboration
tags: [Bedrock, ' Workshop', ' AWS', ' AI/ML']

---

---
tags: Bedrock, AI/ML, AWS, Workshop
---

# Multi-agent Collaboration
We found complexity dealing with single agent for our booking workflow. With the [fully managed multi-agent collaboration](https://aws.amazon.com/blogs/aws/introducing-multi-agent-collaboration-capability-for-amazon-bedrock/) capability on Amazon Bedrock, specialized agents work within their domains of expertise, coordinated by a supervisor agent. The supervisor breaks down requests, delegates tasks, and consolidates outputs into a final response. For example, our travel advisor multi-agent system might include agents specialized in scheduling, availability recommendations, making reservations & payment checkout. 

The following figure shows the team of agents that shows how multi-agent collaboration works in the proposed scenario
![image](https://hackmd.io/_uploads/r1Lq-rKNJg.png)

Find example here: [Bedrock Multi Agent Collaboration Workshop](https://github.com/aws-samples/bedrock-multi-agents-collaboration-workshop/tree/main)

## 1 - User Request
User request to book a ferry

## 2 - Supervisor
The purpose of the Supervisor is to guide the end-to-end journey of the booking system for a ferry user. 

```!
You are a ferry travel helper bot. 
You can help customers with operations related with their ferry travel, like availability, bookings, reservations and checkout etc. 

You are a ferry travel helper bot. 
You can retrieve travel information, schedules and availability for customers and help them to book their travel journey.
You can also retrieve ferry times and ticket availability for a specific ferry and help them to purchase.
Resist the temptation to ask the user for input. Only do so after you have exhausted available actions. 
Never ask the user for information that you already can retrieve yourself through available actions. 
```

### Sub-Agent Instructions

**Booking**
```!
Gather information needed for the booking and once required information is obtained, create a booking ID to start the process. Ensuring adherence to its specific protocols and capabilities.
```

**Availability**
```!
Direct ticket availability management and quantity tasks to the Availability Agent, leveraging its query capabilities for live data.
```

**Reservation**
```!
The Reservation agent creates individual reservations that link the Service ID to the Booking object. Multiple reservations could be made to a single booking. Once the availability is known for Services, Reservations can be made and associated with the booking.

```
**Checkout**
```!
The purpose of the Checkout agent is to ask for contact details of the customer to be able to send a secure payment link to either the customers mobile phone number or email address that they supply. This completes the booking process and shouldn't be used until the all other agents have completed. 
```



## 3 - Sub Agent Booking
The purpose of Booking agent is the create a Booking object that can be used through the process. Information about the customer will need to be know for their travel preferences. Information about;
1. How many passengers
2. How many Adults, Kids, Concession, Babys etc
3. Travel Dates
4. Travel to/from source and destination

This will be used later during the workflow

**Prompt**
```!
You are a Sealink booking agent. You will engage with customers looking to book ferry times from a source and destination. You require information that will give context to book the travel that will include:
1. How many passengers?
2. Will they be Adults, Children, Concession and how many? 
3. What are the travel dates? The ferry could be one-way but is usually return tickets. The return may not be on the same day as the departure. Always query if they would like return prices included. 
4. Will they be travelling with a vehicle?

Core behaviors:
- The customer may then follow up with additional questions or prompts related to your previous response, allowing for a multi-turn dialogue on that topic 
- Ask for clarification if any part of the question or prompt is ambiguous
- Maintain a consistent, respectful, and engaging tone tailored to the human's communication style. 
- Always use available information before asking customers for additional details
- Maintain a professional yet approachable tone
- Provide clear, direct answers
- Present information in an easy-to-understand manner

Response style:
- Be helpful and solution-oriented
- Use clear, practical language
- Focus on actionable guidance
- Maintain natural conversation flow
- Be concise yet informative
- Do not add extra information not required by the user

The ferry destinations include Kangaroo Island (KI), Stradbroke Island, Magnetic Island, Witsundays, K'gari (or Fraser Island), Palm Island, Bay Islands, Rottnest Island, Bruny Island, Tiwi Islands, Darwin, Groot Eylandt. 


Respond with concise way in less than 30 words
```

**4** - CAN WE ADD A KNOWLEDGE BASE WITH TIMETABLES? E.g:
https://www.sealink.com.au/rottnest-island/ferry-information/ferry-timetable/#accordion-1-january-2025-12-january-2025

I've added a KB to the bookings agent in my test account and it gives it sufficient context along with my detailed instruction as to what information and types of information would be required when performing the initial query for the user. 


#### Response
The final output should be a Booking ID, also answering any queries the customer specific information related to a proposed travel journey. 

I attempted a KB with web crawler put you have a WAF which blocks my bedrock bot. 

## 5 - Sub Agent Availability 
The purpose of the Availability agent is check availability based on the preferences of the travelor. The availability API can return available units per ferry time. Based on the customer choice the agent should then get the ServiceID for the ferry trip.

#### Response
The output should Service ID(s)

## 6 - Sub Agent Reservation
The purpose of the Reservation agent is to create individual reservations that maps the Servicde ID to the Booking object. Multiple reservations could be made to a single booking. 

#### Response
The output should be reservations attached to a booking that meets the customers preferences

## 7 - Sub Agent Checkout
The purpose of the Checkout agent is to ask for contact details of the customer to be able to send a secure payment link to either the customers mobile phone number or email address that they supply. The agent will need to gather details like firstname, lastname, email address and mobile number to generate a URL.  The agent should be satisfied that it has checked character by character for the preferred contant details to garuntee correct sending to the recipient address.  

#### Response
The output should be a URL that will be sent to the preferred contanct detail of either mobile or email address. 

## 8 - Final Response
The response to the user should be after validation of the contact details that the Checkout API has sent payment link to the preferred contact detail of email address or mobile.  

# User Stories - Bedrock 

The following user stories make up the core features of the application that require AI/ML services. Lets start with these and work backwards. 

> **TBC on November 14th**


1. **As a ferry passenger, I want to be able to ask the chatbot about available ferry routes, so that I can plan my journey efficiently.**

   Acceptance Criteria:
   - Chatbot can list all available ferry routes
   - Chatbot can provide details on specific routes when asked
   - Information provided matches the data in the existing OpenAPI schema

2. **As a frequent traveler, I want to inquire about ferry schedules for specific dates, so that I can choose the most convenient sailing time.**

   Acceptance Criteria:
   - Chatbot can provide ferry schedules for a given date and route
   - Chatbot handles date inputs in various formats (e.g., "tomorrow", "next Friday", "05/20/2025")
   - Schedules provided are accurate and up-to-date with the OpenAPI schema

3. **As a customer, I want to be able to book a ferry ticket through the chatbot, so that I can complete my reservation without navigating a separate booking system.**

   Acceptance Criteria:
   - Chatbot guides the user through the booking process step-by-step
   - Chatbot collects necessary information (route, date, time, number of passengers, vehicle details if applicable)
   - Chatbot confirms booking details before finalizing the reservation
   - Booking information is correctly processed using the existing OpenAPI schema

4. **As a customer who needs to change my travel plans, I want to ask the chatbot about the refund policy and process, so that I can understand my options and potentially request a refund for my ferry booking.**

   Acceptance Criteria:
   - Chatbot can provide a clear explanation of the current refund policy
   - Chatbot can outline the steps required to request a refund
   


# Appendix

## Reference Architecture 


[AWS Solutions Library > Guidance](https://aws.amazon.com/solutions/guidance/building-travel-assistants-using-amazon-bedrock-agents/)

![image](https://hackmd.io/_uploads/BJZv4oalJl.png)

### Testing Agents
https://awslabs.github.io/agent-evaluation/

### Prompt Editor - Advanced
Here is where we can add the xml tag for <guidelines>
![image](https://hackmd.io/_uploads/HJb9h4mMkx.png)



