Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
7c1cbc9
Update README title from '.NET SDK' to 'SDK Samples' (#1)
pontemonti Nov 5, 2025
d81af2c
Added CODEOWNERS and .gitignore files (#2)
pontemonti Nov 5, 2025
c3c1e74
Add .NET Semantic Kernel Sample Agent (#3)
pontemonti Nov 5, 2025
1d90369
Update License to MIT License (#4)
rahuldevikar761 Nov 5, 2025
39a239c
Added Python OpenAI sample (#5)
pontemonti Nov 5, 2025
6f236de
Add LangChain Sample (#7)
JesuTerraz Nov 5, 2025
4cbd949
Add Node.js Claude Sample Agent (#6)
pontemonti Nov 6, 2025
1c0b548
Fix Agent Notifs and update env (#8)
JesuTerraz Nov 6, 2025
ea11209
[Python][AgentFramework] Adding Python Agent Framework Sample (#9)
JesuTerraz Nov 6, 2025
9b124ba
Add TM (#11)
rahuldevikar761 Nov 7, 2025
e99aa17
Revise README for Agent 365 Sample Agent (#13)
pontemonti Nov 7, 2025
d221266
Add TM (#14)
rahuldevikar761 Nov 7, 2025
e733e9c
Update Agents SDK for LangChain Sample (#15)
JesuTerraz Nov 7, 2025
45fffa8
Adding Notifications on AF (#16)
mrunalhirve128 Nov 10, 2025
0b9adea
Add Copilot instructions for code review and validation (#21)
rahuldevikar761 Nov 11, 2025
db60215
Update Sample with API Change (#19)
JesuTerraz Nov 11, 2025
1b01b67
Adding Vercel AI SDK sample with claude model (#23)
dbezic Nov 11, 2025
7716ce5
Add n8n sample agent (#24)
rbrighenti Nov 12, 2025
75e3a7d
Correct example agent name to use correct casing in line with n8n (#26)
rbrighenti Nov 12, 2025
cadc62f
Introducing perplexity Sample Agent (#18)
aubreyquinn Nov 12, 2025
d521cf1
Add OpenAI Nodejs Sample (#28)
JesuTerraz Nov 12, 2025
fea98e1
Rename "Microsoft Agents A365" to "Microsoft Agent 365" in documentat…
Copilot Nov 12, 2025
51edfde
Add Devin Agent Sample (#22)
walterluna Nov 12, 2025
45854e9
Fix OpenAI JS ToolingManifest (#33)
JesuTerraz Nov 13, 2025
35b4a33
add updated nodejs claude implementation (#32)
msftairaamane Nov 13, 2025
224b2dc
Quickstart LangChain Agent (#25)
JesuTerraz Nov 13, 2025
2398b60
Introducing Playground notification handling in Perplexity agent (#34)
aubreyquinn Nov 13, 2025
000ff20
Add Cursor IDE Prompt Guide for Agent365 (#29)
shinsi-fathima-rahman Nov 13, 2025
348b4a9
Update samples to remove environment id from calls and settings (#10)
joratz Nov 13, 2025
6c78dbe
Fix formatting of 'Microsoft Agent365' to 'Microsoft Agent 365' (#39)
pontemonti Nov 13, 2025
292c85c
add quickstart claude agent before A365 extension (#42)
msftairaamane Nov 14, 2025
a5b3168
Update package.json description for clarity (#45)
pontemonti Nov 14, 2025
e8dccd5
Update devin agent sample (#48)
walterluna Nov 14, 2025
42e7d80
updating samples read me docs (#47)
abdulanu0 Nov 15, 2025
df4e892
Update Node.js OpenAI sample (#50)
pontemonti Nov 17, 2025
03f59e9
Introducing thinking indicator in Perplexity sample agent (#37)
aubreyquinn Nov 17, 2025
4112c7a
updating auth handler (#53)
abdulanu0 Nov 18, 2025
2430fd0
Update Python Agent Framework sample (#58)
pontemonti Nov 18, 2025
684a02c
Update Python OpenAI sample agent (#57)
pontemonti Nov 18, 2025
251c405
Introducing observability in Perplexity agent (#44)
aubreyquinn Nov 18, 2025
acc29c9
Add prompt injection defense to agent system prompt (#40)
efpiva Nov 18, 2025
8d931c9
Update Package References to Use npm Registry + Remove local preinsta…
JesuTerraz Nov 18, 2025
0971787
Add temporariy thumbnails to the related samples (#63)
Alive-Fish Nov 18, 2025
7bbfda7
Update .NET Semantic Kernel Sample Agent (#61)
pontemonti Nov 19, 2025
df82639
Update tooling manifest (#60)
pontemonti Nov 19, 2025
f473a8a
Introducing Microsoft Teams manifest file for Perplexity (#51)
aubreyquinn Nov 19, 2025
004f8a2
Add manifest template for n8n Sample (#49)
rbrighenti Nov 19, 2025
6dc7d20
Potential fix for code scanning alert no. 1: Workflow does not contai…
pontemonti Nov 19, 2025
9e8d76d
Add CI workflow for Node.js OpenAI sample agent (#65)
pontemonti Nov 19, 2025
ffaa2ea
Remove local reference in python samples (#62)
JesuTerraz Nov 19, 2025
132d1c3
Google ADK Sample with Tooling (#70)
JesuTerraz Nov 20, 2025
9794391
Updated formatting on readme file (#71)
aubreyquinn Nov 20, 2025
1611d2e
Perplexity: introducing the published agents-a365 packages (#72)
aubreyquinn Nov 20, 2025
c086ffc
Add Devin Agent's manifest sample (#52)
walterluna Nov 20, 2025
c44f444
reference public package dependencies (#64)
walterluna Nov 20, 2025
805f9ae
Perplexity: added telemetry markers to all paths in the code (#73)
aubreyquinn Nov 20, 2025
aa4c676
Updated the scope for messaging. (#78)
Reza-sh Nov 21, 2025
29c31bf
post public documentation changes (#80)
shinsi-fathima-rahman Nov 21, 2025
764ec3b
Adding points for the users who contributed towards code review & qua…
LavanyaK235 Nov 24, 2025
4083f53
Add Agent Framework and Semantic Kernel enhancements (#85)
MattB-msft Nov 25, 2025
7b293c3
Fix agentic user token retrieval for n8n Sample (#75)
rbrighenti Nov 26, 2025
0af6f5c
Add package-lock.json to .gitignore (#76)
pontemonti Dec 1, 2025
462149b
Delete nodejs/claude/quickstart-before/package-lock.json (#88)
pontemonti Dec 1, 2025
889e04f
Update activity for sample application
tirthdoshi009 Dec 1, 2025
1e660f6
Update activity for sample application
tirthdoshi009 Dec 1, 2025
fb91b81
Update python/agent-framework/sample-agent/host_agent_server.py
tirthdoshi009 Dec 1, 2025
d66f523
Update python/agent-framework/sample-agent/host_agent_server.py
tirthdoshi009 Dec 1, 2025
447ad69
Adding docker file to run the container
tirthdoshi009 Dec 3, 2025
a7ddfd7
Adding docker file to run the container
tirthdoshi009 Dec 3, 2025
739305f
Merge branch 'users/tirthdoshi/local-playground' of https://github.co…
tirthdoshi009 Dec 3, 2025
6c7b64f
Merge branch 'users/tirthdoshi/local-playground' of https://github.co…
tirthdoshi009 Dec 3, 2025
b424420
Add the generated workflow file
tirthdoshi009 Dec 3, 2025
7aedf72
Add the generated workflow file
tirthdoshi009 Dec 3, 2025
11e4b91
Dummy push for running
tirthdoshi009 Dec 3, 2025
147dac1
Dummy push for running
tirthdoshi009 Dec 3, 2025
5a25573
Automate RG as well
tirthdoshi009 Dec 3, 2025
6769aa0
Automate RG as well
tirthdoshi009 Dec 3, 2025
acb5b3d
Create a docker image
tirthdoshi009 Dec 3, 2025
99cba82
Create a docker image
tirthdoshi009 Dec 3, 2025
16a6f7a
Update directory structure
tirthdoshi009 Dec 3, 2025
910fa5a
Update directory structure
tirthdoshi009 Dec 3, 2025
ca7662d
Remove Docker Buildx setup to fix docker-compose context error
tirthdoshi009 Dec 3, 2025
e90a8c0
Remove Docker Buildx setup to fix docker-compose context error
tirthdoshi009 Dec 3, 2025
d8207dc
Remove Docker Buildx setup to fix docker-compose context error
tirthdoshi009 Dec 3, 2025
8f9364a
Remove Docker Buildx setup to fix docker-compose context error
tirthdoshi009 Dec 3, 2025
12b29e6
Check directory structure
tirthdoshi009 Dec 3, 2025
75fafb2
Check directory structure
tirthdoshi009 Dec 3, 2025
c970c26
Fix docker environment vars
tirthdoshi009 Dec 3, 2025
3e42674
Fix docker environment vars
tirthdoshi009 Dec 3, 2025
5e16ae4
Docker image build
tirthdoshi009 Dec 3, 2025
730d539
Docker image build
tirthdoshi009 Dec 3, 2025
714b7c6
Remove fixing environment vars and debug
tirthdoshi009 Dec 3, 2025
71f385d
Remove fixing environment vars and debug
tirthdoshi009 Dec 3, 2025
8aab1a5
ACR login simplified
tirthdoshi009 Dec 3, 2025
7af4c80
ACR login simplified
tirthdoshi009 Dec 3, 2025
1a333e4
Get tocken
tirthdoshi009 Dec 3, 2025
2263d77
Get tocken
tirthdoshi009 Dec 3, 2025
f2a1256
simplify workflow
tirthdoshi009 Dec 3, 2025
5de1417
simplify workflow
tirthdoshi009 Dec 3, 2025
80f6f1f
Fix docker context
tirthdoshi009 Dec 3, 2025
a0decdb
Fix docker context
tirthdoshi009 Dec 3, 2025
56ccfca
Add permissions
tirthdoshi009 Dec 3, 2025
8b343c5
Add permissions
tirthdoshi009 Dec 3, 2025
3d69c71
Add a debug step
tirthdoshi009 Dec 3, 2025
fb7b831
Add a debug step
tirthdoshi009 Dec 3, 2025
7009477
Build docker image, file path corrected
tirthdoshi009 Dec 3, 2025
e700d23
Build docker image, file path corrected
tirthdoshi009 Dec 3, 2025
dcb80b5
Update indent and remove reserved variable
tirthdoshi009 Dec 3, 2025
327f3c4
Update indent and remove reserved variable
tirthdoshi009 Dec 3, 2025
df325b9
Update syntax error
tirthdoshi009 Dec 3, 2025
e890c04
Update syntax error
tirthdoshi009 Dec 3, 2025
b8cde9b
Add optional Application Insights integration
tirthdoshi009 Dec 3, 2025
75084ac
Add optional Application Insights integration
tirthdoshi009 Dec 3, 2025
9b3dab9
Add container app logs viewing step to deployment workflow
tirthdoshi009 Dec 3, 2025
16c348c
Add container app logs viewing step to deployment workflow
tirthdoshi009 Dec 3, 2025
7f16967
Add complete environment configuration to workflow
tirthdoshi009 Dec 3, 2025
b261a8d
Add complete environment configuration to workflow
tirthdoshi009 Dec 3, 2025
70d4f03
Trigger workflow run
tirthdoshi009 Dec 3, 2025
d3ca65d
Trigger workflow run
tirthdoshi009 Dec 3, 2025
808d12b
Trigger workflow run
tirthdoshi009 Dec 11, 2025
003451b
Trigger workflow run
tirthdoshi009 Dec 11, 2025
a55f300
Trigger workflow run
tirthdoshi009 Dec 12, 2025
a18f5a9
Trigger workflow run
tirthdoshi009 Dec 12, 2025
272e2dd
Add a comment once deployed
tirthdoshi009 Jan 5, 2026
4109e8c
Resolve merge conflicts
tirthdoshi009 Jan 5, 2026
4c73ead
Update comment in PR
tirthdoshi009 Jan 5, 2026
daef7fa
Update previous comment instead of ccreating a new one
tirthdoshi009 Jan 5, 2026
f087043
Remove local branch within PR
tirthdoshi009 Jan 5, 2026
d4ddc70
Delete python/agent-framework/sample-agent/APPLICATION_INSIGHTS.md
tirthdoshi009 Jan 5, 2026
bbcd192
Remove workflow
tirthdoshi009 Jan 5, 2026
3e9688e
Merge branch 'users/tirthdoshi/local-playground' of https://github.co…
tirthdoshi009 Jan 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
277 changes: 277 additions & 0 deletions .github/workflows/docker-container-sampleagent-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,277 @@
name: Deploy Python Agent Framework to Azure Container Apps
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this has to be in .github workflow folders? This sounds like it's specific to agent framework. Shouldn't it be moved to sample agent folder?

Copy link
Contributor Author

@tirthdoshi009 tirthdoshi009 Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it is specific to the agent framework. Since it's a github actions workflow it needs to be under .github. That's the reason to keep the path :
image

So it will only run on those specific changes.


on:
push:
branches:
- users/tirthdoshi/local-playground
paths:
- 'python/agent-framework/sample-agent/**'
- '.github/workflows/docker-container-sampleagent-python.yml'
pull_request:
branches:
- main
paths:
- 'python/agent-framework/sample-agent/**'
- '.github/workflows/docker-container-sampleagent-python.yml'
workflow_dispatch:

permissions:
id-token: write # Required for OIDC authentication
contents: read
pull-requests: write # Required to comment on PRs

env:
AZURE_RESOURCE_GROUP: agent365-samples-rg
ACR_NAME: agent365samplesacr
CONTAINER_APP_NAME: agent-framework-python
CONTAINER_APP_ENV: agent365-env
IMAGE_NAME: agent-framework-python

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Azure Login with Service Principal
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Create Resource Group if needed
run: |
if ! az group exists --name ${{ env.AZURE_RESOURCE_GROUP }} --output tsv | grep -q true; then
echo "Creating Resource Group..."
az group create --name ${{ env.AZURE_RESOURCE_GROUP }} --location eastus
fi

- name: Create ACR if needed
run: |
if ! az acr show --name ${{ env.ACR_NAME }} &> /dev/null; then
echo "Creating ACR..."
az acr create \
--resource-group ${{ env.AZURE_RESOURCE_GROUP }} \
--name ${{ env.ACR_NAME }} \
--sku Basic \
--admin-enabled true
fi

- name: Login to Azure Container Registry
run: |
az acr login --name ${{ env.ACR_NAME }}

- name: Build Docker Image
run: |
docker build \
-t ${{ env.ACR_NAME }}.azurecr.io/${{ env.IMAGE_NAME }}:${{ github.sha }} \
-t ${{ env.ACR_NAME }}.azurecr.io/${{ env.IMAGE_NAME }}:latest \
-f python/agent-framework/sample-agent/Dockerfile \
python/agent-framework/sample-agent

- name: Push Docker Image to ACR
run: |
docker push ${{ env.ACR_NAME }}.azurecr.io/${{ env.IMAGE_NAME }}:${{ github.sha }}
docker push ${{ env.ACR_NAME }}.azurecr.io/${{ env.IMAGE_NAME }}:latest

- name: Create Container App Environment if needed
run: |
if ! az containerapp env show --name ${{ env.CONTAINER_APP_ENV }} --resource-group ${{ env.AZURE_RESOURCE_GROUP }} &> /dev/null; then
echo "Creating Container App Environment..."
az containerapp env create \
--name ${{ env.CONTAINER_APP_ENV }} \
--resource-group ${{ env.AZURE_RESOURCE_GROUP }} \
--location eastus
fi

- name: Deploy to Azure Container App
run: |
if az containerapp show --name ${{ env.CONTAINER_APP_NAME }} --resource-group ${{ env.AZURE_RESOURCE_GROUP }} &> /dev/null; then
echo "Updating existing Container App..."
az containerapp update \
--name ${{ env.CONTAINER_APP_NAME }} \
--resource-group ${{ env.AZURE_RESOURCE_GROUP }} \
--image ${{ env.ACR_NAME }}.azurecr.io/${{ env.IMAGE_NAME }}:${{ github.sha }} \
--set-env-vars \
PORT=3978 \
AZURE_OPENAI_ENDPOINT=${{ secrets.AZURE_OPENAI_ENDPOINT }} \
AZURE_OPENAI_DEPLOYMENT=${{ secrets.AZURE_OPENAI_DEPLOYMENT }} \
AZURE_OPENAI_API_VERSION=${{ secrets.AZURE_OPENAI_API_VERSION }} \
AZURE_OPENAI_API_KEY=${{ secrets.AZURE_OPENAI_API_KEY }} \
USE_AGENTIC_AUTH=true \
ENABLE_OBSERVABILITY=true \
ENABLE_OTEL=true \
ENABLE_SENSITIVE_DATA=true \
PYTHON_ENVIRONMENT=production \
ENABLE_APPLICATION_INSIGHTS=${{ secrets.ENABLE_APPLICATION_INSIGHTS || 'false' }} \
APPLICATIONINSIGHTS_CONNECTION_STRING=${{ secrets.APPLICATIONINSIGHTS_CONNECTION_STRING || '' }} \
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTID=${{ secrets.SERVICE_CONNECTION_CLIENT_ID }} \
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTSECRET=${{ secrets.SERVICE_CONNECTION_CLIENT_SECRET }} \
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__TENANTID=${{ secrets.SERVICE_CONNECTION_TENANT_ID }} \
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__SCOPES=${{ secrets.SERVICE_CONNECTION_SCOPES || 'https://graph.microsoft.com/.default' }} \
AGENTAPPLICATION__USERAUTHORIZATION__HANDLERS__AGENTIC__SETTINGS__TYPE=AgenticUserAuthorization \
AGENTAPPLICATION__USERAUTHORIZATION__HANDLERS__AGENTIC__SETTINGS__SCOPES=${{ secrets.AGENTIC_SCOPES || 'https://graph.microsoft.com/.default' }} \
AGENTAPPLICATION__USERAUTHORIZATION__HANDLERS__AGENTIC__SETTINGS__ALTERNATEBLUEPRINTCONNECTIONNAME=${{ secrets.AGENTIC_CONNECTION_NAME || 'https://graph.microsoft.com/.default' }} \
CONNECTIONSMAP_0_SERVICEURL='*' \
CONNECTIONSMAP_0_CONNECTION=SERVICE_CONNECTION
else
echo "Creating new Container App..."
az containerapp create \
--name ${{ env.CONTAINER_APP_NAME }} \
--resource-group ${{ env.AZURE_RESOURCE_GROUP }} \
--environment ${{ env.CONTAINER_APP_ENV }} \
--image ${{ env.ACR_NAME }}.azurecr.io/${{ env.IMAGE_NAME }}:${{ github.sha }} \
--registry-server ${{ env.ACR_NAME }}.azurecr.io \
--target-port 3978 \
--ingress external \
--min-replicas 1 \
--max-replicas 3 \
--cpu 0.5 \
--memory 1.0Gi \
--env-vars \
PORT=3978 \
AZURE_OPENAI_ENDPOINT=${{ secrets.AZURE_OPENAI_ENDPOINT }} \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if someone wants to use some other llm?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point Rahul. The purpose of this workflow is help users test their changes without having to deploy any models. That's the reason of defaulting to one.

If one wants to use another model, the best way is locally running in that case.

AZURE_OPENAI_DEPLOYMENT=${{ secrets.AZURE_OPENAI_DEPLOYMENT }} \
AZURE_OPENAI_API_VERSION=${{ secrets.AZURE_OPENAI_API_VERSION }} \
AZURE_OPENAI_API_KEY=${{ secrets.AZURE_OPENAI_API_KEY }} \
USE_AGENTIC_AUTH=true \
ENABLE_OBSERVABILITY=true \
ENABLE_OTEL=true \
ENABLE_SENSITIVE_DATA=true \
PYTHON_ENVIRONMENT=production \
ENABLE_APPLICATION_INSIGHTS=${{ secrets.ENABLE_APPLICATION_INSIGHTS || 'false' }} \
APPLICATIONINSIGHTS_CONNECTION_STRING=${{ secrets.APPLICATIONINSIGHTS_CONNECTION_STRING || '' }} \
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTID=${{ secrets.SERVICE_CONNECTION_CLIENT_ID }} \
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTSECRET=${{ secrets.SERVICE_CONNECTION_CLIENT_SECRET }} \
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__TENANTID=${{ secrets.SERVICE_CONNECTION_TENANT_ID }} \
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__SCOPES=${{ secrets.SERVICE_CONNECTION_SCOPES || 'https://graph.microsoft.com/.default' }} \
AGENTAPPLICATION__USERAUTHORIZATION__HANDLERS__AGENTIC__SETTINGS__TYPE=AgenticUserAuthorization \
AGENTAPPLICATION__USERAUTHORIZATION__HANDLERS__AGENTIC__SETTINGS__SCOPES=${{ secrets.AGENTIC_SCOPES || 'https://graph.microsoft.com/.default' }} \
AGENTAPPLICATION__USERAUTHORIZATION__HANDLERS__AGENTIC__SETTINGS__ALTERNATEBLUEPRINTCONNECTIONNAME=${{ secrets.AGENTIC_CONNECTION_NAME || 'https://graph.microsoft.com/.default' }} \
CONNECTIONSMAP_0_SERVICEURL='*' \
CONNECTIONSMAP_0_CONNECTION=SERVICE_CONNECTION
fi

- name: Get Container App URL
id: get-url
run: |
FQDN=$(az containerapp show \
--name ${{ env.CONTAINER_APP_NAME }} \
--resource-group ${{ env.AZURE_RESOURCE_GROUP }} \
--query properties.configuration.ingress.fqdn \
--output tsv)
echo "🚀 Container App deployed successfully!"
echo "🌐 URL: https://$FQDN"
echo "📍 Health: https://$FQDN/api/health"
echo "📨 Messages: https://$FQDN/api/messages"
echo "app_url=https://$FQDN" >> $GITHUB_OUTPUT
echo "health_url=https://$FQDN/api/health" >> $GITHUB_OUTPUT
echo "messages_url=https://$FQDN/api/messages" >> $GITHUB_OUTPUT

- name: View Container App Logs
run: |
echo "📋 Fetching recent logs..."
az containerapp logs show \
--name ${{ env.CONTAINER_APP_NAME }} \
--resource-group ${{ env.AZURE_RESOURCE_GROUP }} \
--tail 50 \
--follow false

- name: Comment on PR with Deployment URL
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not fully following the this yml. Is the expectation to deploy this sample from this repo itself? What is the use case and business need? What if someone wants to use non-azure infrastructure?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah apologies, I might have not specified the context. We are working on an AI first project that needs verification of the packages. For example, if copilot makes any changes to the sdk, we want to ensure that the changes don't really affect the execution of the sdk.

This workflow helps to verify that the changes are deployed and verified correctly.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, I don't think this is a right approach to validate the SDK. There is an entire E2E integration test feature being built right now that deploys the samples to the resource group and test different areas. In your case, you are just checking if the app is healthy or not, but that does not guarantee if the application components where changes were made is correct. Besides that, you are exposing the secrets in the pipeline in OSS, which any PR can expose secrets to outside world(obviously they will fork, but still there are number of reason we should avoid secrets in pipeline)

if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const appUrl = '${{ steps.get-url.outputs.app_url }}';
const healthUrl = '${{ steps.get-url.outputs.health_url }}';
const messagesUrl = '${{ steps.get-url.outputs.messages_url }}';
const sha = '${{ github.sha }}';

const body = `## 🚀 Deployment Successful!

Your Python Agent Framework has been deployed to Azure Container Apps.

### 🔗 Deployment Links
- **App URL**: ${appUrl}
- **Health Endpoint**: ${healthUrl}
- **Messages Endpoint**: ${messagesUrl}

### 📦 Deployment Details
- **Container App**: \`${{ env.CONTAINER_APP_NAME }}\`
- **Resource Group**: \`${{ env.AZURE_RESOURCE_GROUP }}\`
- **Image Tag**: \`${sha.substring(0, 7)}\`
- **Commit**: ${sha}

### 🧪 Testing with Agents Playground

#### Option 1: Direct Testing (Simple)
\`\`\`bash
# Check health
curl ${healthUrl}

# Send a test message (requires authentication)
curl -X POST ${messagesUrl} \\
-H "Content-Type: application/json" \\
-d '{"type":"message","text":"Hello Agent!"}'
\`\`\`

#### Option 2: Test with Agents Playground (Interactive)

1. **Install and authenticate ngrok:**
\`\`\`bash
# Download ngrok from https://ngrok.com/download
# Authenticate with your token
ngrok authtoken YOUR_NGROK_TOKEN
\`\`\`

2. **Start ngrok tunnel:**
\`\`\`bash
ngrok http 2000
\`\`\`
Copy the HTTPS forwarding URL (e.g., \`https://abc123.ngrok.io\`)

3. **Launch Agents Playground:**
\`\`\`bash
agentsplayground -p 2000 -e ${messagesUrl} --su 'YOUR_NGROK_URL/_connector'
\`\`\`

Replace \`YOUR_NGROK_URL\` with the ngrok URL from step 2.

4. **Test your agent** in the playground UI at http://localhost:2000

---
*Deployed from commit ${sha.substring(0, 7)} by @${{ github.actor }}*`;

// Find existing comment from this bot
const comments = await github.rest.issues.listComments({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
});

const botComment = comments.data.find(comment =>
comment.user.type === 'Bot' &&
comment.body.includes('🚀 Deployment Successful!')
);

if (botComment) {
// Update existing comment
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: botComment.id,
body: body
});
console.log('Updated existing comment');
} else {
// Create new comment
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
});
console.log('Created new comment');
}

6 changes: 6 additions & 0 deletions python/agent-framework/sample-agent/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ PYTHON_ENVIRONMENT=development
# Enable otel logs on AgentFramework SDK. Required for auto instrumentation
ENABLE_OTEL=true
ENABLE_SENSITIVE_DATA=true

# Application Insights Configuration (Optional)
# Set to true to enable Application Insights telemetry
ENABLE_APPLICATION_INSIGHTS=false
# Your Application Insights connection string (required if enabled)
APPLICATIONINSIGHTS_CONNECTION_STRING=
26 changes: 26 additions & 0 deletions python/agent-framework/sample-agent/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Use Python 3.11 full Debian image
FROM python:3.11

# Set working directory
WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*

# Copy project files
COPY pyproject.toml ./
COPY *.py ./
COPY .env* ./

# Install uv
RUN pip install --no-cache-dir uv

# Install dependencies
RUN uv pip install --system --pre -e .

EXPOSE 3978
ENV PORT=3978

CMD ["python", "start_with_generic_host.py"]
13 changes: 13 additions & 0 deletions python/agent-framework/sample-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This sample demonstrates how to build an agent using Agent Framework in Python with the Microsoft Agent 365 SDK. It covers:

- **Observability**: End-to-end tracing, caching, and monitoring for agent applications
- **Application Insights**: Optional integration with Azure Application Insights for production monitoring
- **Notifications**: Services and models for managing user notifications
- **Tools**: Model Context Protocol tools for building advanced agent solutions
- **Hosting Patterns**: Hosting with Microsoft 365 Agents SDK
Expand All @@ -11,6 +12,18 @@ This sample uses the [Microsoft Agent 365 SDK for Python](https://github.com/mic

For comprehensive documentation and guidance on building agents with the Microsoft Agent 365 SDK, including how to add tooling, observability, and notifications, visit the [Microsoft Agent 365 Developer Documentation](https://learn.microsoft.com/en-us/microsoft-agent-365/developer/).

## Optional Features

### Application Insights Integration

This sample includes optional Application Insights integration for production monitoring and telemetry. Application Insights provides:
- Distributed tracing and performance monitoring
- Exception tracking and diagnostics
- Live metrics and real-time monitoring
- Custom metrics and events

**To enable Application Insights**, see the [Application Insights Integration Guide](APPLICATION_INSIGHTS.md) for detailed setup instructions.

## Prerequisites

- Python 3.x
Expand Down
Loading
Loading