This repo showcases a sample AI-enabled customer support application that leverages Semantic Kernel Agents boosted with:
- an improved
SelectionStrategy
that accounts for agents descriptions and available tools to provide a more accurate selection (including the reason for it for traceability). - nested orchestration via
Teams
andAgents
for more complex, hierarchical routing scenarios. - a special type of
Agent
namedPlannedTeam
, which can handle more complex, cross-agent asks turning them into a multi-step process automatically.
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.
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-quickstart
# 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
# - Azure OpenAI resource and group to use
cp .env.example .env
- Update
.env
with your Azure OpenAI resource endpoint - Ensure Docker is running.
- Init Dapr (once only):
dapr init
.
To 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.