Skip to content

Commit 1531236

Browse files
authored
Merge pull request #5604 from MicrosoftDocs/main
6/18/2025 PM Publish
2 parents 97bf747 + 47dd4ca commit 1531236

File tree

10 files changed

+374
-634
lines changed

10 files changed

+374
-634
lines changed

articles/ai-foundry/agents/environment-setup.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.author: aahi
88
ms.reviewer: fosteramanda
99
ms.service: azure-ai-agent-service
1010
ms.topic: how-to
11-
ms.date: 05/09/2025
11+
ms.date: 06/18/2025
1212
ms.custom: azure-ai-agents
1313
---
1414

@@ -25,19 +25,22 @@ Use this article to learn more about setting up your agent environment.
2525
| Action | Required Role |
2626
|------------------------------------------------------------------------|----------------------------------|
2727
| Create an account and project | Azure AI Account Owner |
28-
| **Standard Setup Only:** Assign RBAC for required resources (Cosmos DB, Search, Storage, etc.) | Role Based Access Control Administrator |
28+
| [standard setup](#choose-your-setup) Only: Assign RBAC for required resources (Cosmos DB, Search, Storage, etc.) | Role Based Access Control Administrator |
2929
| Create and edit agents | Azure AI User |
3030

3131
## Set up your agent environment
32-
To get started, you need an account and a project.
33-
Agents are scoped at the project level, which ensures data isolation—agents within the same project share access to the same resources.
32+
To get started, you need an Azure AI Foundry resource and a Foundry project.
33+
Agents are created within a specific project, and each project acts as an isolated workspace. This means:
34+
* All agents in the same project share access to the same file storage, thread storage (conversation history), and search indexes.
35+
* Data is isolated between projects. Agents in one project cannot access resources from another.
36+
Projects are currently the unit of sharing and isolation in Foundry. See the [what is AI foundry](../../ai-foundry/what-is-azure-ai-foundry.md) article for more information on Foundry projects.
3437

3538
### Prerequisites
3639

3740
* An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services).
3841
* Ensure that the individual creating the account and project has the **Azure AI Account Owner** role at the subscription scope
39-
* If configuring **Standard Setup**, the same individual must also have permissions to assign roles to required resources (Cosmos DB, Search, Storage).
40-
* The built-in role needed is **Role Based Access Control Administrator**.
42+
* If configuring a [standard setup](#choose-your-setup), the same individual must also have permissions to assign roles to required resources (Cosmos DB, Azure AI Search, Azure Blob Storage). For more information on RBAC roles, specific to Azure AI Foundry Agent Service, see [Azure AI Foundry Agent Service RBAC roles](../concepts/rbac-azure-ai-foundry.md).
43+
* The built-in role needed is **Role Based Access Administrator**.
4144
* Alternatively, having the **Owner** role at the subscription level also satisfies this requirement.
4245
* The key permission needed is: `Microsoft.Authorization/roleAssignments/write`
4346

@@ -76,6 +79,12 @@ If you want support for Private Network Isolation see [network-secured setup](ho
7679
| Deploy a standard agent setup that uses **Managed Identity** for authentication. <br>An account and project are created. <br> A GPT-4o model is deployed. <br> Azure resources for storing customer data - **Azure Storage**, **Azure Cosmos DB**, and **Azure AI Search** - are automatically created if existing resources are't provided. <br> These resources are connected to your project to store files, threads, and vector data. <br> A Microsoft-managed Key Vault is used by default.</li></ul> <br> [![Deploy To Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fazure-ai-foundry%2Ffoundry-samples%2Frefs%2Fheads%2Fmain%2Fsamples%2Fmicrosoft%2Finfrastructure-setup%2F41-standard-agent-setup%2Fazuredeploy.json) | :::image type="content" source="./media\quickstart\standard-agent-setup.png" alt-text="An architecture diagram for standard agent setup." lightbox="./media\quickstart\standard-agent-setup.png"::: |
7780

7881
### [Optional] Model selection in autodeploy template
82+
83+
> [!IMPORTANT]
84+
> **Don't change the modelFormat parameter.**
85+
>
86+
> The templates only support deployment of Azure OpenAI models. See which Azure OpenAI models are supported in the [model support](./concepts/model-region-support.md) article.
87+
7988
You can customize the model used by your agent by editing the model parameters in the autodeploy template. To deploy a different model, you need to update at least the `modelName` and `modelVersion` parameters.
8089

8190
By default, the deployment template is configured with the following values:
@@ -88,12 +97,6 @@ By default, the deployment template is configured with the following values:
8897
| modelSkuName | GlobalStandard |
8998
| modelLocation | eastus |
9099

91-
> [!IMPORTANT]
92-
> **Don't change the modelFormat parameter.**
93-
>
94-
> The templates only support deployment of Azure OpenAI models. See which Azure OpenAI models are supported in the [Azure AI Foundry Agent Service model support](concepts\model-region-support.md) documentation.
95-
96-
97100
### What's next?
98101
* [Create your first agent](quickstart.md)
99102
* Explore more:

articles/ai-foundry/agents/how-to/tools/openapi-spec-samples.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Find code samples to use OpenAPI tools with agents.
55
author: aahill
66
ms.author: aahi
77
manager: nitinme
8-
ms.date: 04/09/2025
8+
ms.date: 06/18/2025
99
ms.service: azure-ai-agent-service
1010
ms.topic: how-to
1111
ms.custom:
@@ -33,8 +33,8 @@ Use this article to find step-by-step instructions and code samples for using Op
3333

3434
:::image type="content" source="../../media\tools\open-api-details.png" alt-text="A screenshot showing the openAPI tool details in the Azure AI Foundry portal." lightbox="../../media\tools\open-api-details.png":::
3535

36-
1. Select **Next** and select your authentication method. Choose `connection` for `API key`.
37-
1. If you choose `connection`, you need to select the custom keys connection you have created before.
36+
1. Select **Next** and select your authentication method.
37+
1. If you choose `connection`, you need to select the custom connection you have created before.
3838
1. If you choose `managed identity`, you need to input the audience to get your token. An example of an audience would be `https://cognitiveservices.azure.com/` to connect to Azure AI Services. Make sure you have already set up authentication and role assignment (as described in the [section](./openapi-spec.md#authenticating-with-managed-identity-microsoft-entra-id) above).
3939

4040
1. Copy and paste your OpenAPI specification in the text box.
@@ -70,18 +70,14 @@ with AIProjectClient(
7070
) as project_client:
7171
```
7272

73-
## Countries Tool Setup
74-
Similarly, the OpenAPI specification for the countries service is loaded from `countries.json`. An anonymous authentication object (`OpenApiAnonymousAuthDetails`) is created, as this specific API doesn't require authentication in this example.
73+
## Tool setup
74+
Similarly, the OpenAPI specification is loaded from `weather.json`. An anonymous authentication object (`OpenApiAnonymousAuthDetails`) is created, as this specific API doesn't require authentication in this example. You can find an example OpenAPI spec on [GitHub](https://github.com/azure-ai-foundry/foundry-samples/blob/main/samples/microsoft/python/getting-started-agents/openapi/weather_openapi.json).
7575

7676
```python
77-
# Load the OpenAPI specification for the countries service from a local JSON file
77+
# Load the OpenAPI specification for the weather service from a local JSON file
7878
with open(os.path.join(os.path.dirname(__file__), "weather.json"), "r") as f:
7979
openapi_weather = jsonref.loads(f.read())
8080

81-
# Load the OpenAPI specification for the countries service from a local JSON file
82-
with open(os.path.join(os.path.dirname(__file__), "countries.json"), "r") as f:
83-
openapi_countries = jsonref.loads(f.read())
84-
8581
# Create Auth object for the OpenApiTool (note: using anonymous auth here; connection or managed identity requires additional setup)
8682
auth = OpenApiAnonymousAuthDetails()
8783
# for connection setup
@@ -93,10 +89,6 @@ Similarly, the OpenAPI specification for the countries service is loaded from `c
9389
openapi_tool = OpenApiTool(
9490
name="get_weather", spec=openapi_weather, description="Retrieve weather information for a location", auth=auth
9591
)
96-
# Add the countries API definition to the same tool object
97-
openapi_tool.add_definition(
98-
name="get_countries", spec=openapi_countries, description="Retrieve a list of countries", auth=auth
99-
)
10092
```
10193

10294
## Agent Creation
@@ -125,7 +117,7 @@ Create the thread and add the initial user message.
125117
message = project_client.agents.messages.create(
126118
thread_id=thread.id,
127119
role="user",
128-
content="What's the weather in Seattle and What is the name and population of the country that uses currency with abbreviation THB?",
120+
content="What's the weather in Seattle?",
129121
)
130122
print(f"Created message, ID: {message.id}")
131123
```
@@ -201,6 +193,8 @@ const client = new AgentsClient(projectEndpoint, new DefaultAzureCredential());
201193

202194
## Read in the OpenAPI spec
203195

196+
You can find an example OpenAPI spec on [GitHub](https://github.com/azure-ai-foundry/foundry-samples/blob/main/samples/microsoft/python/getting-started-agents/openapi/weather_openapi.json).
197+
204198
```javascript
205199
// Read in OpenApi spec
206200
const filePath = "./data/weatherOpenApi.json";
@@ -283,7 +277,7 @@ console.log(`Deleted agent, agent ID: ${agent.id}`);
283277
:::zone pivot="csharp"
284278

285279
## Configure client and OpenAPI tool
286-
First, retrieve configuration details and create a `PersistentAgentsClient`, then define the `OpenApiToolDefinition` using the OpenAPI specification.
280+
First, retrieve configuration details and create a `PersistentAgentsClient`, then define the `OpenApiToolDefinition` using the OpenAPI specification. You can find an example OpenAPI spec on [GitHub](https://github.com/azure-ai-foundry/foundry-samples/blob/main/samples/microsoft/python/getting-started-agents/openapi/weather_openapi.json).
287281

288282
```csharp
289283
using Azure;
@@ -392,7 +386,7 @@ Follow the [REST API Quickstart](../../quickstart.md?pivots=rest-api#api-call-in
392386

393387
## Create the OpenAPI Spec tool definition, agent, and thread
394388

395-
You might want to store the OpenAPI specification in another file and import the content to initialize the tool. This example is using `anonymous` as the authentication type.
389+
You might want to store the OpenAPI specification in another file and import the content to initialize the tool. This example is using `anonymous` as the authentication type. You can find an example OpenAPI spec on [GitHub](https://github.com/azure-ai-foundry/foundry-samples/blob/main/samples/microsoft/python/getting-started-agents/openapi/weather_openapi.json).
396390
397391
```bash
398392
curl --request POST \

0 commit comments

Comments
 (0)