Skip to content

Commit e7c2159

Browse files
authored
Merge pull request #78 from Azure-Samples/docs/refresh-markdown-files
docs: refresh markdown files with Durable Agents architecture
2 parents b7b6445 + 834383b commit e7c2159

File tree

4 files changed

+145
-82
lines changed

4 files changed

+145
-82
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@
66
*Features*
77
* ...
88

9+
## 2025-11-05
10+
11+
### Features
12+
* Durable Task Scheduler (DTS) integration for cloud orchestration and monitoring
13+
* DTS dashboard scripts for Bash and PowerShell (`scripts/get-dts-dashboard-url.sh`, `.ps1`)
14+
* APIM region fallback logic for BasicV2 SKU deployments
15+
* Major lab instructions overhaul (see `docs/lab-instructions.md`)
16+
17+
### Bug Fixes
18+
* Improved error handling in DTS dashboard scripts
19+
* Fixed image URLs in lab instructions to reference main branch
20+
21+
### Breaking Changes
22+
* Removed obsolete `docs/ignite-lab-instructions.md`
23+
924
*Bug Fixes*
1025
* ...
1126

LOCAL_DEVELOPMENT.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,23 @@ func start
2222

2323
**Dashboard URLs:**
2424

25-
- DTS Dashboard: <http://localhost:8082/>
26-
- Azurite Blob: <http://localhost:10000/>
25+
- **Local DTS Dashboard**: <http://localhost:8082/> - Monitor orchestrations running locally
26+
- **Azurite Blob**: <http://localhost:10000/>
27+
28+
**Monitoring Orchestrations:**
29+
30+
- **Local**: Open <http://localhost:8082/> to view orchestrations running against the local DTS emulator
31+
- **Cloud**: Generate the Azure DTS dashboard URL with the provided scripts:
32+
33+
```bash
34+
./scripts/get-dts-dashboard-url.sh
35+
```
36+
or
37+
```powershell
38+
.\scripts\get-dts-dashboard-url.ps1
39+
```
40+
41+
Then open the generated URL in your browser to view orchestrations running in Azure.
2742

2843
To stop the emulators:
2944

README.md

