Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
908a087
Merge pull request #248 from microsoft/dev
Roopan-Microsoft Oct 29, 2025
9e22f06
Merge pull request #256 from microsoft/dev
Roopan-Microsoft Nov 3, 2025
5f6297f
Merge pull request #259 from microsoft/dev
Prajwal-Microsoft Nov 10, 2025
155762a
Add disclaimer for AI solutions and compliance
Thanusree-Microsoft Nov 14, 2025
8e9278a
Merge pull request #263 from microsoft/psl-disclaimer-cm
Roopan-Microsoft Nov 14, 2025
4e31278
Remove disclaimer from README
Harmanpreet-Microsoft Nov 14, 2025
a1870b0
Merge pull request #264 from microsoft/psl-removedisclaimer
Roopan-Microsoft Nov 14, 2025
a8be5a6
Add disclaimer for AI solutions in README
Harmanpreet-Microsoft Nov 14, 2025
89307d2
Merge pull request #265 from microsoft/psl-disclaimer
Roopan-Microsoft Nov 14, 2025
dd45d5b
Update README.md
Roopan-Microsoft Nov 14, 2025
88c3fbe
Merge pull request #266 from microsoft/psl-disclaimer
Roopan-Microsoft Nov 14, 2025
ea3bfb4
Change 'Disclaimer' to 'Note' in README.md
Roopan-Microsoft Nov 14, 2025
0ae6f8e
Merge pull request #267 from microsoft/psl-disclaimer
Roopan-Microsoft Nov 14, 2025
4fef314
Updated the code owners
Prekshith-Microsoft Nov 24, 2025
cbcc57d
Merge pull request #274 from microsoft/dev
Roopan-Microsoft Nov 24, 2025
fbdc0d8
Merge pull request #275 from microsoft/psl-newcodeowner
Prajwal-Microsoft Nov 24, 2025
f074845
Add initial files for VS Code web integration
Harsh-Microsoft Nov 25, 2025
828484f
Fix formatting by adding missing newline at end of file in code samples
Harsh-Microsoft Nov 25, 2025
79091de
chore: Add initial files for VS Code web integration
Avijit-Microsoft Nov 25, 2025
309ea99
Add deployment instructions for VS Code Web and include initializatio…
Harsh-Microsoft Nov 27, 2025
5c73539
Add link to open in Visual Studio Code Web in Deployment Guide
Harsh-Microsoft Nov 27, 2025
000b0ae
docs: Add deployment instructions for VS Code Web
Avijit-Microsoft Nov 27, 2025
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in the repo.
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @aniaroramsft @marktayl1 @Vinay-Microsoft
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @aniaroramsft @marktayl1 @Vinay-Microsoft @toherman-msft @nchandhi
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ The Modernize your code solution accelerator allows users to specify a group of
</div>
<br/>

