github Azure/azure-sdk-for-python azure-ai-projects_2.2.0

one hour ago

2.2.0 (2026-05-29)

Features Added

  • Support integration of external Agents (in preview). See new ExternalAgentDefinition class.
  • New Agent tool in preview FabricIQPreviewTool.
  • New Agent tool in preview ToolboxSearchPreviewTool.
  • New methods on .beta.agents for
    • Code-based hosted agents: create_version_from_code, download_code.
    • Optimization jobs: create_optimization_job, get_optimization_job, list_optimization_jobs, cancel_optimization_job, list_optimization_candidates.
    • Optimization candidate management: list_optimization_candidates, get_optimization_candidate, get_optimization_candidate_config, get_optimization_candidate_results, get_candidate_file, promote_candidate.
    • stop_session to stop a running agent session.
  • New .beta.datasets sub-client with data generation job operations: create_generation_job, get_generation_job, list_generation_jobs, cancel_generation_job, delete_generation_job.
  • New .beta.models sub-client to handle AI model weights: create, list_versions, list, get, delete, update, pending_create_version, pending_upload, get_credentials.
  • New .beta.routines sub-client with routine operations: create_or_update, get, enable, disable, list, delete, list_runs, dispatch.
  • New methods on .beta.evaluators for evaluator generation jobs: create_generation_job, get_generation_job, list_generation_jobs, cancel_generation_job, delete_generation_job.
  • New methods on .beta.memory_stores to handle individual memory items: create_memory, update_memory, list_memories, get_memory, delete_memory.
  • New methods on .beta.skills for versioned skill management: create, list_versions, get_version, download_version, delete_version.
  • New optional string properties description and name added to Agent tools classes which did not have them before.
  • New optional tool_configs added to Agent tool classes.
  • New read-only property content_hash on CodeConfiguration, returning the SHA-256 hex digest of the uploaded code zip.
  • New optional force parameter on agents.delete and agents.delete_version methods.
  • New optional blueprint_reference parameters on agents.create_version method.

Breaking Changes

Breaking changes in beta methods:

  • Required keyword isolation_key removed from .beta.agents.create_session() and .beta.agents.delete_session() methods.
  • Argument body in methods .beta.evaluation_taxonomies.create() and .beta.evaluation_taxonomies.update() renamed to taxonomy.
  • Argument body in method .beta.skills.create_from_files() renamed to content.
  • Method .beta.agents.get_session_files renamed to .beta.agents.list_session_files.
  • Method .beta.skills.create signature changed — now takes name and keyword inline_content: SkillInlineContent; returns SkillVersion.
  • Method .beta.skills.create_from_package renamed to .beta.skills.create_from_files.
  • Method .beta.skills.create_from_files signature changed — now takes name and content: CreateSkillVersionFromFilesBody; returns SkillVersion.
  • Method .beta.skills.update signature changed — now only accepts keyword default_version; returns SkillDetails.

Breaking changes in beta classes:

  • Required property isolation_key_source removed from class EntraAuthorizationScheme.
  • Renamed class AgentEndpoint to AgentEndpointConfig.
  • Renamed class DeleteSkillResponse to DeleteSkillResult.
  • Renamed class SessionDirectoryListResponse to SessionDirectoryListResult.
  • Renamed class SessionFileWriteResponse to SessionFileWriteResult.
  • Renamed class SkillObject to SkillDetails. Property skill_id renamed to id. Properties has_blob and metadata were removed.
  • Renamed class Target to EvaluationTarget.
  • Renamed class TargetConfig to RedTeamTargetConfig.

Bugs Fixed

  • Fixed telemetry instrumentor to correctly call is_recording() as a method on spans, ensuring non-recording spans are properly skipped (e.g., when sampling is configured) (GitHub issue 46544).

Sample updates

  • Added new Agent tool samples sample_agent_work_iq.py and sample_agent_work_iq_async.py demonstrating use of WorkIQPreviewTool.
  • Added new Agent tool samples sample_agent_fabric_iq.py and sample_agent_fabric_iq_async.py demonstrating use of FabricIQPreviewTool.
  • Hosted Agents:
    • Added Hosted Agent creation samples sample_create_hosted_agent.py and sample_create_hosted_agent_async.py, demonstrating hosted agent version creation and retrieval with AIProjectClient.
    • Added Hosted Agent code-upload samples sample_create_hosted_agent_from_code.py and sample_create_hosted_agent_from_code_async.py, demonstrating uploading a code package (zip) as a new hosted agent version.
    • The Hosted Agent creation sample also demonstrates assigning the hosted agent managed identity the Azure AI User RBAC role on the backing Azure AI account.
    • Updated the other Hosted Agent samples to reuse an existing Hosted Agent as a prerequisite, instead of creating a new hosted agent version in each sample.
  • Added Toolbox tool-search sample sample_toolboxes_with_search_preview.py and sample_toolboxes_with_search_preview_async.py, demonstrating creating a Toolbox version with ToolboxSearchPreviewTool and invoking MCPTool.
  • Added .beta.models samples under samples/models/:
    • sample_models_basic.py — synchronous end-to-end registration via the create helper (uses azcopy), followed by get, list_versions, list, get_credentials, update, and delete.
    • sample_models_create_and_poll.py — alternative synchronous registration that hand-rolls the spec's three-step flow (pending_upload → upload via azure-storage-blobpending_create_version + poll), without taking a dependency on azcopy.
    • sample_models_basic_async.py — asynchronous version of the same three-step flow using azure.ai.projects.aio.AIProjectClient and azure.storage.blob.aio.ContainerClient.
  • Added new evaluation sample sample_model_evaluation_instant_model.py demonstrating model evaluation with an instant model.
  • Refreshed evaluation samples under samples/evaluations/ and samples/evaluations/agentic_evaluators/ (including sample_agent_evaluation, sample_agent_response_evaluation, sample_eval_catalog_prompt_based_evaluators, sample_evaluations_ai_assisted, sample_evaluations_builtin_with_csv, sample_evaluations_builtin_with_dataset_id, sample_evaluations_builtin_with_inline_data, sample_evaluations_builtin_with_inline_data_oai, sample_scheduled_evaluations, sample_coherence, sample_fluency, sample_intent_resolution, sample_relevance, sample_response_completeness, sample_tool_call_accuracy, sample_tool_call_success, sample_tool_input_accuracy, sample_tool_output_utilization, sample_tool_selection, and sample_generic_agentic_evaluator).
  • New sample sample_dataset_generation_job_simpleqna_with_prompt_source.py showing an end-to-end flow that generates a QnA dataset via .beta.datasets.create_generation_job and runs an OpenAI evaluation.

Don't miss a new azure-sdk-for-python release

NewReleases is sending notifications on new releases.