Lines changed: 53 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,15 @@ urlFragment: snippy
2727
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=Azure-Samples/snippy&machine=basicLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json)
2828
[![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/Azure-Samples/snippy)
2929

30-
Snippy is an **Azure Functions**based reference application that turns any function into an **MCP (Model Context Protocol) tool** consumable by GitHub Copilot Chat and other MCP‑aware clients. The sample implements a production‑style *codesnippet service* with AI‑powered analysis:
30+
Snippy is an **Azure Functions**-based reference application that demonstrates how to build **MCP (Model Context Protocol) tools** that integrate with AI assistants like GitHub Copilot. The sample implements an intelligent *code-snippet service* featuring:
3131

32-
* **Save snippets**persists code, metadata and OpenAI embeddings in **Cosmos DB DiskANN**
33-
* **Semantic retrieve**vector search over embeddings
34-
* **AI Agents**generate a **deep wiki** or language‑specific **code style guide** from stored snippets
35-
* **Durable fan‑out/fan‑in with Blueprints**[in experimental branch](https://github.com/Azure-Samples/snippy/tree/gk/durable-functions) for large‑scale processing
36-
* **Microsoft Fabric integration**[in gk/fabric branch](https://github.com/Azure-Samples/snippy/tree/gk/fabric) demonstrating how to build Agents with Fabric Data Agents
32+
* **MCP Tool Integration**expose Azure Functions as discoverable tools for AI assistants
33+
* **Durable Agents**create stateful AI agents using **Microsoft Agent Framework** with automatic state management
34+
* **Multi-Agent Orchestration**coordinate DeepWiki and CodeStyle agents using **Durable Task Scheduler**
35+
* **Vector Search** – semantic retrieval using **Cosmos DB DiskANN** with Azure OpenAI embeddings
36+
* **Monitoring & Observability**track orchestrations in real-time with DTS dashboard (local & cloud)
3737

38-
39-
The project ships with reproducible **azd** infrastructure, so `azd up` will stand up the entire stack – Functions, Cosmos DB, Azure OpenAI and Azure AI Agents – in a single command.
38+
The project ships with reproducible **azd** infrastructure, so `azd up` will stand up the entire stack – Functions, Cosmos DB, Azure OpenAI, and Durable Task Scheduler – in a single command.
4039

4140
> **Important Security Notice**
4241
> This repository is intended for learning and demonstration purposes. **Do not** deploy it to production without a thorough security review. At a minimum you should:
@@ -49,22 +48,33 @@ The project ships with reproducible **azd** infrastructure, so `azd up` will st
4948

5049
---
5150

51+
## Recent Updates
52+
53+
* **Durable Task Scheduler (DTS) integration** for cloud orchestration and monitoring
54+
* **DTS dashboard scripts**: Quickly generate monitoring URLs for Azure deployments (`scripts/get-dts-dashboard-url.sh` and `.ps1`)
55+
* **Multi-agent orchestration**: Coordinate DeepWiki and CodeStyle agents with Durable Functions
56+
* **Enhanced monitoring**: View orchestration state in local DTS emulator or Azure DTS dashboard
57+
58+
5259
## Features
5360

54-
* **Remote MCP trigger** – expose Functions as real‑time SSE tools
55-
* **AI‑assisted documentation** – "deep‑wiki" and "code‑style" agents create rich Markdown (Mermaid, diagrams, etc.)
56-
* **Vector search on Cosmos DB DiskANN** – low‑latency semantic retrieval
57-
* **One‑click deploy**`azd up` provisions and deploys code & infra
58-
* **Codespaces & Dev Containers** – fully configured dev environment in your browser or local VS Code
61+
* **MCP Tool Integration** – expose Azure Functions as discoverable MCP tools for AI assistants via SSE protocol
62+
* **Durable Agents with Microsoft Agent Framework** – build stateful AI agents using `ChatAgent` with automatic conversation history management
63+
* **Multi-Agent Orchestration** – coordinate specialized agents (DeepWiki, CodeStyle) using Durable Task Scheduler with fan-out/fan-in patterns
64+
* **Vector Search on Cosmos DB DiskANN** – semantic code retrieval using Azure OpenAI embeddings and low-latency vector indexing
65+
* **Monitoring & Observability** – track orchestrations in real-time using DTS dashboard (localhost:8082 local, Azure portal for cloud)
66+
* **One-click Deploy**`azd up` provisions and deploys complete infrastructure including Functions, Cosmos DB, Azure OpenAI, and DTS
67+
* **Codespaces & Dev Containers** – fully configured development environment in your browser or local VS Code
5968

6069
### Tool Matrix
6170

62-
| Tool Name | Purpose |
63-
| -------------- | ------------------------------------------------------------------- |
64-
| `save_snippet` | Save code snippets with vector embeddings for semantic search |
65-
| `get_snippet` | Retrieve previously saved code snippets by their unique name |
66-
| `code_style` | Generate language-specific code style guides from saved snippets |
67-
| `deep_wiki` | Create comprehensive wiki documentation by analyzing code snippets |
71+
| Tool Name | Purpose |
72+
| -------------------------------- | ------------------------------------------------------------------- |
73+
| `save_snippet` | Save code snippets with vector embeddings for semantic search |
74+
| `get_snippet` | Retrieve previously saved code snippets by their unique name |
75+
| `code_style` | Generate language-specific code style guides from saved snippets |
76+
| `deep_wiki` | Create comprehensive wiki documentation by analyzing code snippets |
77+
| `generate_comprehensive_documentation` | Orchestrate multi-agent workflow to produce deep wiki and style guide |
6878

6979
---
7080

@@ -198,33 +208,36 @@ docker compose up -d
198208
./scripts/generate-settings.sh
199209

200210
# Run the Functions app
201-
cd src
202-
func start
211+
```mermaid
212+
flowchart LR
213+
subgraph mcphosts["MCP Hosts & Clients (Your Computer)"]
214+
Host["Host (VS Code / IDE)"]
215+
Client["Client (GitHub Copilot)"]
216+
end
217+
Host --"MCP Protocol"--> Client
218+
Client --"Tool Discovery"--> FunctionApp["Function App (MCP Server)"]
219+
FunctionApp --"Orchestrate"--> DTS["Durable Task Scheduler"]
220+
DTS --"Agent Calls"--> Agents["Durable Agents<br/>DeepWiki · CodeStyle"]
221+
FunctionApp --"Vector Search"--> CosmosDB
222+
Agents --"Vector Search"--> CosmosDB
223+
FunctionApp --"Embeddings"--> OpenAI["Azure OpenAI"]
224+
Agents --"LLM Calls"--> OpenAI
225+
DTS --"Dashboard"--> User["Developer/Monitor"]
203226
```
204227

205-
**Available Dashboards:**
206-
207-
* **DTS Dashboard**: <http://localhost:8082/> - Monitor orchestration instances, view execution history
208-
* **Azurite**: Runs on ports 10000-10002 for Blob, Queue, and Table services
209-
210-
#### Without Docker
211-
212-
If Docker is not available, you can use native Azurite with Azure Storage backend:
228+
---
213229

214-
```bash
215-
# 1. Install Azurite globally
216-
npm install -g azurite
230+
## Monitoring & Orchestration
217231

218-
# 2. Switch to Azure Storage backend
219-
./scripts/switch-storage-backend.sh azureStorage
232+
* **Local development**: Monitor orchestrations at <http://localhost:8082/> when using the DTS emulator
233+
* **Azure deployment**: Use the DTS dashboard scripts to generate monitoring URLs:
234+
* Bash: `./scripts/get-dts-dashboard-url.sh`
235+
* PowerShell: `.\scripts\get-dts-dashboard-url.ps1`
236+
* View multi-agent orchestration execution, including DeepWiki and CodeStyle agent calls
237+
* Track tool invocations, state transitions, and execution timelines
220238

221-
# 3. Start Azurite in a separate terminal
222-
azurite
239+
---
223240

224-
# 4. Generate settings and run
225-
./scripts/generate-settings.sh
226-
cd src
227-
func start
228241
```
229242

230243
To switch back to DTS when Docker becomes available:
@@ -243,15 +256,6 @@ For detailed setup instructions and troubleshooting, see [LOCAL_DEVELOPMENT.md](
243256

244257
Azure OpenAI model support varies by region. Verify availability [here](https://learn.microsoft.com/azure/ai-services/openai/concepts/models#standard-deployment-model-availability) and choose the same region for all Azure resources. **eastus** and **swedencentral** are good default choices.
245258

246-
### Costs
247-
248-
Estimate monthly cost using the [Azure Pricing Calculator](https://azure.microsoft.com/pricing/calculator/). Major components:
249-
250-
* Azure Functions – Consumption / Flex tiers
251-
* Cosmos DB – Serverless or provisioned throughput
252-
* Azure OpenAI – pay‑as‑you‑go per 1K tokens
253-
* Azure AI Agents – per‑execution billing (preview)
254-
255259
### Security
256260

257261
Snippy uses User-Assigned Managed Identity for secure service-to-service authentication. The infrastructure is configured with:
@@ -269,15 +273,6 @@ For production deployments, we recommend:
269273

270274
---
271275

272-
## Resources
273-
274-
* Blog – *Build AI agent tools using Remote MCP with Azure Functions* ([https://aka.ms/snippy-blog](https://aka.ms/snippy-blog))
275-
* Model Context Protocol spec – [https://aka.ms/mcp](https://aka.ms/mcp)
276-
* Azure Functions Remote MCP docs – [https://aka.ms/azure-functions-mcp](https://aka.ms/azure-functions-mcp)
277-
* Develop Python apps for Azure AI – [https://learn.microsoft.com/azure/developer/python/azure-ai-for-python-developers](https://learn.microsoft.com/azure/developer/python/azure-ai-for-python-developers)
278-
279-
---
280-
281276
## Contributing
282277

283278
Standard **fork → branch → PR** workflow. Use *Conventional Commits* (`feat:`, `fix:`) in commit messages.

deep-wiki.md

Lines changed: 60 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
# Project Overview
22

3-
This project is centered around the MCP (Model Context Protocol) tools designed for use with Azure Functions and AI-powered operations. The tools enable seamless integration with Azure OpenAI, Cosmos DB, and AI Agents to manage and analyze code snippets. Key functionalities include document management, vector search, error handling, logging, and provisioned cloud infrastructure using Bicep templates.
3+
This project is centered around the MCP (Model Context Protocol) tools designed for use with Azure Functions and AI-powered operations. The tools enable seamless integration with Azure OpenAI, Cosmos DB, and AI Agents to manage and analyze code snippets. Key functionalities include document management, vector search, error handling, logging, provisioned cloud infrastructure using Bicep templates, and **multi-agent orchestration** with monitoring via the Durable Task Scheduler (DTS) dashboard.
4+
5+
Recent updates include:
6+
* Durable Task Scheduler integration for cloud orchestration
7+
* DTS dashboard scripts for monitoring orchestrations in Azure (`get-dts-dashboard-url.sh` and `.ps1`)
8+
* Multi-agent workflows coordinating DeepWiki and CodeStyle agents
49

510
## Major Concepts
611

712
### MCP Tools
813

9-
MCP tools automate operations related to code snippets using triggers that respond to Azure Function events. Tools such as `save_snippet`, `get_snippet`, `deep_wiki`, and `code_style` interact with various Azure services to provide a robust solution for code documentation and analysis.
14+
MCP tools automate operations related to code snippets using triggers that respond to Azure Function events. Tools such as `save_snippet`, `get_snippet`, `deep_wiki`, `code_style`, and `generate_comprehensive_documentation` interact with various Azure services to provide a robust solution for code documentation, analysis, and multi-agent orchestration.
1015

1116
### Azure Functions
1217

@@ -30,40 +35,73 @@ Azure Bicep is used to define infrastructure as code, setting up Azure resources
3035

3136
## Diagram Visualizations
3237

38+
### Orchestration Monitoring
39+
40+
Monitor orchestrations using the DTS dashboard:
41+
* **Local**: Open <http://localhost:8082/> when using the DTS emulator
42+
* **Azure**: Use the provided scripts (`get-dts-dashboard-url.sh` and `.ps1`) to generate the Azure dashboard URL
43+
3344
### System Architecture
3445

3546
```mermaid
3647
flowchart TB
3748
subgraph Azure Services
38-
AzureFunctions --Triggers--> MCPTools
39-
MCPTools --Stores--> CosmosDB
40-
MCPTools --Generates--> AzureOpenAI
41-
end
42-
43-
subgraph MCPTool Interaction
44-
SaveSnippet --Embeds--> AzureOpenAI
45-
GetSnippet --Reads--> CosmosDB
49+
AzureFunctions["Azure Functions<br/>(MCP Server)"]
50+
DTS["Durable Task Scheduler"]
51+
Agents["Durable Agents<br/>(DeepWiki · CodeStyle)"]
52+
MCPTools["MCP Tools<br/>(save_snippet, get_snippet, etc.)"]
53+
CosmosDB["Cosmos DB<br/>(Vector + Operational)"]
54+
AzureOpenAI["Azure OpenAI<br/>(Embeddings + LLM)"]
4655
end
4756
48-
AzureFunctions -.-> Logging
49-
Logging -.-> ErrorHandling
57+
AzureFunctions --> MCPTools
58+
MCPTools --"Orchestrate"--> DTS
59+
DTS --"Agent Calls"--> Agents
60+
MCPTools --"Store/Retrieve"--> CosmosDB
61+
MCPTools --"Embeddings"--> AzureOpenAI
62+
Agents --"Vector Search"--> CosmosDB
63+
Agents --"LLM Calls"--> AzureOpenAI
64+
AzureFunctions -.-> Logging["Logging & Monitoring"]
65+
Logging -.-> ErrorHandling["Error Handling"]
5066
```
5167

5268
### Data Flow
5369

5470
```mermaid
5571
sequenceDiagram
5672
participant User
57-
participant AzureFunctionApp
58-
participant AzureOpenAI
59-
participant CosmosDB
60-
61-
User->>AzureFunctionApp: Send Snippet
62-
AzureFunctionApp->>AzureOpenAI: Generate Embeddings
63-
AzureOpenAI-->>AzureFunctionApp: Return Embeddings
64-
AzureFunctionApp->>CosmosDB: Store Snippet & Embeddings
65-
CosmosDB-->>AzureFunctionApp: Success/Failure Response
66-
AzureFunctionApp-->>User: Notify Status
73+
participant Copilot as GitHub Copilot
74+
participant FunctionApp as Azure Functions<br/>(MCP Server)
75+
participant DTS as Durable Task Scheduler
76+
participant Agent as Durable Agent
77+
participant OpenAI as Azure OpenAI
78+
participant Cosmos as Cosmos DB
79+
80+
User->>Copilot: "Save this snippet"
81+
Copilot->>FunctionApp: MCP Tool: save_snippet
82+
FunctionApp->>OpenAI: Generate Embeddings
83+
OpenAI-->>FunctionApp: Return Embeddings
84+
FunctionApp->>Cosmos: Store Snippet & Embeddings
85+
Cosmos-->>FunctionApp: Success Response
86+
FunctionApp-->>Copilot: Confirmation
87+
Copilot-->>User: "Snippet saved"
88+
89+
User->>Copilot: "Generate documentation"
90+
Copilot->>FunctionApp: MCP Tool: generate_comprehensive_documentation
91+
FunctionApp->>DTS: Start Orchestration
92+
DTS->>Agent: Call DeepWikiAgent
93+
Agent->>Cosmos: Vector Search
94+
Cosmos-->>Agent: Relevant Snippets
95+
Agent->>OpenAI: Generate Documentation
96+
OpenAI-->>Agent: Documentation Content
97+
Agent-->>DTS: Return Result
98+
DTS->>Agent: Call CodeStyleAgent
99+
Agent->>OpenAI: Generate Style Guide
100+
OpenAI-->>Agent: Style Guide Content
101+
Agent-->>DTS: Return Result
102+
DTS-->>FunctionApp: Orchestration Complete
103+
FunctionApp-->>Copilot: Combined Results
104+
Copilot-->>User: Save to File
67105
```
68106

69107
## Snippet Catalog

0 commit comments

Comments
 (0)