Sample consolidation and Tool tests#48317
Merged
jpalvarezl merged 23 commits intomainfrom Mar 10, 2026
Merged
Conversation
- 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
Contributor
There was a problem hiding this comment.
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. |
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/MemorySearchAsync.java
Show resolved
Hide resolved
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/OpenApiAsync.java
Outdated
Show resolved
Hide resolved
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/McpWithConnectionAsync.java
Outdated
Show resolved
Hide resolved
sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ToolsAsyncTests.java
Outdated
Show resolved
Hide resolved
sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ToolsAsyncTests.java
Outdated
Show resolved
Hide resolved
sdk/ai/azure-ai-agents/src/samples/java/com/azure/ai/agents/tools/McpWithConnectionSync.java
Outdated
Show resolved
Hide resolved
Contributor
|
@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. |
…#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>
kaylieee
approved these changes
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
AgentToAgentAsync.javaandAzureAISearchAsync.java, demonstrating how to use these tools with the async client. [1] [2]AgentToAgentSample.java→AgentToAgentSync.javaandAzureAISearchSample.java→AzureAISearchSync.java. [1] [2]Documentation improvements:
README.mdwith detailed sections for both built-in and connection-based tools, including code snippets and sample links for each tool.UPDATE_README_LINKS.mdto track pending sample link updates, reflecting file renames and new samples that will be added after merging.SDK and test enhancements:
readSpecFromFile(Path)toOpenApiFunctionDefinitionfor 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:
assets.jsonto reflect new sample and tool additions.