Skip to content

Sample consolidation and Tool tests#48317

Merged
jpalvarezl merged 23 commits intomainfrom
jpalvarezl/fix/sample_work_docs
Mar 10, 2026
Merged

Sample consolidation and Tool tests#48317
jpalvarezl merged 23 commits intomainfrom
jpalvarezl/fix/sample_work_docs

Conversation

@jpalvarezl
Copy link
Member

This pull request adds comprehensive support for agent tool samples in the Azure AI Agents SDK, aligning Java sample coverage with the Python SDK and introducing new end-to-end documentation and test coverage. It includes new async sample files, renames existing samples for clarity, and updates documentation to reflect these changes and pending link updates.

New and updated samples for agent tools:

  • Added new async sample files for agent tools, including AgentToAgentAsync.java and AzureAISearchAsync.java, demonstrating how to use these tools with the async client. [1] [2]
  • Renamed existing sync sample files for agent tools for consistency, e.g., AgentToAgentSample.javaAgentToAgentSync.java and AzureAISearchSample.javaAzureAISearchSync.java. [1] [2]

Documentation improvements:

  • Expanded the README.md with detailed sections for both built-in and connection-based tools, including code snippets and sample links for each tool.
  • Added UPDATE_README_LINKS.md to track pending sample link updates, reflecting file renames and new samples that will be added after merging.

SDK and test enhancements:

  • Added a convenience method readSpecFromFile(Path) to OpenApiFunctionDefinition for easier OpenAPI integration, and provided new OpenAPI sample and tool samples for parity with Python SDK. Also added recorded end-to-end tests for OpenAPI tool flows.

Miscellaneous:

  • Updated asset tag in assets.json to reflect new sample and tool additions.

