Important
We are consolidating all Semantic Kernel advanced usage samples into a single repository. This repository will be archived in the future.
This repo showcases a sample AI-enabled customer support application that leverages Semantic Kernel Agents boosted with:
- an improved
SelectionStrategythat accounts for agents descriptions and available tools to provide a more accurate selection (including the reason for it for traceability). - nested orchestration via
TeamsandAgentsfor more complex, hierarchical routing scenarios. - a special type of
AgentnamedPlannedTeam, which can handle more complex, cross-agent asks turning them into a multi-step process automatically. - improved telemetry and explainability via Application Insights to track agentic team steps and results, as well as the reasoning behind agent selection.
Additionally, the application leverages Azure Container Apps and Dapr to enable the Virtual Actor pattern for agentic teams and natively handle ChatHistory persistence via Dapr's state store, ensuring that the application can scale seamlessly.
In this case, the user asks a question that requires the involvement of multiple agents, which are able to collaborate and produce a composite answer.
See official documentation for more details.
The overall architecture involves Dapr to enable the Virtual Actor pattern, in order to host the agentic team and natively handle ChatHistory persistence via Dapr's state store.
flowchart TD
%% User and client
U[User]
CB[Browser / Client]
U --> CB
%% Container Apps (Dapr enabled)
subgraph "Azure Container Apps"
Chat["`Chat App<br/>(Dapr enabled)<br/>[src/chat]`"]
Agents["`Agents App<br/>(Dapr enabled)<br/>[src/agents]`"]
end
CB --> Chat
%% Dapr sidecars within container apps
Chat -- "Dapr Sidecar" --> DS1["`Dapr: state store<br/>(in-memory / Cosmos DB)`"]
Agents -- "Dapr Sidecar" --> DS2[Dapr Components]
%% Communication Flow
Chat --- Agents
Agents --- Chat
%% Azure Services and Infrastructure
subgraph "Azure Resources"
ACR["`Azure Container Registry<br/>[infra/acr.bicep]`"]
AI["`Application Insights<br/>[infra/appin.bicep]`"]
LA["`Log Analytics<br/>[infra/appin.bicep]`"]
OAI["`Azure OpenAI<br/>[infra/openAI.bicep]`"]
Cosmos["`Cosmos DB<br/>[infra/cosmos.bicep]`"]
UAMI["`User Assigned Identity<br/>[infra/uami.bicep]`"]
end
%% Deployment orchestration via Azure Developer CLI
ADCLI["`Azure Developer CLI<br/>(azd)`"]
ADCLI --> ACR
ADCLI --> AI
ADCLI --> LA
ADCLI --> OAI
ADCLI --> Cosmos
ADCLI --> UAMI
%% Container App image source
ACR --> Chat
ACR --> Agents
%% Monitoring and Telemetry
Chat --> AI
Agents --> AI
AI --> LA
%% Data persistence via Dapr state store
DS1 --> Cosmos
%% Semantic Kernel
SK["`Semantic Kernel<br/>(LLM Processing)`"]
Agents --> SK
SK --- Agents
- Python 3.12+
- Azure Developer CLI – To deploy and manage Azure resources.
- Docker and Dapr CLI – To run the application locally.
git clone https://github.com/Azure-Samples/mas-sk-quickstart
cd mas-sk-quickstartNote
Script will NOT create a new Azure OpenAI resource. You will need to have an existing one with a deployed model.
# Login to Azure if required
azd auth login --tenant-id <TENANT>.onmicrosoft.com
azd up
# When prompted, select
# - Azure subscription to deploy to
# - Azure region to deploy to
# - EXISTING Azure OpenAI resource and group to use (azd will NOT create a new one)Tip
If you deployed the application to Azure, you can run it locally using the same Azure resources.
Simply copy the .env file from the .azure/<env name> folder to the root of the repo.
cp .env.example .env- Update
.envwith your Azure OpenAI resource endpoint. - Ensure Docker is running.
- Init Dapr (once only):
dapr init. - Setup Python environment and install dependencies:
python -m venv .venv
# On macOS/Linux:
source .venv/bin/activate
# On Windows:
.venv\Scripts\Activate.ps1
pip install -r src/chat/requirements.txt
pip install -r src/agents/requirements.txtTo run:
dapr run -f dapr.yaml
This project welcomes contributions and suggestions. Please see CONTRIBUTING.md for details.
This project is licensed under the MIT License. See LICENSE.md for details.



