Skip to content

Commit c54eba8

Browse files
authored
Merge branch 'azure-ai-foundry:main' into main
2 parents 7d3f104 + 5287c1c commit c54eba8

File tree

11 files changed

+495
-8
lines changed

11 files changed

+495
-8
lines changed

samples/agent-catalog/CONTRIBUTING.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Contributing Agent Code Samples to Foundry Agent Catalog
22
Thank you for your interest in contributing Agent Code Samples to the Foundry Agent Catalog repository!
33

4-
**Please note that the agent code samples in the Foundry Agent Catalog is a curated list. Inclusion of a third-party contributed agent is at the discretion of the Agent Service team that will be reviewing and approving the code sample.**
4+
> ⚠️ **Important**
5+
> When you submit your agent sample(s) to the GitHub "3P-agent-samples” file for availability from the Azure AI Foundry Agent Catalog, you are acknowledging that you are responsible for the submitted content and, as between you and Microsoft, Microsoft is not responsible for any liability that may arise from publication of your agent sample(s) for use by Azure AI Foundry customers.
6+
7+
> The agent code samples in the Foundry Agent Catalog is a curated list. Inclusion of a third-party contributed agent is at the discretion of the Agent Service team that will be reviewing and approving the code sample.
58
69
## 🚀 What to Include
710

samples/microsoft/python/getting-started-agents/3p-tools/InsureMO/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ This project provides sample code and OpenAPI specifications for integrating wit
3636
- **Travel Insurance Quotation API**: Obtain travel insurance quotes.
3737

3838
All APIs are hosted on Azure Container Apps and require an API key for authentication.
39+
To obtain API key, please contact [email protected].
3940

4041
---
4142

samples/microsoft/python/getting-started-agents/3p-tools/InsureMO/insureMO_Quotation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
run_steps = project_client.agents.run_steps.list(thread_id=thread.id, run_id=run.id)
128128

129129
# Loop through each step to display information
130-
for step in run_steps.data:
130+
for step in run_steps:
131131
print(f"Step {step['id']} status: {step['status']}")
132132

133133
# Check if there are tool calls recorded in the step details

samples/microsoft/python/getting-started-agents/3p-tools/MiHCM/template_newSDK.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
run_steps = project_client.agents.run_steps.list(thread_id=thread.id, run_id=run.id)
128128

129129
# Loop through each step to display information
130-
for step in run_steps.data:
130+
for step in run_steps:
131131
print(f"Step {step['id']} status: {step['status']}")
132132

133133
# Check if there are tool calls recorded in the step details

samples/microsoft/python/getting-started-agents/3p-tools/PartnerContributingGuide.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# 3p Tool Partner Contributing Guide
22

3+
> [!IMPORTANT]
4+
> When you submit your tool code sample(s) to the GitHub "3P-tools" file for availability in Azure AI Foundry, you are acknowledging that you are responsible for the submitted content and, as between you and Microsoft, Microsoft is not responsible for any liability that may arise from availability of your code sample(s) for use by Azure AI Foundry customers.
5+
36
## Who should read this?
47
This contributing guide is designed for partners who want to bring their APIs as part of the **Azure AI Foundry Agent Service non-Microsoft tools** so that customers can integrate your APIs with Azure AI Foundry Agent service through a tool to retrieve data or integrating with a workflow.
58

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Trademo Shipments And Tariff
2+
3+
This Python script demonstrates how to use Azure AI to create an agent that queries global trade duties using an OpenAPI specification.
4+
5+
## About Tool:
6+
- Name: Trademo Shipments And Tariff
7+
- Description: Provides latest duties and past shipment data for trade between multiple countries
8+
9+
10+
## Features
11+
- Creates an Azure AI Project client
12+
- Sets up OpenAPI connection for global trade data
13+
- Processes trade duty queries
14+
- Handles thread/message management
15+
16+
## Prerequisites
17+
- Azure subscription
18+
- Azure AI Projects resource
19+
- Python 3.8+
20+
- Azure CLI installed and logged in
21+
- Required Python packages:
22+
- azure-ai-projects
23+
- azure-identity
24+
- jsonref
25+
- azure-ai-agents
26+
27+
## Installation
28+
Install dependencies:
29+
```bash
30+
pip install azure-ai-projects azure-identity azure-ai-agents jsonref
31+
```
32+
33+
34+
## Usage
35+
Run the script:
36+
```bash
37+
python trademo_and_tariff.py
38+
```
39+
40+
Before running the sample:
41+
42+
Obtain the sessionid from trademo which serves as the API_KEY.
43+
44+
Set up a custom key connection, name the key as 'sessionid' and save the connection name.
45+
46+
Save that connection name as the PROJECT_OPENAPI_CONNECTION_NAME environment variable
47+
48+
49+
Set this environment variables with your own values:
50+
PROJECT_ENDPOINT - the Azure AI Project endpoint, as found in your Foundry Project.
51+
MODEL - name of the model deployment in the project to use Agents against
52+
CONNECTION_ID - The ID of connection(connection id should be in the format "/subscriptions/<sub-id>/resourceGroups/<your-rg-name>/providers/Microsoft.CognitiveServices/accounts/<your-ai-services-name>/projects/<your-project-name>/connections/<your-connection-name>")
53+
54+
55+
## Example queries processed by the tool:
56+
- "How many GPUs(HS code 847330) were imported to United States from China in February 2025?"
57+
- "which were the top countries based on shipment value that exported jewellery(HS code 711319) to usa in 2024?"
58+
- "Which countries are the biggest exporter of lithium ion battery(HS code 850760) to the US in 2024?"
59+
- "what is the duty of import for jewllery(HS code = 711319) from India to US?"
60+
- "Compare current duties on lithium ion batteries(HS code 850760) imported to US"
61+
62+
## Notes
63+
- The script creates and deletes the agent during execution
64+
- OpenAPI connection requires additional setup in Azure
65+
- The agent assumes HS 6-digit codes for products automatically
66+
- Error handling is included for failed runs
67+
68+
69+
## Contact
70+
For any queries, please follow the below escalation matrix:
71+
72+
73+

0 commit comments

Comments
 (0)