**Note:** With any AI solutions you create using these templates, you are responsible for assessing all associated risks and for complying with all applicable laws and safety standards. Learn more in the transparency documents for [Agent Service](https://learn.microsoft.com/en-us/azure/ai-foundry/responsible-ai/agents/transparency-note) and [Agent Framework](https://github.com/microsoft/agent-framework/blob/main/TRANSPARENCY_FAQ.md).
<br/>

<h2><img src="./docs/images/read_me/solution-overview.png" width="48" />
Solution overview
</h2>
Expand Down Expand Up @@ -80,8 +83,8 @@ Follow the quick deploy steps on the deployment guide to deploy this solution to
[Click here to launch the deployment guide](./docs/DeploymentGuide.md)
<br/><br/>

| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Modernize-your-Code-Solution-Accelerator) | [![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/microsoft/Modernize-your-Code-Solution-Accelerator) |
|---|---|
| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Modernize-your-Code-Solution-Accelerator) | [![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/microsoft/Modernize-your-Code-Solution-Accelerator) | [![Open in Visual Studio Code Web](https://img.shields.io/static/v1?style=for-the-badge&label=Visual%20Studio%20Code%20(Web)&message=Open&color=blue&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/azure/?vscode-azure-exp=foundry&agentPayload=eyJiYXNlVXJsIjogImh0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9taWNyb3NvZnQvTW9kZXJuaXplLXlvdXItY29kZS1zb2x1dGlvbi1hY2NlbGVyYXRvci9yZWZzL2hlYWRzL21haW4vaW5mcmEvdnNjb2RlX3dlYiIsICJpbmRleFVybCI6ICIvaW5kZXguanNvbiIsICJ2YXJpYWJsZXMiOiB7ImFnZW50SWQiOiAiIiwgImNvbm5lY3Rpb25TdHJpbmciOiAiIiwgInRocmVhZElkIjogIiIsICJ1c2VyTWVzc2FnZSI6ICIiLCAicGxheWdyb3VuZE5hbWUiOiAiIiwgImxvY2F0aW9uIjogIiIsICJzdWJzY3JpcHRpb25JZCI6ICIiLCAicmVzb3VyY2VJZCI6ICIiLCAicHJvamVjdFJlc291cmNlSWQiOiAiIiwgImVuZHBvaW50IjogIiJ9LCAiY29kZVJvdXRlIjogWyJhaS1wcm9qZWN0cy1zZGsiLCAicHl0aG9uIiwgImRlZmF1bHQtYXp1cmUtYXV0aCIsICJlbmRwb2ludCJdfQ==) |
|---|---|---|

<br/>

Expand Down
22 changes: 20 additions & 2 deletions docs/DeploymentGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ For **production deployments**, the repository also provides [`main.waf.paramete

Pick from the options below to see step-by-step instructions for: GitHub Codespaces, VS Code Dev Containers, Local Environments, and Bicep deployments.

| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Modernize-your-Code-Solution-Accelerator) | [![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/microsoft/Modernize-your-Code-Solution-Accelerator) |
|---|---|
| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Modernize-your-Code-Solution-Accelerator) | [![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/microsoft/Modernize-your-Code-Solution-Accelerator) | [![Open in Visual Studio Code Web](https://img.shields.io/static/v1?style=for-the-badge&label=Visual%20Studio%20Code%20(Web)&message=Open&color=blue&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/azure/?vscode-azure-exp=foundry&agentPayload=eyJiYXNlVXJsIjogImh0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9taWNyb3NvZnQvTW9kZXJuaXplLXlvdXItY29kZS1zb2x1dGlvbi1hY2NlbGVyYXRvci9yZWZzL2hlYWRzL21haW4vaW5mcmEvdnNjb2RlX3dlYiIsICJpbmRleFVybCI6ICIvaW5kZXguanNvbiIsICJ2YXJpYWJsZXMiOiB7ImFnZW50SWQiOiAiIiwgImNvbm5lY3Rpb25TdHJpbmciOiAiIiwgInRocmVhZElkIjogIiIsICJ1c2VyTWVzc2FnZSI6ICIiLCAicGxheWdyb3VuZE5hbWUiOiAiIiwgImxvY2F0aW9uIjogIiIsICJzdWJzY3JpcHRpb25JZCI6ICIiLCAicmVzb3VyY2VJZCI6ICIiLCAicHJvamVjdFJlc291cmNlSWQiOiAiIiwgImVuZHBvaW50IjogIiJ9LCAiY29kZVJvdXRlIjogWyJhaS1wcm9qZWN0cy1zZGsiLCAicHl0aG9uIiwgImRlZmF1bHQtYXp1cmUtYXV0aCIsICJlbmRwb2ludCJdfQ==) |
|---|---|---|

<details>
<summary><b>Deploy in GitHub Codespaces</b></summary>
Expand Down Expand Up @@ -89,6 +89,24 @@ You can run this solution in VS Code Dev Containers, which will open the project

</details>

<details>
<summary><b>Deploy in VS Code Web</b></summary>

### VS Code Web

[![Open in Visual Studio Code Web](https://img.shields.io/static/v1?style=for-the-badge&label=Visual%20Studio%20Code%20(Web)&message=Open&color=blue&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/azure/?vscode-azure-exp=foundry&agentPayload=eyJiYXNlVXJsIjogImh0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9taWNyb3NvZnQvTW9kZXJuaXplLXlvdXItY29kZS1zb2x1dGlvbi1hY2NlbGVyYXRvci9yZWZzL2hlYWRzL21haW4vaW5mcmEvdnNjb2RlX3dlYiIsICJpbmRleFVybCI6ICIvaW5kZXguanNvbiIsICJ2YXJpYWJsZXMiOiB7ImFnZW50SWQiOiAiIiwgImNvbm5lY3Rpb25TdHJpbmciOiAiIiwgInRocmVhZElkIjogIiIsICJ1c2VyTWVzc2FnZSI6ICIiLCAicGxheWdyb3VuZE5hbWUiOiAiIiwgImxvY2F0aW9uIjogIiIsICJzdWJzY3JpcHRpb25JZCI6ICIiLCAicmVzb3VyY2VJZCI6ICIiLCAicHJvamVjdFJlc291cmNlSWQiOiAiIiwgImVuZHBvaW50IjogIiJ9LCAiY29kZVJvdXRlIjogWyJhaS1wcm9qZWN0cy1zZGsiLCAicHl0aG9uIiwgImRlZmF1bHQtYXp1cmUtYXV0aCIsICJlbmRwb2ludCJdfQ==)

1. Click the badge above (may take a few minutes to load)
2. Sign in with your Azure account when prompted
3. Select the subscription where you want to deploy the solution
4. Wait for the environment to initialize (includes all deployment tools)
5. When prompted in the VS Code Web terminal, choose one of the available options shown below:

![VS Code Initial Prompt](./images/vscodeweb_intialize.png)
6. Continue with the [deploying steps](#deploying-with-azd)

</details>

<details>
<summary><b>Deploy in your local environment</b></summary>

Expand Down
Binary file added docs/images/vscodeweb_intialize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions infra/vscode_web/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
AZURE_EXISTING_AGENT_ID="<%= agentId %>"
AZURE_ENV_NAME="<%= playgroundName %>"
# AZURE_LOCATION="<%= location %>"
AZURE_SUBSCRIPTION_ID="<%= subscriptionId %>"
AZURE_EXISTING_AIPROJECT_ENDPOINT="<%= endpoint %>"
AZURE_EXISTING_AIPROJECT_RESOURCE_ID="<%= projectResourceId %>"
AZD_ALLOW_NON_EMPTY_FOLDER=true
85 changes: 85 additions & 0 deletions infra/vscode_web/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# ========== .NET ========== #
## Build results
bin/
obj/
[Bb]uild/
[Ll]ogs/
*.log
## User-specific files
*.user
*.suo
*.userosscache
*.sln.docstates
*.vsp
*.vspx
*.vspscc
## Rider / VS Code / Visual Studio
.idea/
.vscode/
.vs/
## NuGet packages
*.nupkg
packages/
*.snupkg
project.lock.json
project.assets.json
## Dotnet tools
.tools/
# ========== Java ========== #
## Compiled class files
*.class
## Logs
*.log
## Maven
target/
## Gradle
.gradle/
build/
## Eclipse
.project
.classpath
.settings/
.loadpath
## IntelliJ IDEA
*.iml
*.ipr
*.iws
out/
.idea/
# ========== Python ========== #
## Byte-compiled / cache
__pycache__/
*.py[cod]
*$py.class
## Virtual environment
env/
venv/
ENV/
.venv/
.env*
## PyInstaller
*.spec
dist/
build/
## Jupyter Notebook
.ipynb_checkpoints/
## Misc
*.log
*.pot
*.pyc
.DS_Store
*.sqlite3
# ========== General ========== #
## OS generated
Thumbs.db
ehthumbs.db
Desktop.ini
.DS_Store
*.swp
*.swo
*.bak
*.tmp
*.old
## Node (just in case mixed project)
node_modules/
# End
21 changes: 21 additions & 0 deletions infra/vscode_web/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 2 additions & 0 deletions infra/vscode_web/README-noazd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# VS Code for the Web - Azure AI Foundry Templates

43 changes: 43 additions & 0 deletions infra/vscode_web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# VS Code for the Web - Azure AI Foundry Templates

We've generated a simple development environment for you to deploy the templates.

The Azure AI Foundry extension provides tools to help you build, test, and deploy AI models and AI Applications directly from VS Code. It offers simplified operations for interacting with your models, agents, and threads without leaving your development environment. Click on the Azure AI Foundry Icon on the left to see more.

Follow the instructions below to get started!

You should see a terminal opened with the template code already cloned.

## Deploy the template

You can provision and deploy this template using:

```bash
azd up
```

Follow any instructions from the deployment script and launch the application.


If you need to delete the deployment and stop incurring any charges, run:

```bash
azd down
```

## Continuing on your local desktop

You can keep working locally on VS Code Desktop by clicking "Continue On Desktop..." at the bottom left of this screen. Be sure to take the .env file with you using these steps:

- Right-click the .env file
- Select "Download"
- Move the file from your Downloads folder to the local git repo directory
- For Windows, you will need to rename the file back to .env using right-click "Rename..."

## More examples

Check out [Azure AI Projects client library for Python](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ai/azure-ai-projects/README.md) for more information on using this SDK.

## Troubleshooting

- If you are instantiating your client via endpoint on an Azure AI Foundry project, ensure the endpoint is set in the `.env` as https://{your-foundry-resource-name}.services.ai.azure.com/api/projects/{your-foundry-project-name}`
25 changes: 25 additions & 0 deletions infra/vscode_web/codeSample.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from azure.ai.projects import AIProjectClient
from azure.identity import DefaultAzureCredential

project_client = AIProjectClient.from_connection_string(
credential=DefaultAzureCredential(),
conn_str="<%= connectionString %>")

agent = project_client.agents.get_agent("<%= agentId %>")

thread = project_client.agents.create_thread()
print(f"Created thread, ID: {thread.id}")

message = project_client.agents.create_message(
thread_id=thread.id,
role="user",
content="<%= userMessage %>"
)

run = project_client.agents.create_and_process_run(
thread_id=thread.id,
agent_id=agent.id)
messages = project_client.agents.list_messages(thread_id=thread.id)

for text_message in messages.text_messages:
print(text_message.as_dict())
3 changes: 3 additions & 0 deletions infra/vscode_web/endpoint-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
azure-ai-projects==1.0.0b12
azure-identity==1.20.0
ansible-core~=2.17.0
31 changes: 31 additions & 0 deletions infra/vscode_web/endpointCodeSample.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from azure.ai.agents.models import ListSortOrder
from azure.ai.projects import AIProjectClient
from azure.identity import DefaultAzureCredential

project = AIProjectClient(
credential=DefaultAzureCredential(),
endpoint="<%= endpoint %>")

agent = project.agents.get_agent("<%= agentId %>")

thread = project.agents.threads.create()
print(f"Created thread, ID: {thread.id}")

message = project.agents.messages.create(
thread_id=thread.id,
role="user",
content="<%= userMessage %>"
)

run = project.agents.runs.create_and_process(
thread_id=thread.id,
agent_id=agent.id)

if run.status == "failed":
print(f"Run failed: {run.last_error}")
else:
messages = project.agents.messages.list(thread_id=thread.id, order=ListSortOrder.ASCENDING)

for message in messages:
if message.text_messages:
print(f"{message.role}: {message.text_messages[-1].text.value}")
72 changes: 72 additions & 0 deletions infra/vscode_web/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"ai-projects-sdk": {
"python": {
"default-azure-auth": {
"connectionString": [
{
"name": "run_agent.py",
"type": "code",
"path": "/codeSample.py"
},
{
"name": "INSTRUCTIONS.md",
"type": "readme",
"path": "/README-noazd.md"
},
{
"name": "requirements.txt",
"type": "dependencies",
"path": "/requirements.txt"
},
{
"name": ".env",
"type": "env",
"path": "/.env"
},
{
"name": "install.sh",
"type": "install",
"path": "/install.sh"
},
{
"name": ".gitignore",
"type": "code",
"path": "/.gitignore"
}
],
"endpoint": [
{
"name": "run_agent.py",
"type": "code",
"path": "/endpointCodeSample.py"
},
{
"name": "INSTRUCTIONS.md",
"type": "readme",
"path": "/README.md"
},
{
"name": "requirements.txt",
"type": "dependencies",
"path": "/endpoint-requirements.txt"
},
{
"name": ".env",
"type": "env",
"path": "/.env"
},
{
"name": "install.sh",
"type": "install",
"path": "/install.sh"
},
{
"name": ".gitignore",
"type": "code",
"path": "/.gitignore"
}
]
}
}
}
}
3 changes: 3 additions & 0 deletions infra/vscode_web/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pip install -r requirements.txt --user -q

azd init -t microsoft/Modernize-your-code-solution-accelerator
3 changes: 3 additions & 0 deletions infra/vscode_web/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
azure-ai-projects==1.0.0b12
azure-identity==1.20.0
ansible-core~=2.17.0
Loading