Skip to content

Commit ee28e96

Browse files
kaylieeejpalvarezl
andauthored
Release azure-ai-agents and azure-ai-projects 2.2.0 (#49544)
* regen projects * regen agents * update samples and tests * temp disable tests pending re-record * projects beta annotations * agents beta annotations * update samples * add spelling exception * spacing * beta annotations for optimizations models * Added missing imports * Formatting and code regen * Revapi report (#49585) * Revapi report * Compared against version resolution details * update run status to be string * add searchMemoriesWithResponse methods * unabbreviate evalId * renames * regen * toolbox renames * fix samples and tests * Sample parity with C# (#49633) * Missing samples * Added missing convenient API methods for delete memory items * Covered gap in convenient API for delete Memory store item * add version for revapi dependency * Convenience methods for file operations for sessions and code agents (#49607) * Added convenience methods for file operations * Added methods with response too * applied spotless * Async methods * core feature done * adjusted samples to use new methods * Duplicated files from samples for test for decoupling * made utils class final and hid the ctx * Updated convenient API for files to allow ovewrite flag * suppress empty models * update binary data and tests * regen * new beta annotations * Endpoint variant for evaluators * removed stale documentation * README and CHANGELOG updates * revapi exceptions * Hiding tsp-location files * Updated version for release * Added documentation for beta related builder methods * README updates * Latest spec changes: remove reminderPreviewTool and renamed method param * added convenience method for code agents * Unit tests for sha util * Latest spec commit * tests * Adjusted changelog entry date * Hiding tsp-location files * Permissive failure on customization class resource not found * Added more robust file localization strat to account for CI runs * Adjusted text --------- Co-authored-by: Jose Alvarez <josealvar@microsoft.com> Co-authored-by: Jose Alvarez <jpalvarezl@users.noreply.github.com>
1 parent bbfc243 commit ee28e96

363 files changed

Lines changed: 19366 additions & 17438 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

eng/versioning/version_client.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ com.azure:azure-data-sdk-parent;1.3.0;1.3.0
3737
com.azure:azure-sdk-parent;1.6.0;1.6.0
3838
com.azure:azure-client-sdk-parent;1.7.0;1.7.0
3939
com.azure:azure-ai-agents-persistent;1.0.0-beta.2;1.0.0-beta.3
40-
com.azure:azure-ai-agents;2.1.0;2.2.0-beta.1
40+
com.azure:azure-ai-agents;2.1.0;2.2.0
4141
com.azure:azure-ai-anomalydetector;3.0.0-beta.5;3.0.0-beta.6
4242
com.azure:azure-ai-contentsafety;1.0.18;1.1.0-beta.1
4343
com.azure:azure-ai-contentunderstanding;1.0.0;1.1.0-beta.3
@@ -53,7 +53,7 @@ com.azure:azure-ai-openai-assistants;1.0.0-beta.5;1.0.0-beta.6
5353
com.azure:azure-ai-openai-realtime;1.0.0-beta.1;1.0.0-beta.1
5454
com.azure:azure-ai-openai-stainless;1.0.0-beta.1;1.0.0-beta.1
5555
com.azure:azure-ai-personalizer;1.0.0-beta.1;1.0.0-beta.2
56-
com.azure:azure-ai-projects;2.1.0;2.2.0-beta.1
56+
com.azure:azure-ai-projects;2.1.0;2.2.0
5757
com.azure:azure-ai-speech-transcription;1.0.0;1.1.0-beta.1
5858
com.azure:azure-ai-textanalytics;5.5.13;5.6.0-beta.1
5959
com.azure:azure-ai-textanalytics-perf;1.0.0-beta.1;1.0.0-beta.1

sdk/ai/azure-ai-agents/CHANGELOG.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
# Release History
22

3-
## 2.2.0-beta.1 (Unreleased)
3+
## 2.2.0 (2026-07-01)
44

55
### Features Added
66

7-
- Added protocol-style `listOptimizationCandidates(String, com.azure.core.http.rest.RequestOptions)` overloads on `AgentsClient` and `AgentsAsyncClient` for listing raw optimization candidate pages as `BinaryData`.
7+
- Added convenience methods on `AgentsClient` and `AgentsAsyncClient` to read and write hosted-agent files directly from and to disk using a `String` file path. `downloadAgentCode`, `downloadAgentCodeWithResponse`, and `downloadSessionFileWithResponse` write the downloaded content to the supplied path and accept an optional `overwrite` flag; when the flag is omitted the operation fails if a file already exists at the destination. `uploadSessionFileWithResponse` and the new `CodeFileDetails(String)` constructor read the upload content from a `String` file path.
8+
- Added a flattened convenience overload `createAgentVersionFromCode(String, HostedAgentDefinition, CodeFileDetails, String, Map)` on `AgentsClient` and `AgentsAsyncClient`. It accepts the hosted-agent definition, code zip, description, and metadata directly instead of a nested `CreateAgentVersionFromCodeContent`, and computes the required `x-ms-code-zip-sha256` value from the code automatically.
9+
- Added `deleteMemory(String, String)` to `BetaMemoryStoresClient` and `BetaMemoryStoresAsyncClient` for deleting an individual memory item from a memory store.
10+
- Added `ToolboxesClient` and `ToolboxesAsyncClient` have been moved from `beta` to GA.
11+
- Added a toolbox-specific tool model hierarchy for toolbox versions, including `ToolboxTool`, `ToolboxToolType`, and related `*ToolboxTool` classes such as `CodeInterpreterToolboxTool`, `OpenApiToolboxTool`, and `ToolboxSearchPreviewToolboxTool`.
12+
- Added support for additional agent tool types, including `NamespaceTool`, `ToolSearchTool`, and `ReminderPreviewTool`.
13+
- Updated preview agent optimization support to the V2 preview contract on `BetaAgentsClient` and `BetaAgentsAsyncClient`.
814

915
### Breaking Changes
1016

11-
- Preview operation groups now use beta-prefixed clients built through `AgentsClientBuilder.beta()`: `MemoryStoresClient` / `MemoryStoresAsyncClient` renamed to `BetaMemoryStoresClient` / `BetaMemoryStoresAsyncClient`, `ToolboxesClient` / `ToolboxesAsyncClient` renamed to `BetaToolboxesClient` / `BetaToolboxesAsyncClient`, and preview agent/session operations moved to `BetaAgentsClient` / `BetaAgentsAsyncClient`. `AgentSessionFilesClient` / `AgentSessionFilesAsyncClient` were removed; use the session-file methods on `BetaAgentsClient` / `BetaAgentsAsyncClient` instead.
12-
- `listOptimizationCandidates` on `AgentsClient` and `AgentsAsyncClient` now returns paged optimization candidates (`PagedIterable<OptimizationCandidate>` / `PagedFlux<OptimizationCandidate>`) instead of `OptimizationCandidatePagedResult` / `Mono<OptimizationCandidatePagedResult>`. The `OptimizationCandidatePagedResult` model was removed. The protocol methods where adjusted accordingly.
17+
- Memory store preview clients now use beta-prefixed names built through `AgentsClientBuilder.beta()`: `MemoryStoresClient` / `MemoryStoresAsyncClient` renamed to `BetaMemoryStoresClient` / `BetaMemoryStoresAsyncClient`.
18+
- `BetaToolboxesClient` / `BetaToolboxesAsyncClient` renamed to `ToolboxesClient` / `ToolboxesAsyncClient` and are now built directly with `AgentsClientBuilder.buildToolboxesClient()` / `buildToolboxesAsyncClient()`. The beta-builder methods for toolboxes were removed.
19+
- Toolbox version APIs now use `ToolboxTool` models instead of agent `Tool` models; for example, `ToolboxSearchPreviewTool` was replaced by `ToolboxSearchPreviewToolboxTool`.
20+
- Agent optimization APIs were updated to the V2 preview contract and moved to `BetaAgentsClient` / `BetaAgentsAsyncClient`. `FoundryFeaturesOptInKeys.AGENTS_OPTIMIZATION_V1_PREVIEW` renamed to `AGENTS_OPTIMIZATION_V2_PREVIEW`, and candidate-specific APIs and models such as `CandidateDeployConfig`, `CandidateFileInfo`, `CandidateMetadata`, `CandidateResults`, `PromoteCandidateInput`, and `PromoteCandidateResult` were removed or folded into the updated optimization job models.
21+
- Hosted-agent session and code-package APIs were simplified by removing `AgentDefinitionOptInKeys` parameters. `AgentSessionFilesClient` / `AgentSessionFilesAsyncClient` were removed; use the session-file methods on `AgentsClient` / `AgentsAsyncClient` instead.
22+
- Tool and protocol models were aligned with the latest service contract. Notable renames include `NamespaceToolParam``NamespaceTool`, `ToolSearchToolParam``ToolSearchTool`, `AgentIdentifier``OptimizationAgentIdentifier`, and `DatasetRef``OptimizationEvaluatorRef`; `AgentProtocol` and `IsolationKeySource` were removed.
1323

1424
### Bugs Fixed
1525

@@ -18,6 +28,9 @@
1828

1929
### Other Changes
2030

31+
- Added samples demonstrating external agent CRUD (`ExternalAgentSample` / `ExternalAgentAsyncSample`) and memory store item CRUD (`MemoryStoreItemsSample` / `MemoryStoreItemsAsyncSample`).
32+
- Marked preview clients, models, and methods with `@Beta` annotations so preview surface area is explicit in generated API docs.
33+
2134
## 2.1.0 (2026-06-01)
2235

2336
### Features Added

sdk/ai/azure-ai-agents/README.md

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Develop Agents using the Azure AI Foundry platform, leveraging an extensive ecos
44

55
The client library uses a single service version `v1` of the AI Foundry [data plane REST APIs](https://aka.ms/azsdk/azure-ai-projects/ga-rest-api-reference).
66

7+
> [!IMPORTANT]
8+
> **Preview and beta features**
9+
> - Build `Beta*Client` and `Beta*AsyncClient` instances through `AgentsClientBuilder.beta()`. These clients automatically opt in to their preview service area; you do not need `allowPreview(true)` for them.
10+
> - Use `AgentsClientBuilder.allowPreview(true)` only when calling preview APIs on non-Beta clients, such as preview hosted-agent sessions, session files, and code package operations on `AgentsClient` / `AgentsAsyncClient`.
11+
> - Classes and methods annotated with `@Beta` are preview API surface and may change in future releases. See [Preview operation groups and beta clients](#preview-operation-groups-and-beta-clients) for details.
12+
713
## Documentation
814

915
Various documentation is available to help you get started
@@ -25,7 +31,7 @@ Various documentation is available to help you get started
2531
<dependency>
2632
<groupId>com.azure</groupId>
2733
<artifactId>azure-ai-agents</artifactId>
28-
<version>2.1.0</version>
34+
<version>2.2.0</version>
2935
</dependency>
3036
```
3137
[//]: # ({x-version-update-end})
@@ -57,11 +63,11 @@ AgentsAsyncClient agentsAsyncClient = new AgentsClientBuilder()
5763
```
5864

5965
The Agents client library has the following sub-clients which group the different operations that can be performed:
60-
- `AgentsClient` / `AgentsAsyncClient`: Perform generally available operations related to agents, such as creating, retrieving, updating, and deleting agents.
61-
- `BetaAgentsClient` / `BetaAgentsAsyncClient` **(preview)**: Perform preview agent operations, including hosted-agent sessions, session files, code package operations, and preview agent optimization operations.
66+
- `AgentsClient` / `AgentsAsyncClient`: Perform operations related to agents, such as creating, retrieving, updating, and deleting agents. When `allowPreview(true)` is configured, these clients can also use preview hosted-agent sessions, session files, and code package operations.
67+
- `BetaAgentsClient` / `BetaAgentsAsyncClient` **(preview)**: Perform preview agent optimization operations.
6268
- `ResponsesClient` / `ResponsesAsyncClient`: Handle responses operations. See the [OpenAI's Responses API documentation][openai_responses_api_docs] for more information.
6369
- `BetaMemoryStoresClient` / `BetaMemoryStoresAsyncClient` **(preview)**: Manage memory stores and individual memory items for agents.
64-
- `BetaToolboxesClient` / `BetaToolboxesAsyncClient` **(preview)**: Manage toolboxes and toolbox versions.
70+
- `ToolboxesClient` / `ToolboxesAsyncClient`: Manage toolboxes and toolbox versions.
6571

6672
Conversation operations are accessed through the [OpenAI Official Java SDK][openai_java_sdk]'s `ConversationService`. See the [OpenAI's Conversation API documentation][openai_conversations_api_docs] for more information.
6773

@@ -71,7 +77,7 @@ To access each sub-client you need to use your `AgentsClientBuilder()`. The Agen
7177
AgentsClientBuilder builder = new AgentsClientBuilder()
7278
.credential(new DefaultAzureCredentialBuilder().build())
7379
.endpoint(endpoint)
74-
.allowPreview(true); // Enables preview response types for non-Beta clients that support them.
80+
.allowPreview(true); // Only needed for preview APIs on non-Beta clients that support them.
7581

7682
// Agents sub-clients
7783
AgentsClient agentsClient = builder.buildAgentsClient();
@@ -85,9 +91,9 @@ ResponsesAsyncClient responsesAsyncClient = builder.buildResponsesAsyncClient();
8591
// Memory Stores sub-clients (preview).
8692
BetaMemoryStoresClient memoryStoresClient = builder.beta().buildBetaMemoryStoresClient();
8793
BetaMemoryStoresAsyncClient memoryStoresAsyncClient = builder.beta().buildBetaMemoryStoresAsyncClient();
88-
// Toolboxes sub-clients (preview).
89-
BetaToolboxesClient toolboxesClient = builder.beta().buildBetaToolboxesClient();
90-
BetaToolboxesAsyncClient toolboxesAsyncClient = builder.beta().buildBetaToolboxesAsyncClient();
94+
// Toolboxes sub-clients.
95+
ToolboxesClient toolboxesClient = builder.buildToolboxesClient();
96+
ToolboxesAsyncClient toolboxesAsyncClient = builder.buildToolboxesAsyncClient();
9197
```
9298

9399
The [OpenAI Official Java SDK][openai_java_sdk] is imported transitively and can be built directly from the `AgentsClientBuilder`. Use it to access conversation operations and other OpenAI services:
@@ -115,11 +121,16 @@ The SDK supports a variety of tools that can be attached to agent definitions. S
115121
| `AzureAISearchTool` | Azure AI Search |
116122
| `AzureFunctionTool` | Azure Functions |
117123
| `BingGroundingTool` | Bing grounding |
124+
| `CaptureStructuredOutputsTool` | Structured output capture |
118125
| `CodeInterpreterTool` | Code interpreter |
119126
| `FileSearchTool` | File search |
120127
| `FunctionTool` | Custom function calling |
121128
| `ImageGenTool` | Image generation |
129+
| `McpTool` | Model Context Protocol (MCP) |
130+
| `NamespaceTool` | Namespaces for grouping function and custom tools |
122131
| `OpenApiTool` | OpenAPI spec-based tools |
132+
| `ToolSearchTool` | Deferred tool search |
133+
| `WebSearchTool` | Web search |
123134

124135
**Preview tools:**
125136

@@ -130,11 +141,10 @@ The SDK supports a variety of tools that can be attached to agent definitions. S
130141
| `BrowserAutomationPreviewTool` | Browser automation |
131142
| `ComputerUsePreviewTool` | Computer use |
132143
| `FabricIqPreviewTool` | Fabric IQ |
133-
| `McpTool` | Model Context Protocol (MCP) |
134144
| `MemorySearchPreviewTool` | Memory search |
135145
| `MicrosoftFabricPreviewTool` | Microsoft Fabric |
146+
| `ReminderPreviewTool` | Reminder scheduling |
136147
| `SharepointPreviewTool` | SharePoint grounding |
137-
| `ToolboxSearchPreviewTool` | Toolbox search |
138148
| `WebSearchPreviewTool` | Web search |
139149
| `WorkIqPreviewTool` | Work IQ |
140150

@@ -144,6 +154,8 @@ Supported tool classes may also expose optional `name`, `description`, and `tool
144154

145155
Several operation groups in the Agents client library expose **preview** service features. These features require the `Foundry-Features` HTTP header. The SDK populates that header for you; you do not need to set the header value manually.
146156

157+
APIs annotated with `@Beta` are part of the SDK's preview surface, even when they appear on a non-Beta client. These APIs are subject to breaking changes in future releases and should be used with the same compatibility expectations as other preview features.
158+
147159
Use `AgentsClientBuilder.allowPreview(true)` when building non-Beta clients that support preview service behavior. For example, `AgentsClient` and `AgentsAsyncClient` use this builder setting to allow the service to return preview response types:
148160

149161
```java
@@ -155,19 +167,18 @@ AgentsClientBuilder builder = new AgentsClientBuilder()
155167
AgentsClient agentsClient = builder.buildAgentsClient();
156168
```
157169

158-
Clients whose names start with `Beta` always opt in to their corresponding preview service area. Requests sent by these clients automatically include the appropriate `Foundry-Features` header, and their APIs can send or return preview/beta request and response types. You do not need to call `allowPreview(true)` to use a `Beta*Client`.
170+
Build clients whose names start with `Beta` from `AgentsClientBuilder.beta()`. These clients always opt in to their corresponding preview service area. Requests sent by these clients automatically include the appropriate `Foundry-Features` header, and their APIs can send or return preview/beta request and response types. You do not need to call `allowPreview(true)` to use a `Beta*Client`.
159171

160172
| Beta sub-client | Automatically populated `Foundry-Features` value |
161173
|---|---|
162-
| `BetaAgentsClient` | `HostedAgents=V1Preview,WorkflowAgents=V1Preview,AgentEndpoints=V1Preview,CodeAgents=V1Preview,ExternalAgents=V1Preview,AgentsOptimization=V1Preview` |
174+
| `BetaAgentsClient` | `WorkflowAgents=V1Preview,ExternalAgents=V1Preview,DraftAgents=V1Preview,AgentsOptimization=V2Preview` |
163175
| `BetaMemoryStoresClient` | `MemoryStores=V1Preview` |
164-
| `BetaToolboxesClient` | `Toolboxes=V1Preview` |
165176

166177
The async `Beta*AsyncClient` counterparts follow the same behavior.
167178

168179
### Memory item management
169180

170-
`BetaMemoryStoresClient` and `BetaMemoryStoresAsyncClient` manage memory stores and individual memory items. In addition to store-level operations, use `createMemory`, `updateMemory`, `listMemories`, `getMemory`, and `deleteMemory` to manage individual memories. `ListMemoriesOptions` supports filtering by scope and `MemoryItemKind`, including `MemoryItemKind.PROCEDURAL`.
181+
`BetaMemoryStoresClient` and `BetaMemoryStoresAsyncClient` manage memory stores and individual memory items. In addition to store-level operations, use `createMemory`, `updateMemory`, `listMemories`, `getMemory`, and `deleteMemory` to manage individual memories. `ListMemoriesOptions` supports filtering by scope and `MemoryItemKind`, including `MemoryItemKind.PROCEDURAL`. See `MemoryStoreItemsSample` and `MemoryStoreItemsAsyncSample` for complete examples.
171182

172183
### Using OpenAI's official library
173184

@@ -522,9 +533,7 @@ Connect agents to Fabric IQ project connections for enterprise data grounding:
522533

523534
FabricIqPreviewTool fabricIqTool = new FabricIqPreviewTool(fabricIqConnectionId)
524535
.setServerLabel("fabric_iq")
525-
.setRequireApproval("never")
526-
.setName("fabric_iq_lookup")
527-
.setDescription("Use FabricIQ to answer questions grounded in enterprise data.");
536+
.setRequireApproval("never");
528537

529538
```
530539

@@ -618,15 +627,15 @@ See the full sample in [OpenApiWithConnectionSync.java](https://github.com/Azure
618627

619628
#### Toolbox Tools
620629

621-
Toolbox tools are defined in toolbox versions and managed through `BetaToolboxesClient` / `BetaToolboxesAsyncClient`.
630+
Toolbox tools are defined in toolbox versions and managed through `ToolboxesClient` / `ToolboxesAsyncClient`. Toolbox versions use `ToolboxTool` subclasses rather than agent `Tool` subclasses.
622631

623632
##### **Toolbox Search (Preview)**
624633

625-
Use `ToolboxSearchPreviewTool` inside a toolbox version to let an agent search the available toolbox tools at runtime:
634+
Use `ToolboxSearchPreviewToolboxTool` inside a toolbox version to let an agent search the available toolbox tools at runtime:
626635

627636
```java com.azure.ai.agents.toolboxes.ToolboxSearchToolboxSample.createToolboxSearchToolbox
628637

629-
ToolboxSearchPreviewTool toolboxSearchTool = new ToolboxSearchPreviewTool()
638+
ToolboxSearchPreviewToolboxTool toolboxSearchTool = new ToolboxSearchPreviewToolboxTool()
630639
.setName("search_tools")
631640
.setDescription("Search over available toolbox tools at runtime.");
632641

@@ -640,7 +649,7 @@ ToolboxVersionDetails version = toolboxesClient.createToolboxVersion(
640649

641650
System.out.printf("Created toolbox: %s%n", version.getName());
642651
System.out.printf("Toolbox version: %s%n", version.getVersion());
643-
for (Tool tool : version.getTools()) {
652+
for (ToolboxTool tool : version.getTools()) {
644653
System.out.printf("Tool type: %s%n", tool.getType());
645654
}
646655

@@ -723,7 +732,7 @@ The synchronous session log method returns `IterableStream<SessionLogEvent>`, wh
723732

724733
```java com.azure.ai.agents.session_logs_sync
725734
IterableStream<SessionLogEvent> sessionLogs =
726-
betaAgentsClient.getSessionLogStream(agentName, agentVersion, sessionId);
735+
agentsClient.getSessionLogStream(agentName, agentVersion, sessionId);
727736

728737
int logsRead = 0;
729738
for (SessionLogEvent event : sessionLogs) {
@@ -741,7 +750,7 @@ for (SessionLogEvent event : sessionLogs) {
741750
The asynchronous session log method returns `Flux<SessionLogEvent>`, integrating naturally with Reactor pipelines:
742751

743752
```java com.azure.ai.agents.session_logs_async
744-
betaAgentsAsyncClient.getSessionLogStream(agentName, agentVersion, sessionId)
753+
agentsAsyncClient.getSessionLogStream(agentName, agentVersion, sessionId)
745754
.take(100)
746755
.doOnNext(event -> System.out.printf("[%s] %s%n", event.getEvent(), event.getData()))
747756
.blockLast();

sdk/ai/azure-ai-agents/cspell.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import:
33
overrides:
44
- filename: "**/sdk/ai/azure-ai-agents/*"
55
words:
6+
- BYOT
67
- dedup
78
- gitmcp
89
- byot

0 commit comments

Comments
 (0)