Skip to content

Conversation

Copy link

Copilot AI commented May 28, 2025

This PR implements the ability to use Azure AI Agents for all agent roles in the creative writer application, rather than just for the Researcher role in the current implementation.

Changes Made

  • Added a UseAzureAIAgents configuration flag in appsettings.json that can be set to true to use Azure AI Agents for all roles or false (default) to keep the current implementation
  • Implemented conditional creation of Azure AI Agents based on the configuration:
    • When UseAzureAIAgents is true, all agents (Researcher, Marketing, Writer, Editor) are created as Azure AI Agents
    • When UseAzureAIAgents is false, only Researcher is an Azure AI Agent, others use ChatCompletionAgent (the default behavior)
  • Created a new AzureAISearchToolDefinition class to enable Azure AI Search capabilities for Azure AI Agents
  • Updated CreativeWriterSession to work with different agent types
  • Added Azure AI Search connection to the AI Hub in the Bicep template to properly integrate Azure AI Search with Azure AI Agents

Benefits

  • Provides a secondary configuration option for using Azure AI Agents throughout the application
  • Leverages out-of-the-box features of Azure AI Agents for both:
    • Bing Search (already implemented for the Researcher role)
    • Azure AI Search (new addition for the Marketing role)
  • Maintains backward compatibility by defaulting to the current implementation

How to Test

  1. Run the application with default settings to verify the original behavior still works (only Researcher as Azure AI Agent)
  2. Change UseAzureAIAgents to true in configuration and verify that all agents are created as Azure AI Agents and function correctly
  3. Test the Azure AI Search capability via the Marketing agent when Azure AI Agents are enabled

Fixes #2.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: RicardoNiepel <7172277+RicardoNiepel@users.noreply.github.com>
Copilot AI changed the title [WIP] [FEATURE] Usage of Azure AI Agents as secondary option Add Azure AI Agents as a secondary option for all agent roles May 28, 2025
Copilot AI requested a review from RicardoNiepel May 28, 2025 14:32
@RicardoNiepel
Copy link
Collaborator

@copilot I saw that you were unable to build the project because it requires .NET 9.0, which is not available in the current environment. Please install it in the environment and ensure it builds successfully.

Co-authored-by: RicardoNiepel <7172277+RicardoNiepel@users.noreply.github.com>
Copy link
Author

Copilot AI commented May 28, 2025

@copilot I saw that you were unable to build the project because it requires .NET 9.0, which is not available in the current environment. Please install it in the environment and ensure it builds succ...

I've installed .NET 9.0.300 in the environment and fixed several issues with the CreativeWriterSession.cs file to properly handle both Azure AI Agents and ChatCompletionAgent types. The project now builds successfully with the added Azure AI Search tool definition and proper agent integration. All changes have been committed in 3f86363.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: curl -I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 REDACTED (dns block)
  • cdn.fwupd.org
    • Triggering command: /usr/bin/fwupdmgr refresh (dns block)
  • crl.usertrust.com
    • Triggering command: dotnet build (dns block)
  • ocsp.usertrust.com
    • Triggering command: dotnet build (dns block)
  • www.microsoft.com
    • Triggering command: dotnet build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Usage of Azure AI Agents as secondary option

2 participants