mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-17 06:58:09 +01:00
merged old agent goal in with keynote goal
This commit is contained in:
@@ -5,6 +5,7 @@ from tools.tool_registry import (
|
||||
search_trains_tool,
|
||||
book_trains_tool,
|
||||
create_invoice_tool,
|
||||
find_events_tool,
|
||||
)
|
||||
|
||||
goal_match_train_invoice = AgentGoal(
|
||||
@@ -53,46 +54,31 @@ goal_match_train_invoice = AgentGoal(
|
||||
# unused
|
||||
goal_event_flight_invoice = AgentGoal(
|
||||
tools=[
|
||||
search_fixtures_tool,
|
||||
find_events_tool,
|
||||
search_flights_tool,
|
||||
search_trains_tool,
|
||||
create_invoice_tool,
|
||||
],
|
||||
description="Help the user gather args for these tools in order: "
|
||||
"1. SearchFixtures: Search for fixtures for a team in a given month"
|
||||
"2. SearchFlights: Search for a flight around the match dates"
|
||||
"3. SearchTrains: Search for trains to visit somewhere before or after the match"
|
||||
"4. BookTrain: Book the train tickets"
|
||||
"5. CreateInvoice: Create a simple invoice for the cost of the flights and train tickets",
|
||||
"1. FindEvents: Find an event to travel to "
|
||||
"2. SearchFlights: search for a flight around the event dates "
|
||||
"3. CreateInvoice: Create a simple invoice for the cost of that flight ",
|
||||
starter_prompt="Welcome me, give me a description of what you can do, then ask me for the details you need to do your job",
|
||||
example_conversation_history="\n ".join(
|
||||
[
|
||||
"user: I'd like to travel to a football match",
|
||||
"agent: Sure! Let's start by finding an match you'd like to attend. I know about Premier League fixtures in the UK. Could you tell me which team and month you're interested in?",
|
||||
"user: Wolves in May please",
|
||||
"agent: Great! Let's find a match for Wolverhampton Wanderers FC in May.",
|
||||
"user_confirmed_tool_run: <user clicks confirm on SearchFixtures tool, passing the full team name as an input>",
|
||||
'tool_result: results including {"homeTeam": "Wolverhampton Wanderers FC", "awayTeam": "Manchester United", "date": "2025-05-04"}',
|
||||
"agent: Found a match! There's an away game against Manchester United on May 4 2025. Would you like to search for flights around this date?",
|
||||
"user: I'd like to travel to an event",
|
||||
"agent: Sure! Let's start by finding an event you'd like to attend. I know about events in Australia and New Zealand cities. Could you tell me which city and month you're interested in?",
|
||||
"user: sydney in may please",
|
||||
"agent: Great! Let's find an events in Sydney in May.",
|
||||
"user_confirmed_tool_run: <user clicks confirm on FindEvents tool>",
|
||||
"tool_result: { 'event_name': 'Vivid Sydney', 'event_date': '2023-05-01' }",
|
||||
"agent: Found an event! There's Vivid Sydney on May 1 2025, ending on May 14 2025. Would you like to search for flights around these dates?",
|
||||
"user: Yes, please",
|
||||
"agent: Let's search for flights around this date. Could you provide your departure city?",
|
||||
"agent: Let's search for flights around these dates. Could you provide your departure city?",
|
||||
"user: San Francisco",
|
||||
"agent: Thanks, searching for flights from San Francisco to the Manchester around 2025-05-03 to 2025-05-05.",
|
||||
"agent: Thanks, searching for flights from San Francisco to Sydney around 2023-02-25 to 2023-02-28.",
|
||||
"user_confirmed_tool_run: <user clicks confirm on SearchFlights tool>"
|
||||
'tool_result: results including {"flight_number": "CX101", "return_flight_number": "CX102", "price": 850.0}',
|
||||
"agent: Found some flights! The cheapest is CX101 for $850. Would you like to go for this one?",
|
||||
"user: Yes, please",
|
||||
"agent: Great! So you're flying to the city the match is in, anywhere else you'd like to visit while you're there?",
|
||||
"user: I'd like to visit my friend in Edinburgh after the match",
|
||||
"agent: Got it! Let's search for trains from Manchester to Edinburgh and back.",
|
||||
"user_confirmed_tool_run: <user clicks confirm on SearchTrains tool>",
|
||||
'tool_result: results including {"train_number": "T1234", "price": 30.0}',
|
||||
"agent: Found these train options! The cheapest is T1234 for $30. Would you like to go for this one?",
|
||||
"user: Yes, please",
|
||||
"agent: Great, lets book the train tickets",
|
||||
"user_confirmed_tool_run: <user clicks confirm on BookTrain tool>",
|
||||
'tool_result: results including {"status": "success"}',
|
||||
"agent: Train tickets booked! Would you like me to create an invoice for the flights and train tickets?",
|
||||
"agent: Found some flights! The cheapest is CX101 for $850. Would you like to generate an invoice for this flight?",
|
||||
"user_confirmed_tool_run: <user clicks confirm on CreateInvoice tool>",
|
||||
'tool_result: { "status": "success", "invoice": { "flight_number": "CX101", "amount": 850.0 }, invoiceURL: "https://example.com/invoice" }',
|
||||
"agent: Invoice generated! Here's the link: https://example.com/invoice",
|
||||
|
||||
Reference in New Issue
Block a user