- CHANGELOG: Added entries for readSpecFromFile, OpenApiSample, and OpenAPIToolTests
- README: Added full tool catalog (15 tools) aligned with Python SDK README structure
- All sample links use absolute GitHub URLs for CI link verification
- Added MISSING_SAMPLES.md tracking Java vs Python sample parity gaps
Base automatically changed from jpalvarezl/fix/sample_work to main March 7, 2026 00:10
Copilot AI review requested due to automatic review settings March 9, 2026 10:53
@jpalvarezl jpalvarezl enabled auto-merge (squash) March 9, 2026 10:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands Azure AI Agents Java tool coverage by consolidating/renaming tool samples into consistent *Sync/*Async variants, adding new tool samples (including OpenAPI and connection-based flows), and introducing new end-to-end tool tests alongside README/CHANGELOG updates.

Changes:

  • Added new end-to-end tool tests for sync and async clients (replacing the prior OpenAPI-only test).
  • Renamed and added numerous tool samples to provide consistent Sync/Async coverage and parity with the Python SDK.
  • Expanded README tool documentation and added a tracking doc for follow-up link updates; updated assets tag and changelog.

Reviewed changes

Copilot reviewed 50 out of 50 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/PromptAgentDefinitionSerializationTests.java Fixes package declaration to match directory/package structure.
sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ToolsTests.java Adds consolidated sync end-to-end tests for multiple tools (OpenAPI, Code Interpreter, Function, Web Search, MCP, File Search).
sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ToolsAsyncTests.java Adds consolidated async end-to-end tests for multiple tools using Reactor/StepVerifier.
sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/OpenAPIToolTests.java Removes the older OpenAPI-only end-to-end test (superseded by consolidated tests).
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/WebSearchSync.java Renames/updates web search sync sample to use preview tool and Foundry env var names.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/WebSearchSample.java Removes prior WebSearch sample (replaced by WebSearchSync).
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/WebSearchAsync.java Renames/updates async web search sample; aligns naming and env vars.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/SharePointGroundingSync.java Renames SharePoint grounding sample class to SharePointGroundingSync.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/SharePointGroundingAsync.java Adds async SharePoint grounding sample using connection parameters.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/OpenApiWithConnectionSync.java Repurposes/renames sample to OpenAPI tool with project-connection auth (sync).
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/OpenApiWithConnectionAsync.java Adds OpenAPI tool with project-connection auth (async).
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/OpenApiSync.java Adds OpenAPI tool sample (sync) using bundled spec.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/OpenApiAsync.java Adds OpenAPI tool sample (async).
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/MemorySearchSync.java Adds memory store + memory search tool sample (sync).
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/MemorySearchAsync.java Adds memory store + memory search tool sample (async).
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/McpWithConnectionSync.java Adds MCP-with-project-connection sample (sync) including approval loop.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/McpWithConnectionAsync.java Adds MCP-with-project-connection sample (async) including approval loop.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/McpToolSample.java Removes old MCP sample (replaced by McpSync and connection-based samples).
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/McpSync.java Renames/updates MCP sync sample; adds approval flow and Foundry env vars.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/McpAsync.java Renames/updates MCP async sample; adds approval flow and Foundry env vars.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/ImageGenerationSync.java Renames image generation sample class to ImageGenerationSync.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/ImageGenerationAsync.java Adds async image generation sample.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/FunctionCallingSample.java Removes old function-calling sample (replaced by FunctionCallSync).
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/FunctionCallSync.java Renames/updates function-calling sync sample; uses BinaryData.fromObject schema.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/FunctionCallAsync.java Renames/updates function-calling async sample; uses BinaryData.fromObject schema.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/FileSearchSync.java Renames/updates file search sync sample; adds conversation usage and cleanup.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/FileSearchSample.java Removes old file search sample (replaced by FileSearchSync).
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/FileSearchAsync.java Adds async file search sample with vector store + conversation.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/FabricSync.java Renames Fabric sample class to FabricSync.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/FabricAsync.java Adds async Fabric tool sample.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/CustomCodeInterpreterSync.java Renames custom code interpreter sample class to CustomCodeInterpreterSync.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/CustomCodeInterpreterAsync.java Adds async custom code interpreter sample using MCP backing.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/CodeInterpreterSync.java Renames code interpreter sample class to CodeInterpreterSync and updates env vars.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/CodeInterpreterAsync.java Renames code interpreter async sample class to CodeInterpreterAsync and updates env vars.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/BrowserAutomationSync.java Renames browser automation sample class to BrowserAutomationSync.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/BrowserAutomationAsync.java Adds async browser automation tool sample.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/BingGroundingSync.java Renames Bing grounding sample class to BingGroundingSync.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/BingGroundingAsync.java Adds async Bing grounding tool sample.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/BingCustomSearchSync.java Adds Bing Custom Search tool sample (sync).
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/BingCustomSearchAsync.java Adds Bing Custom Search tool sample (async).
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/AzureFunctionSync.java Adds Azure Function tool sample (sync) using Storage Queue bindings.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/AzureFunctionAsync.java Adds Azure Function tool sample (async) using Storage Queue bindings.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/AzureAISearchSync.java Renames Azure AI Search sample class to AzureAISearchSync.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/AzureAISearchAsync.java Adds Azure AI Search sample (async).
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/AgentToAgentSync.java Renames Agent-to-Agent sample class to AgentToAgentSync.
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/AgentToAgentAsync.java Adds Agent-to-Agent sample (async).
sdk/ai/azure-ai-agents/assets.json Updates the assets tag to include new recordings/assets.
sdk/ai/azure-ai-agents/UPDATE_README_LINKS.md Adds a tracking document for README link updates post-merge.
sdk/ai/azure-ai-agents/README.md Adds expanded tool documentation sections and sample links.
sdk/ai/azure-ai-agents/CHANGELOG.md Documents new OpenAPI loading helper, samples, and test additions.

Copy link
Contributor

Copilot AI commented Mar 9, 2026

@jpalvarezl I've opened a new pull request, #48337, to work on those changes. Once the pull request is ready, I'll request review from you.

jpalvarezl and others added 3 commits March 9, 2026 13:34
…#48337)

* Initial plan

* Fix README links: update *Sample.java to *Sync.java

Co-authored-by: jpalvarezl <11056031+jpalvarezl@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jpalvarezl <11056031+jpalvarezl@users.noreply.github.com>
@jpalvarezl jpalvarezl disabled auto-merge March 9, 2026 14:51
@jpalvarezl jpalvarezl enabled auto-merge (squash) March 9, 2026 14:59
@jpalvarezl jpalvarezl merged commit 5794ba6 into main Mar 10, 2026
19 checks passed
@jpalvarezl jpalvarezl deleted the jpalvarezl/fix/sample_work_docs branch March 10, 2026 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants