Skip to content

Commit 2b9d273

Browse files
authored
Create README.md
1 parent 3bc53d7 commit 2b9d273

File tree

1 file changed

+113
-0
lines changed
  • samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/travel-planner

1 file changed

+113
-0
lines changed
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Travel Assistant Agent
2+
3+
## Summary
4+
The **Travel Assistant Agent** is an AI-powered agent built using Azure AI Agent Service. It helps users receive up-to-date travel recommendations by leveraging both the **Bing Grounding Tool** and the **TripAdvisor API**. The agent summarizes relevant information clearly and offers to create a custom itinerary based on the user's travel duration.
5+
6+
## Use Cases
7+
1. **Vacation Planning**: Travelers can get up-to-date suggestions on destinations, hotels, and activities.
8+
2. **Business Travel**: Professionals receive efficient recommendations tailored to time-sensitive trips.
9+
3. **Local Exploration**: Residents or tourists can find trending events, attractions, or day-trip ideas in their vicinity.
10+
11+
## Architecture Overview
12+
The system consists of:
13+
- An AI Agent created with Azure AI Agent Service using `gpt-4o` as the base model.
14+
- A Bing Grounding Tool integrated via Azure Bing Account and connected to the agent.
15+
- A TripAdvisor API tool integrated via OpenAPI.
16+
- A Bicep template to automate provisioning of Azure resources.
17+
18+
```text
19+
+----------------+
20+
| User Query |
21+
| (Travel Only) |
22+
+-------+--------+
23+
|
24+
v
25+
+-------------------+ invokes +----------------------------+
26+
| Travel Assistant | -------------------> | Bing Grounding Tool (API) |
27+
| (AI Agent) | -------------------> | TripAdvisor API (OpenAPI) |
28+
+-------------------+ results +----------------------------+
29+
|
30+
v
31+
+------------------------------+
32+
| Agent Response with summary |
33+
| and optional itinerary prompt|
34+
+------------------------------+
35+
```
36+
37+
## Setup Instructions
38+
39+
### Prerequisites
40+
- Python 3.8+
41+
- Azure CLI
42+
- Azure subscription
43+
- Agent setup: deploy the latest agent setup using ([this custom deployment](https://github.com/azure-ai-foundry/foundry-samples/tree/main/use-cases/agents/setup/basic-setup)).
44+
- The above creates:
45+
1. AI Services resource
46+
2. AI Project
47+
3. Model deployment
48+
- Bing Grounding resource
49+
- TripAdvisor API connection (via OpenAPI)
50+
51+
### Steps
52+
1. **Clone the Repository**
53+
54+
2. **Set Environment Variables**
55+
```bash
56+
PROJECT_ENDPOINT="<your-project-endpoint>" # (https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/<your-project-name>)
57+
MODEL_DEPLOYMENT_NAME="<your-model-deployment-name>"
58+
BING_CONNECTION_ID="<your-bing-connection-id>"
59+
TRIPADVISOR_CONNECTION_ID="<your-tripadvisor-connection-id>"
60+
```
61+
62+
3. **Deploy Resources Using Bicep**
63+
```bash
64+
az deployment group create --resource-group <your-rg> --template-file bing-grounding.bicep --parameters bingAccountName="bing-grounding-agent" bingSku="S1" connectionName="bing-grounding-conn" amlWorkspaceResourceName="<AI-Project-Name>"
65+
```
66+
67+
4. **Run the Agent Script**
68+
```bash
69+
python agent.py
70+
```
71+
72+
## ⚙️ Configuration Guide
73+
| Parameter Name | Description |
74+
|----------------------------|-------------------------------------------------------------------|
75+
| `bingAccountName` | Unique name for the Bing grounding resource |
76+
| `bingSku` | Pricing tier (e.g., `S1`) |
77+
| `connectionName` | Name for the AML connection to Bing |
78+
| `bingTargetEndpoint` | Bing API endpoint (defaults to `https://api.bing.microsoft.com/`) |
79+
| `tripadvisor_connection_id`| Azure connection ID for the TripAdvisor OpenAPI tool key |
80+
| `isSharedToAll` | Whether the connection is shared with all users |
81+
82+
## Sample Data Instructions
83+
This repo contains a `sample_data/` directory with:
84+
- Sample user travel queries
85+
- Example travel agent responses (mocked for offline testing)
86+
87+
You can test the interaction by invoking the agent with prompts like:
88+
89+
## Example Agent Interaction
90+
91+
#### 🧑 User:
92+
Hey, I’m visiting Mountain View this weekend with my partner. We like nature, good coffee, and local food. Can you suggest things to do?
93+
94+
#### 🤖 Travel Agent:
95+
Sure! Based on Bing and Tripadvisor, here are a few local highlights:
96+
- **Shoreline Park**: Great for kayaking, biking, and birdwatching.
97+
- **Red Rock Coffee** and **Verve Coffee Roasters** are top-rated cafés downtown.
98+
- For food, **Eureka!** (gourmet burgers) and **Steins Beer Garden** (modern American) are local favorites.
99+
100+
Would you like me to find availability for kayaking at Shoreline?
101+
102+
#### 🧑 User:
103+
Kayaking sounds fun! Can you check if it's available Saturday morning?
104+
105+
#### 🤖 Travel Agent:
106+
Yes — according to Shoreline Lake's site via Bing, kayaking is available starting 10 AM on Saturday.
107+
108+
## Customization Tips
109+
- Modify the system instructions in `template.py` to enable the agent to provide the best responses as needed.
110+
- Extend the agent with other useful tools or APIs (using OpenAPI spec) such as getting live flight details.
111+
112+
## License
113+
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.

0 commit comments

Comments
 (0)