-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhandoffs.py
More file actions
20 lines (16 loc) · 841 Bytes
/
Copy pathhandoffs.py
File metadata and controls
20 lines (16 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from agents import Agent,Runner
from dotenv import load_dotenv
load_dotenv()
booking_agent = Agent(name="bookingAgent",instructions="you are booking agent helpful for booking flights",handoff_description="helpful for booking flights")
refund_agent = Agent(name="refundAgent",instructions="you are refund agent helpful for refund money of booking flights",handoff_description="helpful for refund money of booking flights")
triage_agent = Agent(
name="Triage agent",
instructions=(
"Help the user with their questions. "
"If they ask about booking, hand off to the booking agent. "
"If they ask about refunds, hand off to the refund agent."
),
handoffs=[booking_agent, refund_agent],
)
result = Runner.run_sync(triage_agent,"i want to book 101 seat of your plane")
print(result)