This project demonstrates how to orchestrate multiple specialized AI agents inside a Microsoft Fabric notebook using the Semantic Kernel framework and Azure AI Agent Service. The system implements a decomposition and recomposition approach with:
- A Router Agent that analyzes user queries and delegates to specialized agents
- Multiple Domain Expert Agents that handle specific query aspects
- A Synthesis Agent that combines responses into a cohesive answer
The system follows this workflow:
- User submits a query to the Router Agent
- Router determines which specialist agents should handle different parts of the query
- Each specialist agent processes its assigned sub-query independently
- All responses are collected and sent to the Synthesis Agent
- The Synthesis Agent combines the information into a unified response
- Router Agent: Routes user queries to appropriate domain expert agents
- Synthesis Agent: Combines responses from multiple agents
- Domain Expert Agents:
- CustomerInfoAgent: Handles customer data queries using Fabric AI Skill
- MarketingAgent: Generates creative marketing content
- LoyaltyProgramsAgent: Provides information about Power Platform licensing via Azure AI Search
- ChitChatAgent: Handles general conversational queries
You need to create an Azure AI Foundry resource to deploy and manage your agents:
- Go to the Azure Portal
- Create a new "Azure AI Foundry" resource in your subscription
- Select an appropriate region and pricing tier
- Once deployed, navigate to the resource and create a new project
- Note the project connection string for configuration in your notebook
- Ensure you have the necessary quota for the models you plan to use (e.g., GPT-4o)
For detailed instructions, refer to the Azure AI Foundry documentation.
You need to create an application registration in your Azure tenant:
- Go to Azure Portal > "Azure Active Directory" > "App Registrations"
- Click "New registration"
- Provide a name for your application
- Select "Accounts in this organizational directory only" for supported account types
- Click "Register"
- From the overview page, note the Application (client) ID and Directory (tenant) ID
- Under "Certificates & secrets", create a new client secret and note the Value
- Assign appropriate permissions to access Azure AI and Microsoft Fabric resources
For detailed instructions, refer to the official documentation.
You need access to a Microsoft Fabric environment:
- Ensure you have a Fabric F64 capacity or higher
- Create a new workspace with Data Science persona enabled
- Set up proper permissions for all team members
Create an AI Skill in your Fabric environment:
- In your Fabric workspace, create a new AI Skill
- Configure the skill with appropriate data sources
- Test the skill to ensure it works correctly
- Note the AI Skill URL for programmatic access
For detailed instructions, follow the official guide on AI Skills in Fabric.
Set up an Azure AI Search Index for the LoyaltyProgramsAgent:
- Create an Azure AI Search service
- Create an index with Power Platform licensing information
- Connect your Fabric environment to the search service
- Note the index name for configuration
- In your Fabric workspace, create a new notebook
- Clone this repository or copy the code from
MultiAgentFabricDemo.ipynb - Update the environment variables in the first cell with your configuration values:
ENTRAID_TENANT_ID: Your Azure tenant IDENTRAID_CLIENT_ID: Your application client IDENTRAID_SECRET: Your application client secretAZUREAI_PROJECT_CONNECTION: Your AI Foundry project connection stringAZURE_AI_MODEL_NAME: The model to use (e.g., "gpt-4o")FABRIC_AI_SKILL_URL: Your Fabric AI Skill URLAZURE_AIASEARCH_INDEX_NAME: Your Azure AI Search index name
Run the installation cell to install dependencies:
%pip install semantic-kernel azure-ai-projects azure-identity- Run all notebook cells sequentially
- The system will create and configure all required agents
- Customize the
user_messagevariable to test different queries - The notebook will display:
- The routing agent's decision
- Individual responses from domain experts
- The final synthesized response
- Remember to run the cleanup cell at the end to delete created agents
user_message = "Could you give a me a list of 5 customers? And give me details about power platform licensing."- Ensure your Azure application has the necessary permissions to access Azure AI services
- The Fabric environment must have internet connectivity to reach Azure services
- The AI Skill must be properly configured to access customer data
- Large language models like GPT-4o may incur usage costs
- For production use, implement proper error handling and monitoring
- If agents fail to create, check your Azure credentials and permissions
- If the AI Skill returns no data, verify its configuration and accessibility
- If the AI Search tool fails, ensure your index is properly configured
- Check Fabric logs for any errors in the notebook execution
- If you receive quota errors, verify your Azure AI Foundry subscription limits
- MultiAgentFabricDemo.ipynb: Main implementation notebook
- README.md: Project documentation