2.2.0 (2026-07-01)
Features Added
- Added convenience methods on
AgentsClientandAgentsAsyncClientto read and write hosted-agent files directly from and to disk using aStringfile path.downloadAgentCode,downloadAgentCodeWithResponse, anddownloadSessionFileWithResponsewrite the downloaded content to the supplied path and accept an optionaloverwriteflag; when the flag is omitted the operation fails if a file already exists at the destination.uploadSessionFileWithResponseand the newCodeFileDetails(String)constructor read the upload content from aStringfile path. - Added a flattened convenience overload
createAgentVersionFromCode(String, HostedAgentDefinition, CodeFileDetails, String, Map)onAgentsClientandAgentsAsyncClient. It accepts the hosted-agent definition, code zip, description, and metadata directly instead of a nestedCreateAgentVersionFromCodeContent, and computes the requiredx-ms-code-zip-sha256value from the code automatically. - Added
deleteMemory(String, String)toBetaMemoryStoresClientandBetaMemoryStoresAsyncClientfor deleting an individual memory item from a memory store. - Added
ToolboxesClientandToolboxesAsyncClienthave been moved frombetato GA. - Added a toolbox-specific tool model hierarchy for toolbox versions, including
ToolboxTool,ToolboxToolType, and related*ToolboxToolclasses such asCodeInterpreterToolboxTool,OpenApiToolboxTool, andToolboxSearchPreviewToolboxTool. - Added support for additional agent tool types, including
NamespaceTool,ToolSearchTool, andReminderPreviewTool. - Updated preview agent optimization support to the V2 preview contract on
BetaAgentsClientandBetaAgentsAsyncClient.
Breaking Changes
- Memory store preview clients now use beta-prefixed names built through
AgentsClientBuilder.beta():MemoryStoresClient/MemoryStoresAsyncClientrenamed toBetaMemoryStoresClient/BetaMemoryStoresAsyncClient. BetaToolboxesClient/BetaToolboxesAsyncClientrenamed toToolboxesClient/ToolboxesAsyncClientand are now built directly withAgentsClientBuilder.buildToolboxesClient()/buildToolboxesAsyncClient(). The beta-builder methods for toolboxes were removed.- Toolbox version APIs now use
ToolboxToolmodels instead of agentToolmodels; for example,ToolboxSearchPreviewToolwas replaced byToolboxSearchPreviewToolboxTool. - Agent optimization APIs were updated to the V2 preview contract and moved to
BetaAgentsClient/BetaAgentsAsyncClient.FoundryFeaturesOptInKeys.AGENTS_OPTIMIZATION_V1_PREVIEWrenamed toAGENTS_OPTIMIZATION_V2_PREVIEW, and candidate-specific APIs and models such asCandidateDeployConfig,CandidateFileInfo,CandidateMetadata,CandidateResults,PromoteCandidateInput, andPromoteCandidateResultwere removed or folded into the updated optimization job models. - Hosted-agent session and code-package APIs were simplified by removing
AgentDefinitionOptInKeysparameters.AgentSessionFilesClient/AgentSessionFilesAsyncClientwere removed; use the session-file methods onAgentsClient/AgentsAsyncClientinstead. - Tool and protocol models were aligned with the latest service contract. Notable renames include
NamespaceToolParam→NamespaceTool,ToolSearchToolParam→ToolSearchTool,AgentIdentifier→OptimizationAgentIdentifier, andDatasetRef→OptimizationEvaluatorRef;AgentProtocolandIsolationKeySourcewere removed.
Bugs Fixed
- Fixed the agent-scoped OpenAI client returned by
AgentsClientBuilder.buildAgentScopedOpenAIClientandbuildAgentScopedOpenAIAsyncClientso requests to a hosted-agent endpoint target the correct URL. Previously the request path was duplicated (.../protocols/openai/openai/responses) and used an unsupported defaultapi-version, causing400errors when invoking the OpenAI Responses API or streaming session logs through an agent endpoint. The client now uses the unified Azure URL path mode and sendsapi-version=v1. - Fixed OpenAI and Responses clients built from
AgentsClientBuilderto honor a customHttpPipelinesupplied throughpipeline(...), preserving custom policies while still adding required preview feature headers for applicable preview clients.
Other Changes
- Added samples demonstrating external agent CRUD (
ExternalAgentSample/ExternalAgentAsyncSample) and memory store item CRUD (MemoryStoreItemsSample/MemoryStoreItemsAsyncSample). - Marked preview clients, models, and methods with
@Betaannotations so preview surface area is explicit in generated API docs.