You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Invoke an OpenAPI App Service web app from Azure AI Agent Service
13
13
14
-
[Azure AI Agent Service](https://learn.microsoft.com/azure/ai-services/agents/overview) allows you to create AI agents tailored to your needs through custom instructions and augmented by advanced tools like code interpreter, and custom functions. You can now connect your Azure AI Agent to an external API using an [OpenAPI 3.0](https://www.openapis.org/what-is-openapi) specified tool, allowing for scalable interoperability with various applications.
14
+
[Azure AI Agent Service](/azure/ai-services/agents/overview) allows you to create AI agents tailored to your needs through custom instructions and augmented by advanced tools like code interpreter, and custom functions. You can now connect your Azure AI Agent to an external API using an [OpenAPI 3.0](https://www.openapis.org/what-is-openapi) specified tool, allowing for scalable interoperability with various applications.
15
15
16
16
Azure App Service is a fully managed platform for building, deploying, and scaling web apps and APIs. If your API is hosted on Azure App Service, you can connect your AI Agent to the API using the OpenAPI specification. The OpenAPI specification defines the API and how to interact with it. You can then use natural language to invoke the API through your AI Agent.
17
17
@@ -21,7 +21,7 @@ In the following tutorial, you're using an Azure AI Agent to invoke an API hoste
21
21
22
22
To complete this tutorial, you need an Azure AI Agent project and a RESTful API hosted on Azure App Service. The API should have an OpenAPI specification that defines the API. The OpenAPI specification for the sample app in this tutorial is provided.
23
23
24
-
1. Ensure you complete the prerequisites and setup steps in the [quickstart](https://learn.microsoft.com/azure/ai-services/agents/quickstart?pivots=programming-language-python-azure). This quickstart walks you through creating your Azure AI Hub and Agent project. You should complete the agent configuration and agent sample the quickstart provides to get a full understanding of the tool and ensure your setup works.
24
+
1. Ensure you complete the prerequisites and setup steps in the [quickstart](/azure/ai-services/agents/quickstart?pivots=programming-language-python-azure). This quickstart walks you through creating your Azure AI Hub and Agent project. You should complete the agent configuration and agent sample the quickstart provides to get a full understanding of the tool and ensure your setup works.
25
25
1. Ensure you have [Git installed](https://git-scm.com/downloads).
26
26
1. Ensure you have the latest [.NET 9.0 SDK installed](https://dotnet.microsoft.com/download/dotnet/9.0).
27
27
1. Follow the guidance in the next section to create the sample app and deploy it to Azure App Service. The sample app is a simple to-do list app that allows you to create, read, update, and delete items from the list.
@@ -64,7 +64,7 @@ To complete this tutorial, you need an Azure AI Agent project and a RESTful API
64
64
65
65
### Create and review the OpenAPI specification
66
66
67
-
Now that you have the required infrastructure, you can put it all together and start interacting with your API using your AI Agent. For a general overview on how to do get started, see [How to use Azure AI Agent Service with OpenAPI Specified Tools](https://learn.microsoft.com/azure/ai-services/agents/how-to/tools/openapi-spec?tabs=python&pivots=overview). That overview includes prerequisites and other requirements including how to include authentication if your API requires it. The provided sample API is publicly accessible so authentication isn't required.
67
+
Now that you have the required infrastructure, you can put it all together and start interacting with your API using your AI Agent. For a general overview on how to do get started, see [How to use Azure AI Agent Service with OpenAPI Specified Tools](/azure/ai-services/agents/how-to/tools/openapi-spec?tabs=python&pivots=overview). That overview includes prerequisites and other requirements including how to include authentication if your API requires it. The provided sample API is publicly accessible so authentication isn't required.
68
68
69
69
1. This specification is the OpenAPI specification for the sample app that is provided. On your local machine, create a file called `swagger.json` and copy the following contents.
70
70
@@ -324,7 +324,7 @@ Now that you have the required infrastructure, you can put it all together and s
324
324
325
325
### Create the OpenAPI Spec tool definition
326
326
327
-
1. Create a file in the same directory as your `swagger.json` file called `tool.py`. Copy the following contents into the file. Ensure you complete the prerequisites and setup steps in the [quickstart](https://learn.microsoft.com/azure/ai-services/agents/quickstart?pivots=programming-language-python-azure) to get the required packages installed as well as get you logged into your Azure account.
327
+
1. Create a file in the same directory as your `swagger.json` file called `tool.py`. Copy the following contents into the file. Ensure you complete the prerequisites and setup steps in the [quickstart](/azure/ai-services/agents/quickstart?pivots=programming-language-python-azure) to get the required packages installed as well as get you logged into your Azure account.
328
328
329
329
```python
330
330
import os
@@ -397,7 +397,7 @@ Now that you have the required infrastructure, you can put it all together and s
397
397
print("Deleted agent")
398
398
```
399
399
400
-
1. Replace the placeholder for your project's connection string. If you need help with finding the connection string, see the [Configure and run agent section of the quickstart](https://learn.microsoft.com/azure/ai-services/agents/quickstart?pivots=programming-language-python-azure#configure-and-run-an-agent).
400
+
1. Replace the placeholder for your project's connection string. If you need help with finding the connection string, see the [Configure and run agent section of the quickstart](/azure/ai-services/agents/quickstart?pivots=programming-language-python-azure#configure-and-run-an-agent).
401
401
1. Review the file to understand how the OpenAPI tool is created and how the AI Agent is invoked. The OpenAPI specification is passed into the file. Each time the tool is invoked, the AI Agent uses the OpenAPI specification to determine how to interact with the API. The `message_content` variable is where you enter the natural language command that you want the AI Agent to perform. You're prompted to enter the message once you run the script. The AI Agent invokes the API and returns the results. It creates and deletes the AI Agent each time you run the script.
Copy file name to clipboardExpand all lines: articles/azure-app-configuration/faq.yml
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -129,12 +129,14 @@ sections:
129
129
answer: |
130
130
Let's take an example and assume you have an application with 1,000 configuration settings. Your application loads all those settings from App Configuration upon startup. After that, it checks for a sentinel key for configuration changes every 30 seconds. Whether you're running on Kubernetes, App Service, or VMs, let's assume you have 50 instances of your application running simultaneously.
131
131
132
-
Firstly, let's estimate the requests for configuration monitoring. Each instance of your application sends one request for the sentinel key to App Configuration every 30 seconds, so it sends 120 (=3600/30) requests in an hour. Given you have 50 instances of your application, your application sends 6,000 (=120x50) total requests every hour for configuration monitoring. Note that because the sentinel key requests are frequent and mostly unchanged, the majority of them don't count against the store hourly quota limits† for a Standard tier store.
132
+
Firstly, let's estimate the requests for configuration monitoring. Each instance of your application sends one request for the sentinel key* to App Configuration every 30 seconds, so it sends 120 (=3600/30) requests in an hour. Given you have 50 instances of your application, your application sends 6,000 (=120x50) total requests every hour for configuration monitoring. Note that because the sentinel key requests are frequent and mostly unchanged, the majority of them don't count against the store hourly quota limits† for a Standard tier store.
133
133
134
134
Secondly, let's estimate the requests for configuration loading/reloading. Your application loads all settings at the startup or whenever a sentinel key change is detected. Each request to App Configuration can retrieve up to 100 key-values, so it takes 10 (=1000/100) requests to load all settings. Given you have 50 application instances, you send 500 (=10x50) total requests when your application restarts or reloads its configuration.
135
135
136
136
Finally, let's put it together. Assuming you updated the sentinel key twice within an hour, your App Configuration store will thus receive 7,000 (=6,000+500x2) total requests for that hour. Note that out of these requests, only about 1,000 (=500x2) requests use the available hourly quota for a Standard tier store. Update the numbers in this example to match your specific setup and design accordingly so you have a sufficient buffer against the hourly quota limit.
137
137
138
+
*Feature flags don't use the sentinel key for monitoring changes and are monitored separately from configuration. It takes one request to monitor every 100 feature flags per refresh interval.
139
+
138
140
†Free tier stores don't have frequent, repeated requests excluded from their daily limit.
139
141
140
142
- question: My application receives HTTP status code 429 responses. Why?
| imageHeight (Json)<BR>ImageWidth (XML) | Not supported | Azure Maps Get Map Tile API provides the map tile image directly in the HTML response (binary image string) and offers 256 x 256 and 512 x 512 pixel tile sizes. |
79
-
| imageUrl (Json)<BR>ImageUrl (XML) | Not supported | Azure Maps Get Map Tile API provides the map tile image directly in the HTML response (binary image string), as opposed to an image URL. |
80
-
| imageUrlSubdomains (Json)<BR>ImageUrlSubdomains (XML) | Not supported | Azure Maps Get Map Tile API provides the map tile image directly in the HTML response (binary image string), as opposed to an image URL. |
81
-
| imageWidth (Json)<BR>ImageWidth (XML) | Not supported | Azure Maps Get Map Tile API provides the map tile image directly in the HTML response (binary image string) and offers 256 x 256 and 512 x 512 pixel tile sizes. |
82
-
| vintageEnd (Json)<BR>VintageEnd (XML) | Not supported | Azure Maps Get Map Tile API provides map tile vintage information in the response header (Data-Capture-Date-Range<SUP>**1**</SUP>), rather than in the response body. |
83
-
| vintageStart (Json)<BR>VintageStart (XML)| Not supported | Azure Maps Get Map Tile API provides map tile vintage information in the response header (Data-Capture-Date-Range<SUP>**1**</SUP>), rather than in the response body. |
84
-
| zoomMax (Json)<BR>ZoonMax (XML) | Not supported | For information on zoom levels and maximum zoom supported by map tile styles, see [Zoom levels and tile grid] and [TilesetID].|
85
-
| zoomMin (Json)<BR>ZoomMin (XML) | Not supported | For information on zoom levels and maximum zoom supported by map tile styles, see [Zoom levels and tile grid] and [TilesetID]. |
78
+
| imageHeight (JSON)<BR>ImageWidth (XML) | Not supported | Azure Maps Get Map Tile API provides the map tile image directly in the HTML response (binary image string) and offers 256 x 256 and 512 x 512 pixel tile sizes. |
79
+
| imageUrl (JSON)<BR>ImageUrl (XML) | Not supported | Azure Maps Get Map Tile API provides the map tile image directly in the HTML response (binary image string), as opposed to an image URL. |
80
+
| imageUrlSubdomains (JSON)<BR>ImageUrlSubdomains (XML) | Not supported | Azure Maps Get Map Tile API provides the map tile image directly in the HTML response (binary image string), as opposed to an image URL. |
81
+
| imageWidth (JSON)<BR>ImageWidth (XML) | Not supported | Azure Maps Get Map Tile API provides the map tile image directly in the HTML response (binary image string) and offers 256 x 256 and 512 x 512 pixel tile sizes. |
82
+
| vintageEnd (JSON)<BR>VintageEnd (XML) | Not supported | Azure Maps Get Map Tile API provides map tile vintage information in the response header (Data-Capture-Date-Range<SUP>**1**</SUP>), rather than in the response body. |
83
+
| vintageStart (JSON)<BR>VintageStart (XML)| Not supported | Azure Maps Get Map Tile API provides map tile vintage information in the response header (Data-Capture-Date-Range<SUP>**1**</SUP>), rather than in the response body. |
84
+
| zoomMax (JSON)<BR>ZoonMax (XML) | Not supported | For information on zoom levels and maximum zoom supported by map tile styles, see [Zoom levels and tile grid] and [TilesetID].|
85
+
| zoomMin (JSON)<BR>ZoomMin (XML) | Not supported | For information on zoom levels and maximum zoom supported by map tile styles, see [Zoom levels and tile grid] and [TilesetID]. |
86
86
87
87
<SUP>**1**</SUP> When using Azure Maps API to obtain RGB satellite images, you can also retrieve information about the acquisition date. The HTTP response includes a header called **Data-Capture-Date-Range**, which provides a date range indicating when the image was captured. For instance, it might appear as “7/31/2022-9/1/2023”. Keep in mind that satellite imagery often spans a date range due to batch processing and the stitching together of multiple images from different dates to create seamless maps. So, while a single date isn’t always applicable, the date range gives you insight into when the image data was collected.
0 commit comments