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
Copy file name to clipboardExpand all lines: sdk/ai/azure-ai-projects/AGENTS_MIGRATION_GUIDE.md
+49-4Lines changed: 49 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
-
# Agents migration guide from Hub-based projects to Endpoint-based projects.
2
-
This guide describes migration from hub-based to Endpoint-based projects. To create a Endpoint-based project, please use one of the deployment scripts on [foundry samples repository](https://github.com/azure-ai-foundry/foundry-samples/tree/main/samples/microsoft/infrastructure-setup) appropriate for your scenario, also you can use Azure AI Foundry UI. The support of hub-based projects was dropped in `azure-ai-projects` version `1.0.0b11`. In this document, we show the operation implementation of before `1.0.0b11` in **Hub-based** secion, followed by code for `azure-ai-projects` version `1.0.0b11` or later in **Endpoint-based**.
1
+
# Agents migration guide from Hub-based projects to Endpoint-based projects
2
+
3
+
This guide describes migration from hub-based to Endpoint-based projects. To create a Endpoint-based project, please use one of the deployment scripts on [foundry samples repository](https://github.com/azure-ai-foundry/foundry-samples/tree/main/samples/microsoft/infrastructure-setup) appropriate for your scenario, also you can use Azure AI Foundry UI. The support of hub-based projects was dropped in `azure-ai-projects` version `1.0.0b11`. In this document, we show the operation implementation of before `1.0.0b11` in **Hub-based** section, followed by code for `azure-ai-projects` version `1.0.0b11` or later in **Endpoint-based**.
1. Create project. The connection string is replaced by the endpoint. The project endpoint URL has the form https://\<your-ai-services-account-name\>.services.ai.azure.com/api/projects/\<your-project-name\>. It can be found in your Azure AI Foundry Project overview page.
2. Crate an agent. In the new versions of SDK, the agent can be created using project client or directly created by using `AgentsClient` constructor. In the code below, `project_client.agents`is an `AgentsClient` instance so `project_client.agents`and`agents_client` can be used interchangeably. For simplicity we will use ` project_client.agents `.
127
132
128
133
**Hub-based**
134
+
129
135
```python
130
136
agent = project_client.agents.create_agent(
131
137
model="gpt-4o",
132
138
name="my-assistant",
133
139
instructions="You are helpful assistant",
134
140
)
135
141
```
136
-
**Endpoint-based**
137
142
138
-
Agent is instantiated using `AIProjectClient `
143
+
**Endpoint-based**
144
+
145
+
Agent is instantiated using `AIProjectClient`
146
+
139
147
```python
140
148
agent = project_client.agents.create_agent(
141
149
model="gpt-4o",
@@ -145,6 +153,7 @@ Files Operations
145
153
```
146
154
147
155
Agent is instantiated using `AgentsClient` constructor:
156
+
148
157
```python
149
158
from azure.ai.agents import AgentsClient
150
159
@@ -158,9 +167,11 @@ Files Operations
158
167
instructions="You are helpful agent",
159
168
)
160
169
```
170
+
161
171
3. List agents. New version of SDK allows more convenient ways of listing threads, messages and agents by returning `ItemPaged`and`AsyncItemPaged`. The list of returned items is split by pages, which may be consequently returned to user. Below we will demonstrate this mechanism for agents. The `limit` parameter defines the number of items on the page. This example is also applicable for listing threads, runs, run steps, vector stores, files in vector store, and messages.
# Iterate items by page. Each page will be limited by two items.
@@ -190,29 +202,36 @@ Files Operations
190
202
4. Delete agent. In versions azure-ai-projects 1.0.0b11, all deletion operations used to return deletion status, for example, deletion of agent was returning `AgentDeletionStatus`. In 1.0.0b11 and later, these operations do notreturn a value.
Copy file name to clipboardExpand all lines: sdk/ai/azure-ai-projects/CHANGELOG.md
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,29 @@
1
1
# Release History
2
2
3
+
## 1.0.0b12 (2025-06-23)
4
+
5
+
### Breaking changes
6
+
7
+
* These 3 methods on `AIProjectClient` were removed: `.inference.get_chat_completions_client()`,
8
+
`.inference.get_embeddings_client()` and `.inference.get_image_embeddings_client()`.
9
+
For guidance on obtaining an authenticated `azure-ai-inference` client for your AI Foundry Project,
10
+
refer to the updated samples in the `samples\inference` directory. For example,
11
+
[sample_chat_completions_with_azure_ai_inference_client.py](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ai/azure-ai-projects/samples/inference/sample_chat_completions_with_azure_ai_inference_client.py). Alternatively, use the `.inference.get_azure_openai_client()` method to perform chat completions with an Azure OpenAI client.
12
+
* Method argument name changes:
13
+
* In method `.indexes.create_or_update()` argument `body` was renamed `index`.
14
+
* In method `.datasets.create_or_update()` argument `body` was renamed `dataset_version`.
15
+
* In method `.datasets.pending_upload()` argument `body` was renamed `pending_upload_request`.
16
+
17
+
### Bugs Fixed
18
+
19
+
* Fix to package function `enable_telemetry()` to correctly instrument `azure-ai-agents`.
20
+
* Updated RedTeam target type visibility to allow for type being sent in the JSON for redteam run creation.
21
+
22
+
### Other
23
+
24
+
* Set dependency on `azure-ai-agents` version `1.0.0` or above,
25
+
now that we have a stable release of the Agents package.
26
+
3
27
## 1.0.0b11 (2025-05-15)
4
28
5
29
There have been significant updates with the release of version 1.0.0b11, including breaking changes.
0 commit comments