user_info
to store user information (and order list when a user logs in) and order_info
to store the retrieved order information. Since swarm is a decentralized orchestration, we will transfer logic in each agent:
verify_tracking_number
: verifies if the tracking number is valid and updates the context variables with the order info if valid.verify_user_information
: validates the user’s information and returns the order details if correct.login_account
to initiate a login session for the user. Upon successful login, it updates the context variables with the user’s info and transfers control to the Order Management Agent. If login fails, it can guide the user to try again or help them start the process to find their account or reset their password. Currently, we have a dummy login system that logs in directly without any authentication.
get_order_history
or check_order_status
tool. It can also hand off to a Return Agent for returning orders.
check_return_eligibility
tool, and then starts the process upon the user’s confirmation with initiate_return_process
. It can transfer back to the Order Management Agent as needed.
ag2
library.
config_list
in the main.py
file (line 10). Read more about configurations here.
I want to cancel my order
TR14234
I want to track my order
TR13845
8453
(last 4 digits of phone number)