The AI Agents Experience is a platform for creating, configuring, and extending custom AI agents which can access your apis, MCP tools, or orchestrate multiple agents. The solution utilizes Semantic Kernel to dynamically build agents and plugins based on the configuration the user desires.
The home page features:
- Sidebar showing available agents
- Main content area with a welcome message and sample chat interaction
- Feature highlights including Natural Conversations, Code Interpreter, File Processing, Custom Tools, Centralized Configuration, and Enterprise Security
The Weather Agent interface allows users to:
- Interact with the agent through natural language
- Ask weather-related questions (e.g., "What is the current weather in Orlando, FL?")
- View agent capabilities and model information
The settings page provides:
- General configuration options (website name, agent visibility)
- Model management for configuring AI models
- Agent management for creating, editing, and deleting agents
- Authentication settings
Requirements
-
Create an Azure Resource Group for this project (In the portal or CLI).
# Create a new resource group (eastus2, preferred) az group create --name aiagents-rg --location eastus2
-
Initialize the Azure Developer CLI
# locally, if you cloned the repo azd init # or # will clone the repo for you azd init --template adamhockemeyer/ai-agent-experience # Environment name: dev # Location: East US 2* # * For best AI Model compatibility (otherwise, edit the `main.parameters.json` file, and specify models that support the region you wish to deploy to)
-
Authenticate Azure Developer CLI
azd auth login [--tenant-id]
-
Run the following command to build, deploy & configure the sample
azd up
- File Upload
- Code interpreter (infra is done)
- Remote MCP Server (STIO currently implemented)
- Add AI Search Example
The --reload
flag seems to cause issues on Windows when trying to run MCP plugins. Remove the flag.
Remove --reload flag, for FastAPI
Azure App Configuration (we use it to store configuration data for the agents), as a 10KB limit for the value of a key. If you are trying to store a very large system prompt (i.e. >8,000 characters or so), its possible you will hit a limit on value being saved. Ideally break down agents into smaller units of work, and keep their prompts focused. If it is still an issue, you would need to consider storing the prompts elsewhere (hardcoded in code, or CosmosDB, or file for example).
To assign data permissions for Azure Cosmos DB to a principal ID, follow these steps:
-
Create a Role Definition: Use the Azure CLI to create a custom role definition for your Cosmos DB account. This role will define the permissions needed for accessing data.
-
Assign the Role to a Principal: Use the az cosmosdb sql role assignment create command to assign the role to a principal ID. Replace with the Object ID of the principal and with the ID of the role definition.
az cosmosdb sql role assignment create --resource-group "apichat-rg" --account-name "***" --role-definition-id "/subscriptions/******/resourceGroups/apichat-rg/providers/Microsoft.DocumentDB/databaseAccounts/******/sqlRoleDefinitions/00000000-0000-0000-0000-000000000002" --principal-id "******" --scope "/subscriptions/******/resourceGroups/apichat-rg/providers/Microsoft.DocumentDB/databaseAccounts/******"
- Validate Access: Ensure that the principal has the correct access by testing with application code using the Azure SDK.
For more detailed instructions, refer to the official documentation.
graph TB
User[π€ User] --> WebApp[π Web App<br/>Azure Container App]
WebApp --> AppConfig1[βοΈ App Configuration<br/>Website Config]
WebApp --> APIApp[π API App<br/>Azure Container App]
APIApp --> AppConfig2[βοΈ App Configuration<br/>Agent Configs]
APIApp --> AIAgentService[π€ Azure AI Agent Service<br/>Agent Orchestration]
APIApp --> APIM[π API Management<br/>OpenAI Load Balancer]
APIM --> Maps[πΊοΈ Azure Maps<br/>Weather Service]
APIM --> Functions[β‘ Azure Functions<br/>SAP Demo APIs]
APIM --> CognitiveServices[π§ Azure Cognitive Services<br/>OpenAI Models]
%% Position Cosmos DB next to Cognitive Services
CosmosDB[ποΈ Cosmos DB<br/>Chat Sessions]
%% Connect API App to Cosmos DB after positioning
APIApp --> CosmosDB
AIAgentService --> Search[π AI Search<br/>Document Processing]
AIAgentService --> Storage[π¦ Azure Storage<br/>Files & Documents]
AIAgentService --> CognitiveServices
AIAgentService --> CosmosDB
APIApp --> SessionPools[π Container App Sessions<br/>Code Interpreter]
APIApp --> KeyVault[π Azure Key Vault<br/>Secrets & Keys]
AppConfig2 --> AgentConfigs{Agent Configurations}
AgentConfigs --> Weather["π¦οΈ Weather Agent<br/>β’ Azure Maps Weather Service<br/>(OpenAPI)"]
AgentConfigs --> Playwright["π Playwright Agent<br/>β’ Playwright MCP<br/>(ModelContextProtocol)"]
AgentConfigs --> SAP["πΌ SAP Agent<br/>β’ SAP Data API<br/>(OpenAPI)"]
AgentConfigs --> Orchestrator["π― Orchestrator Agent<br/>β’ SAP Agent<br/>β’ Weather Agent<br/>(Agent Tools)"]
style WebApp fill:#e1f5fe
style APIApp fill:#f3e5f5
style AppConfig1 fill:#fff3e0
style AppConfig2 fill:#fff3e0
style APIM fill:#e8f5e8
style Maps fill:#e8f5e8
style Functions fill:#e8f5e8
style CognitiveServices fill:#fce4ec
style AIAgentService fill:#e8eaf6
style CosmosDB fill:#f1f8e9
style Search fill:#fff8e1
style Storage fill:#f3e5f5
style SessionPools fill:#e1f5fe
style KeyVault fill:#fce4ec
style Weather fill:#e3f2fd
style Playwright fill:#f3e5f5
style SAP fill:#fff3e0
style Orchestrator fill:#e8eaf6
%% Standalone services positioned at bottom - defined last to appear at bottom
ContainerRegistry[π¦ Azure Container Registry<br/>Container Images]
AppInsights[π Application Insights<br/>Monitoring & Telemetry]
style ContainerRegistry fill:#e8f5e8
style AppInsights fill:#fff8e1