├── .github
├── CODEOWNERS
├── scripts
│ └── commit-filesize-diff-summary.py
└── workflows
│ ├── pre-commit.yml
│ └── pull-request-checks.yml
├── .gitignore
├── .infra
├── deployment
│ ├── main.bicep
│ └── modules
│ │ ├── acs.bicep
│ │ ├── ai_project.bicep
│ │ ├── ai_project_deployment.bicep
│ │ ├── container_registry.bicep
│ │ ├── keyvault.bicep
│ │ ├── role_assignment.bicep
│ │ ├── storageAccount.bicep
│ │ └── workspace_hub.bicep
└── pytest_plugins
│ └── changed_samples
│ ├── README.md
│ ├── build
│ └── lib
│ │ └── pytest_changed_samples
│ │ ├── __init__.py
│ │ ├── git_utils.py
│ │ ├── plugin.py
│ │ └── trie.py
│ ├── pyproject.toml
│ └── src
│ ├── pytest_changed_samples.egg-info
│ ├── PKG-INFO
│ ├── SOURCES.txt
│ ├── dependency_links.txt
│ ├── entry_points.txt
│ ├── requires.txt
│ └── top_level.txt
│ └── pytest_changed_samples
│ ├── __init__.py
│ ├── git_utils.py
│ ├── plugin.py
│ └── trie.py
├── .pre-commit-config.yaml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── SUPPORT.md
├── azure_ai_projects_onedp-1.0.0a20250423005-py3-none-any.whl
├── conftest.py
├── dev-requirements.txt
├── libs
├── azure_ai_agents-1.0.0a20250430003-py3-none-any.whl
└── azure_ai_projects-1.0.0b10-py3-none-any.whl
├── package-lock.json
├── samples
├── agent-catalog
│ ├── .gitkeep
│ ├── 3p-agent-samples
│ │ ├── .gitkeep
│ │ ├── README.md
│ │ └── foundry-agent-service-sdk
│ │ │ ├── .gitkeep
│ │ │ ├── README.md
│ │ │ ├── auquan
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── assets
│ │ │ │ └── logo.svg
│ │ │ └── python
│ │ │ │ ├── src
│ │ │ │ └── auquan.json
│ │ │ │ └── template.py
│ │ │ ├── marqueeinsights-news-agent
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── assets
│ │ │ │ ├── architecture.png
│ │ │ │ ├── demo_ai_news_usage.ipynb
│ │ │ │ └── marquee_insights_logo.svg
│ │ │ ├── deploy.bicep
│ │ │ ├── python
│ │ │ │ ├── requirements.txt
│ │ │ │ └── template.py
│ │ │ ├── sample_data
│ │ │ │ └── example_bing_response.json
│ │ │ ├── setup-guide.md
│ │ │ └── system_prompt.txt
│ │ │ ├── mihcm-hr-assist-agent
│ │ │ ├── .gitignore
│ │ │ ├── .gitkeep
│ │ │ ├── ArchitectureOverview.png
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── deploy.bicep
│ │ │ ├── deploymentScript.json
│ │ │ ├── logo.svg
│ │ │ ├── mihcmExternalAPI.json
│ │ │ ├── modules-mi-agent
│ │ │ │ ├── add-capability-host.bicep
│ │ │ │ ├── ai-service-role-assignments.bicep
│ │ │ │ ├── standard-ai-hub.bicep
│ │ │ │ ├── standard-ai-project.bicep
│ │ │ │ └── standard-dependent-resources.bicep
│ │ │ ├── requirements.txt
│ │ │ ├── template.py
│ │ │ └── template_newSDK.py
│ │ │ ├── saifr-comm-compliance-agent
│ │ │ ├── .gitkeep
│ │ │ ├── README.md
│ │ │ ├── Saifr_Logo_Official_Registered trademark_RGB.jpg
│ │ │ ├── architecture_overview.png
│ │ │ └── python
│ │ │ │ ├── SuggestedCompliantSentence.json
│ │ │ │ ├── isParagraphCompliant.json
│ │ │ │ ├── requirements.txt
│ │ │ │ └── template.py
│ │ │ └── sightmachine-filler-optimization-agent
│ │ │ ├── .gitkeep
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── assets
│ │ │ ├── SM_Aperture_42x42_fff.svg
│ │ │ ├── SM_Aperture_500x500_333.svg
│ │ │ ├── demo_arch.png
│ │ │ └── sm_arch.png
│ │ │ ├── infra
│ │ │ ├── LICENSE
│ │ │ ├── abbreviations.json
│ │ │ ├── agent
│ │ │ │ ├── ai-search-role-assignments.bicep
│ │ │ │ ├── ai-service-role-assignments.bicep
│ │ │ │ ├── standard-ai-hub.bicep
│ │ │ │ ├── standard-ai-project.bicep
│ │ │ │ └── standard-dependent-resources.bicep
│ │ │ ├── app
│ │ │ │ ├── api.bicep
│ │ │ │ ├── storage-Access.bicep
│ │ │ │ ├── storage-PrivateEndpoint.bicep
│ │ │ │ └── vnet.bicep
│ │ │ ├── core
│ │ │ │ ├── host
│ │ │ │ │ ├── appserviceplan.bicep
│ │ │ │ │ └── functions-flexconsumption.bicep
│ │ │ │ ├── identity
│ │ │ │ │ └── userAssignedIdentity.bicep
│ │ │ │ ├── monitor
│ │ │ │ │ ├── appinsights-access.bicep
│ │ │ │ │ ├── applicationinsights.bicep
│ │ │ │ │ ├── loganalytics.bicep
│ │ │ │ │ └── monitoring.bicep
│ │ │ │ └── storage
│ │ │ │ │ └── storage-account.bicep
│ │ │ ├── main.bicep
│ │ │ ├── main.parameters.json
│ │ │ └── scripts
│ │ │ │ ├── createlocalsettings.ps1
│ │ │ │ └── createlocalsettings.sh
│ │ │ ├── logo.svg
│ │ │ └── python
│ │ │ ├── function_app.py
│ │ │ ├── host.json
│ │ │ ├── requirements.txt
│ │ │ ├── sample_data
│ │ │ └── example_data.csv
│ │ │ └── src
│ │ │ └── az_fns.py
│ ├── CONTRIBUTING.md
│ ├── README.md
│ ├── aifoundry-agent-designer-win32-x64-0.0.29.vsix
│ ├── msft-agent-samples
│ │ ├── .gitkeep
│ │ ├── README.md
│ │ ├── foundry-agent-service-sdk
│ │ │ ├── .gitkeep
│ │ │ ├── README.md
│ │ │ ├── browser-automation-agent
│ │ │ │ ├── .gitkeep
│ │ │ │ ├── README.md
│ │ │ │ └── browser_automation.py
│ │ │ ├── commspilot
│ │ │ │ ├── .gitkeep
│ │ │ │ ├── README.md
│ │ │ │ ├── assets
│ │ │ │ │ └── logic-app-setup.md
│ │ │ │ ├── deployments
│ │ │ │ │ └── bing-grounding.bicep
│ │ │ │ └── python
│ │ │ │ │ └── template.py
│ │ │ ├── customer-service-agent
│ │ │ │ ├── .gitkeep
│ │ │ │ ├── README.md
│ │ │ │ ├── assets
│ │ │ │ │ ├── .gitkeep
│ │ │ │ │ ├── azuredevops-swagger.json
│ │ │ │ │ ├── self-service-troubleshooting-guide.md
│ │ │ │ │ └── windows-troubleshooting-guide.md
│ │ │ │ ├── core
│ │ │ │ │ ├── .gitkeep
│ │ │ │ │ ├── HumanEscalationAgent.agent
│ │ │ │ │ ├── RoutingAgent.agent
│ │ │ │ │ ├── SelfServiceAgent.agent
│ │ │ │ │ ├── TicketCreationAgent.agent
│ │ │ │ │ ├── TicketResolutionAgent.agent
│ │ │ │ │ └── WindowsSupport.agent
│ │ │ │ ├── skills
│ │ │ │ │ ├── .gitkeep
│ │ │ │ │ ├── azuredevops-openapi.skill
│ │ │ │ │ ├── self-service-knowledge.skill
│ │ │ │ │ └── windows-support-knowledge.skill
│ │ │ │ ├── src
│ │ │ │ │ ├── .gitkeep
│ │ │ │ │ └── scripts
│ │ │ │ │ │ ├── .gitkeep
│ │ │ │ │ │ └── deploy.sh
│ │ │ │ └── workflows
│ │ │ │ │ ├── .gitkeep
│ │ │ │ │ └── CustomerSupport.fdl
│ │ │ ├── exact-qna-agent
│ │ │ │ ├── .gitkeep
│ │ │ │ ├── README.md
│ │ │ │ ├── config.yaml
│ │ │ │ ├── questionanswering.json
│ │ │ │ ├── requirements.txt
│ │ │ │ ├── sample_data
│ │ │ │ │ └── cqa_import.json
│ │ │ │ ├── template.py
│ │ │ │ └── utils.py
│ │ │ ├── home-loan-agent
│ │ │ │ ├── .gitkeep
│ │ │ │ ├── Contoso_Loan_Documentation_Checklist.md
│ │ │ │ ├── Contoso_Loan_Product_Eligibility_Guide.md
│ │ │ │ ├── README.md
│ │ │ │ ├── loan_product_eligibility_dataset.csv
│ │ │ │ └── template.py
│ │ │ ├── intent-routing-agent
│ │ │ │ ├── .gitkeep
│ │ │ │ ├── README.md
│ │ │ │ ├── clu.json
│ │ │ │ ├── config.yaml
│ │ │ │ ├── questionanswering.json
│ │ │ │ ├── requirements.txt
│ │ │ │ ├── sample_data
│ │ │ │ │ ├── clu_import.json
│ │ │ │ │ └── cqa_import.json
│ │ │ │ ├── template.py
│ │ │ │ └── utils.py
│ │ │ ├── magentic-one-agent
│ │ │ │ ├── .gitkeep
│ │ │ │ ├── README.md
│ │ │ │ ├── core
│ │ │ │ │ ├── .gitkeep
│ │ │ │ │ ├── BingSearch.agent
│ │ │ │ │ ├── codeExecutor.agent
│ │ │ │ │ ├── magenticOneCoder.agent
│ │ │ │ │ └── webBrowse.agent
│ │ │ │ └── workflow
│ │ │ │ │ └── magentic.one.fdl
│ │ │ ├── meeting-prep-agent
│ │ │ │ ├── .gitkeep
│ │ │ │ ├── README.md
│ │ │ │ ├── assets
│ │ │ │ │ └── logic-app-setup.md
│ │ │ │ ├── deployments
│ │ │ │ │ └── bing-grounding.bicep
│ │ │ │ └── python
│ │ │ │ │ ├── template.py
│ │ │ │ │ └── utils
│ │ │ │ │ └── user_logic_apps.py
│ │ │ ├── portfolio-navigator
│ │ │ │ ├── .gitkeep
│ │ │ │ └── README.md
│ │ │ ├── research-flow-agent
│ │ │ │ ├── Core
│ │ │ │ │ ├── LedgerFacts.agent
│ │ │ │ │ ├── LedgerFactsUpdate.agent
│ │ │ │ │ ├── LedgerPlanner.agent
│ │ │ │ │ ├── LedgerPlanupdate.agent
│ │ │ │ │ ├── Summarizer.agent
│ │ │ │ │ ├── agentRouter.agent
│ │ │ │ │ └── progressManager.agent
│ │ │ │ ├── README.md
│ │ │ │ └── workflow
│ │ │ │ │ └── DeepResearchAgent.fdl
│ │ │ ├── sales-analyst-agent
│ │ │ │ ├── .gitkeep
│ │ │ │ ├── README.md
│ │ │ │ ├── env.example
│ │ │ │ ├── requirements.txt
│ │ │ │ ├── sales-analyst-agent.ipynb
│ │ │ │ └── template.py
│ │ │ ├── text-translation-agent
│ │ │ │ ├── .gitkeep
│ │ │ │ ├── README.md
│ │ │ │ ├── config.yaml
│ │ │ │ ├── requirements.txt
│ │ │ │ ├── template.py
│ │ │ │ ├── translator.json
│ │ │ │ └── utils.py
│ │ │ ├── travel-planner
│ │ │ │ ├── .env
│ │ │ │ ├── .gitkeep
│ │ │ │ ├── README.md
│ │ │ │ ├── deployments
│ │ │ │ │ ├── .gitkeep
│ │ │ │ │ └── bing-grounding.bicep
│ │ │ │ ├── sample-data
│ │ │ │ │ ├── .gitkeep
│ │ │ │ │ └── input-output.md
│ │ │ │ ├── template.py
│ │ │ │ └── tripadvisor.openapi.json
│ │ │ └── voice-live-agent
│ │ │ │ ├── .gitkeep
│ │ │ │ ├── README.md
│ │ │ │ └── samples
│ │ │ │ └── react
│ │ │ │ ├── README.md
│ │ │ │ ├── components.json
│ │ │ │ ├── next-env.d.ts
│ │ │ │ ├── next.config.ts
│ │ │ │ ├── package-lock.json
│ │ │ │ ├── package.json
│ │ │ │ ├── postcss.config.mjs
│ │ │ │ ├── public
│ │ │ │ ├── audio-processor.js
│ │ │ │ └── icon.svg
│ │ │ │ ├── rt-client-0.5.2.tgz
│ │ │ │ ├── src
│ │ │ │ ├── app
│ │ │ │ │ ├── chat-interface.tsx
│ │ │ │ │ ├── fonts
│ │ │ │ │ │ ├── GeistMonoVF.woff
│ │ │ │ │ │ └── GeistVF.woff
│ │ │ │ │ ├── globals.css
│ │ │ │ │ ├── index.css
│ │ │ │ │ ├── layout.tsx
│ │ │ │ │ ├── page.tsx
│ │ │ │ │ └── svg.tsx
│ │ │ │ ├── components
│ │ │ │ │ └── ui
│ │ │ │ │ │ ├── accordion.tsx
│ │ │ │ │ │ ├── button.tsx
│ │ │ │ │ │ ├── card.tsx
│ │ │ │ │ │ ├── input.tsx
│ │ │ │ │ │ ├── select.tsx
│ │ │ │ │ │ ├── slider.tsx
│ │ │ │ │ │ └── switch.tsx
│ │ │ │ └── lib
│ │ │ │ │ ├── audio.ts
│ │ │ │ │ ├── proactive-event-manager.ts
│ │ │ │ │ └── utils.ts
│ │ │ │ ├── tailwind.config.ts
│ │ │ │ ├── tsconfig.json
│ │ │ │ └── yarn.lock
│ │ └── semantic-kernel-sdk
│ │ │ ├── .gitkeep
│ │ │ ├── README.md
│ │ │ ├── ai-redteaming-agent
│ │ │ ├── .gitkeep
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── requirements.txt
│ │ │ └── template.py
│ │ │ ├── contract-analysis-agent
│ │ │ ├── .gitkeep
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── assets
│ │ │ │ ├── input
│ │ │ │ │ ├── 123LogisticsContract.pdf
│ │ │ │ │ ├── ABCContract.pdf
│ │ │ │ │ ├── AgentInstructions.md
│ │ │ │ │ ├── ContractSchema.json
│ │ │ │ │ └── XYZContract.pdf
│ │ │ │ ├── other
│ │ │ │ │ ├── 123 Logistics Contract.docx
│ │ │ │ │ ├── ABC Contract.docx
│ │ │ │ │ └── XYZ Contract.docx
│ │ │ │ └── output
│ │ │ │ │ └── sample_output.md
│ │ │ ├── requirements.txt
│ │ │ └── src
│ │ │ │ ├── .env.example
│ │ │ │ ├── agents
│ │ │ │ └── contract_analysis_agent.py
│ │ │ │ ├── template.py
│ │ │ │ ├── tools
│ │ │ │ └── content_understanding_tool.py
│ │ │ │ └── utils
│ │ │ │ └── logger.py
│ │ │ ├── healthcare-multi-agent-orchestrator
│ │ │ ├── .gitkeep
│ │ │ └── README.md
│ │ │ ├── sop-forge-agent
│ │ │ ├── .gitignore
│ │ │ ├── .gitkeep
│ │ │ ├── README.md
│ │ │ ├── assets
│ │ │ │ ├── input
│ │ │ │ │ ├── AgentInstructions.md
│ │ │ │ │ ├── CUAnalyzerSchema.json
│ │ │ │ │ └── VideoExample480p.mp4
│ │ │ │ └── output
│ │ │ │ │ └── sample
│ │ │ │ │ ├── keyFrame.1188.jpg
│ │ │ │ │ ├── keyFrame.126984.jpg
│ │ │ │ │ ├── keyFrame.148896.jpg
│ │ │ │ │ ├── keyFrame.158400.jpg
│ │ │ │ │ ├── keyFrame.166716.jpg
│ │ │ │ │ ├── keyFrame.29700.jpg
│ │ │ │ │ ├── keyFrame.50424.jpg
│ │ │ │ │ ├── keyFrame.67056.jpg
│ │ │ │ │ ├── keyFrame.74184.jpg
│ │ │ │ │ ├── keyFrame.8316.jpg
│ │ │ │ │ ├── keyFrame.99660.jpg
│ │ │ │ │ └── readme.md
│ │ │ ├── requirements.txt
│ │ │ └── src
│ │ │ │ ├── .env.example
│ │ │ │ ├── agents
│ │ │ │ └── sop_forge_agent.py
│ │ │ │ ├── template.py
│ │ │ │ ├── tools
│ │ │ │ └── content_understanding_tool.py
│ │ │ │ └── utils
│ │ │ │ └── logger.py
│ │ │ ├── video-translation-agent
│ │ │ ├── .gitkeep
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── assets
│ │ │ │ └── architecture-diagram.png
│ │ │ ├── requirements.txt
│ │ │ ├── sample_data
│ │ │ │ ├── en-US-TryoutOriginalTTSIntro.mp4
│ │ │ │ └── es-ES-TryOutOriginalElSalvadorMicrosoftIntro.mp4
│ │ │ ├── src
│ │ │ │ ├── video_translation_client.py
│ │ │ │ ├── video_translation_dataclass.py
│ │ │ │ ├── video_translation_enum.py
│ │ │ │ ├── video_translation_plugin.py
│ │ │ │ └── video_translation_util.py
│ │ │ └── template.py
│ │ │ └── warranty-claim-processing-agent
│ │ │ ├── .gitkeep
│ │ │ ├── LICENSE.md
│ │ │ ├── README.md
│ │ │ ├── assets
│ │ │ ├── input
│ │ │ │ └── sample-claim-signed.png
│ │ │ ├── other
│ │ │ │ ├── claims_analysis_agent_instructions.md
│ │ │ │ ├── claims_analysis_agent_output_schema.json
│ │ │ │ └── sample-claim.docx
│ │ │ └── readme
│ │ │ │ └── flow-diagram.png
│ │ │ ├── requirements.txt
│ │ │ └── src
│ │ │ ├── .env.example
│ │ │ ├── steps
│ │ │ ├── audit_database_step.py
│ │ │ ├── claim_analysis_agent_step.py
│ │ │ ├── document_intelligence_step.py
│ │ │ ├── pii_redaction_step.py
│ │ │ └── quick_access_database_step.py
│ │ │ ├── template.py
│ │ │ └── utils
│ │ │ └── logger.py
│ └── vscode_ext_early_access
│ │ └── .gitkeep
├── microsoft
│ ├── REST
│ │ └── mslearn-resources
│ │ │ └── quickstart
│ │ │ └── quickstart.sh
│ ├── csharp
│ │ ├── getting-started-agents
│ │ │ ├── AdditionalMessage
│ │ │ │ ├── AdditionalMessage.md
│ │ │ │ ├── AdditionalMessageAsync.cs
│ │ │ │ └── AdditionalMessageSync.cs
│ │ │ ├── AzureAiSearch
│ │ │ │ ├── AzureAiSearch.md
│ │ │ │ ├── AzureAiSearchAsync.cs
│ │ │ │ └── AzureAiSearchSync.cs
│ │ │ ├── AzureFunctionCalling
│ │ │ │ ├── AzureFunctionCalling.md
│ │ │ │ ├── AzureFunctionCallingAsync.cs
│ │ │ │ └── AzureFunctionCallingSync.cs
│ │ │ ├── Basics
│ │ │ │ ├── Basics.md
│ │ │ │ ├── BasicsAsync.cs
│ │ │ │ └── BasicsSync.cs
│ │ │ ├── BingGrounding
│ │ │ │ ├── BingGrounding.md
│ │ │ │ ├── BingGroundingAsync.cs
│ │ │ │ └── BingGroundingSync.cs
│ │ │ ├── BrowserAutomation
│ │ │ │ ├── BrowserAutomation.md
│ │ │ │ ├── BrowserAutomationAsync.cs
│ │ │ │ └── BrowserAutomationSync.cs
│ │ │ ├── FileSearch
│ │ │ │ ├── FileSearch.md
│ │ │ │ ├── FileSearchAsync.cs
│ │ │ │ └── FileSearchSync.cs
│ │ │ ├── FileSearchBlobStorage
│ │ │ │ ├── FileSearchBlobStorage.md
│ │ │ │ ├── FileSearchBlobStorageAsync.cs
│ │ │ │ └── FileSearchBlobStorageSync.cs
│ │ │ ├── Functions
│ │ │ │ ├── Functions.md
│ │ │ │ ├── FunctionsAsync.cs
│ │ │ │ └── FunctionsSync.cs
│ │ │ ├── FunctionsWithStreaming
│ │ │ │ ├── FunctionsWithStreaming.md
│ │ │ │ ├── FunctionsWithStreamingAsync.cs
│ │ │ │ └── FunctionsWithStreamingSync.cs
│ │ │ ├── ImageFileInputs
│ │ │ │ ├── ImageFileInputs.md
│ │ │ │ ├── ImageFileInputsAsync.cs
│ │ │ │ └── ImageFileInputsSync.cs
│ │ │ ├── ImageUrlInputs
│ │ │ │ ├── ImageUrlInputs.md
│ │ │ │ ├── ImageUrlInputsAsync.cs
│ │ │ │ └── ImageUrlInputsSync.cs
│ │ │ ├── MessageAttachmentLocalFileSearch
│ │ │ │ ├── MessageAttachmentLocalFileSearch.md
│ │ │ │ ├── MessageAttachmentLocalFileSearchAsync.cs
│ │ │ │ └── MessageAttachmentLocalFileSearchSync.cs
│ │ │ ├── OpenAPI
│ │ │ │ ├── OpenAPI.md
│ │ │ │ ├── OpenAPIAsync.cs
│ │ │ │ └── OpenAPISync.cs
│ │ │ ├── README.md
│ │ │ └── Streaming
│ │ │ │ ├── Streaming.md
│ │ │ │ ├── StreamingAsync.cs
│ │ │ │ └── StreamingSync.cs
│ │ └── mslearn-resources
│ │ │ └── quickstart
│ │ │ ├── README.md
│ │ │ └── Samples
│ │ │ ├── .env.example
│ │ │ ├── AgentFileSearch.cs
│ │ │ ├── AgentService.cs
│ │ │ ├── CreateRGAzureAI.cs
│ │ │ └── SimpleInference.cs
│ ├── data
│ │ ├── .gitkeep
│ │ ├── nifty_500_quarterly_results.csv
│ │ └── product_info_1.md
│ ├── infrastructure-setup
│ │ ├── 00-basic
│ │ │ ├── README.md
│ │ │ ├── main.bicep
│ │ │ └── metadata.json
│ │ ├── 01-connections
│ │ │ ├── README.md
│ │ │ ├── connection-ai-search.bicep
│ │ │ ├── connection-ai-search.json
│ │ │ ├── connection-application-insights.bicep
│ │ │ ├── connection-application-insights.json
│ │ │ ├── connection-bing-grounding.bicep
│ │ │ ├── connection-bing-grounding.json
│ │ │ ├── connection-storage-account.bicep
│ │ │ ├── connection-storage-account.json
│ │ │ └── deployment.parameters.json
│ │ ├── 10-private-network-basic
│ │ │ ├── README.md
│ │ │ ├── main.bicep
│ │ │ └── main.json
│ │ ├── 15-private-network-standard-agent-setup
│ │ │ ├── CheckCapabilityHostReadiness.ps1
│ │ │ ├── CheckCapabilityHostReadiness.sh
│ │ │ ├── README.md
│ │ │ ├── main-create.bicep
│ │ │ ├── main-project-caphost-create.bicep
│ │ │ └── modules-network-secured
│ │ │ │ ├── add-project-capability-host.bicep
│ │ │ │ ├── ai-account-identity.bicep
│ │ │ │ ├── ai-account-reference.bicep
│ │ │ │ ├── ai-project-identity.bicep
│ │ │ │ ├── ai-project-reference.bicep
│ │ │ │ ├── ai-search-role-assignments.bicep
│ │ │ │ ├── azure-storage-account-role-assignment.bicep
│ │ │ │ ├── blob-storage-container-role-assignments.bicep
│ │ │ │ ├── cosmos-container-role-assignments.bicep
│ │ │ │ ├── cosmosdb-account-role-assignment.bicep
│ │ │ │ ├── format-project-workspace-id.bicep
│ │ │ │ ├── private-endpoint-and-dns.bicep
│ │ │ │ ├── standard-dependent-reference.bicep
│ │ │ │ ├── standard-dependent-resources.bicep
│ │ │ │ ├── validate-existing-resources.bicep
│ │ │ │ └── vnet.bicep
│ │ ├── 20-user-assigned-identity
│ │ │ ├── README.md
│ │ │ ├── main.bicep
│ │ │ └── metadata.json
│ │ ├── 25-entraid-passthrough
│ │ │ ├── README.md
│ │ │ └── main.bicep
│ │ ├── 30-customer-managed-keys
│ │ │ ├── README.md
│ │ │ ├── deployment.parameters.json
│ │ │ ├── main.bicep
│ │ │ └── updateEncryption.bicep
│ │ ├── 31-customer-managed-keys-standard-agent
│ │ │ ├── README.md
│ │ │ ├── deployment.parameters.json
│ │ │ ├── main.bicep
│ │ │ ├── main.json
│ │ │ └── modules-standard
│ │ │ │ ├── add-project-capability-host.bicep
│ │ │ │ ├── ai-account-encryption.bicep
│ │ │ │ ├── ai-project-identity.bicep
│ │ │ │ ├── ai-search-role-assignments.bicep
│ │ │ │ ├── azure-storage-account-role-assignment.bicep
│ │ │ │ ├── blob-storage-container-role-assignments.bicep
│ │ │ │ ├── cosmos-container-role-assignments.bicep
│ │ │ │ ├── cosmosdb-account-role-assignment.bicep
│ │ │ │ ├── standard-dependent-resources.bicep
│ │ │ │ └── validate-existing-resources.bicep
│ │ ├── 40-basic-agent-setup
│ │ │ ├── README.md
│ │ │ ├── basic-setup.bicep
│ │ │ ├── basic-setup.json
│ │ │ └── basic-setup.parameters.json
│ │ ├── 41-standard-agent-setup
│ │ │ ├── README.md
│ │ │ ├── azuredeploy.json
│ │ │ ├── azuredeploy.parameters.json
│ │ │ ├── main.bicep
│ │ │ └── modules-standard
│ │ │ │ ├── add-project-capability-host.bicep
│ │ │ │ ├── ai-account-identity.bicep
│ │ │ │ ├── ai-project-identity.bicep
│ │ │ │ ├── ai-search-role-assignments.bicep
│ │ │ │ ├── azure-storage-account-role-assignment.bicep
│ │ │ │ ├── blob-storage-container-role-assignments.bicep
│ │ │ │ ├── cosmos-container-role-assignments.bicep
│ │ │ │ ├── cosmosdb-account-role-assignment.bicep
│ │ │ │ ├── format-project-workspace-id.bicep
│ │ │ │ ├── standard-dependent-resources.bicep
│ │ │ │ └── validate-existing-resources.bicep
│ │ ├── 42-basic-agent-setup-use-existing-azureopenai
│ │ │ ├── README.md
│ │ │ ├── azurebyo.PNG
│ │ │ ├── main.bicep
│ │ │ ├── main.json
│ │ │ └── main.parameters.json
│ │ └── 45-basic-agent-bing
│ │ │ ├── README.md
│ │ │ ├── main.bicep
│ │ │ └── modules
│ │ │ ├── add-bing-search-tool.bicep
│ │ │ ├── ai-account-keys.bicep
│ │ │ └── ai-project-keys.bicep
│ ├── java
│ │ └── mslearn-resources
│ │ │ └── quickstart
│ │ │ ├── .env.template
│ │ │ ├── README.md
│ │ │ ├── TESTING.md
│ │ │ ├── pom.xml
│ │ │ ├── src
│ │ │ └── main
│ │ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── azure
│ │ │ │ └── ai
│ │ │ │ └── foundry
│ │ │ │ └── samples
│ │ │ │ ├── AgentSample.java
│ │ │ │ ├── ChatCompletionSample.java
│ │ │ │ ├── ChatCompletionStreamingSample.java
│ │ │ │ ├── CreateProject.java
│ │ │ │ ├── EvaluateAgentSample.java
│ │ │ │ ├── FileSearchAgentSample.java
│ │ │ │ ├── README.md
│ │ │ │ └── utils
│ │ │ │ └── ConfigLoader.java
│ │ │ ├── testing.bat
│ │ │ └── testing.sh
│ ├── javascript
│ │ └── mslearn-resources
│ │ │ └── quickstart
│ │ │ ├── .env.template
│ │ │ ├── README.md
│ │ │ ├── data
│ │ │ └── product_info_1.md
│ │ │ ├── package-lock.json
│ │ │ ├── package.json
│ │ │ └── src
│ │ │ └── quickstart.js
│ ├── python
│ │ ├── getting-started-agents
│ │ │ ├── 3p-tools
│ │ │ │ ├── Celonis
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── demo.py
│ │ │ │ │ ├── media
│ │ │ │ │ │ ├── actions.png
│ │ │ │ │ │ ├── add_action.png
│ │ │ │ │ │ ├── connection.png
│ │ │ │ │ │ ├── copy.png
│ │ │ │ │ │ ├── create_copilot_menu.png
│ │ │ │ │ │ ├── create_custom_tool.png
│ │ │ │ │ │ ├── new_asset_menu.png
│ │ │ │ │ │ └── publish.png
│ │ │ │ │ └── tool_api.json
│ │ │ │ ├── InsureMO
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── insureMO_Quotation.py
│ │ │ │ │ └── insuremo_openapi_spec.json
│ │ │ │ ├── MiHCM
│ │ │ │ │ ├── ArchitectureOverview.png
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── logo.svg
│ │ │ │ │ ├── mihcmExternalAPI.json
│ │ │ │ │ ├── requirements.txt
│ │ │ │ │ └── template_newSDK.py
│ │ │ │ ├── Morningstar
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── media
│ │ │ │ │ │ ├── connect-custom-resource.png
│ │ │ │ │ │ ├── connected-resources.png
│ │ │ │ │ │ ├── custom-keys.png
│ │ │ │ │ │ └── project-assets.png
│ │ │ │ │ ├── morningstar.json
│ │ │ │ │ └── morningstar.py
│ │ │ │ ├── PartnerContributingGuide.md
│ │ │ │ ├── README.md
│ │ │ │ ├── README_template_for_partner.md
│ │ │ │ ├── Trademo_Global_trade
│ │ │ │ │ ├── ReadME.md
│ │ │ │ │ ├── Trademo_OpenAPI.json
│ │ │ │ │ ├── custom_connection.png
│ │ │ │ │ └── trademo_and_tariff.py
│ │ │ │ ├── Tripadvisor
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── media
│ │ │ │ │ │ ├── add-connection.png
│ │ │ │ │ │ ├── add-data-source.png
│ │ │ │ │ │ ├── connect-custom-resource.png
│ │ │ │ │ │ ├── connected-resources.png
│ │ │ │ │ │ ├── custom-keys.png
│ │ │ │ │ │ └── project-assets.png
│ │ │ │ │ ├── tripadvisor.json
│ │ │ │ │ └── tripadvisor.py
│ │ │ │ ├── auquan
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── auquan.json
│ │ │ │ │ └── auquan_risk_sdk.py
│ │ │ │ └── legalfly
│ │ │ │ │ ├── .env.example
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── legalfly.json
│ │ │ │ │ └── legalfly.py
│ │ │ ├── README.md
│ │ │ ├── agent-client
│ │ │ │ ├── README.md
│ │ │ │ ├── basic-agent.py
│ │ │ │ ├── code-interpreter.py
│ │ │ │ └── file-search.py
│ │ │ ├── azure_ai_search.py
│ │ │ ├── azure_functions.py
│ │ │ ├── basic_agent.py
│ │ │ ├── bing_grounding.py
│ │ │ ├── code_interpreter
│ │ │ │ ├── code_interpreter.py
│ │ │ │ └── nifty_500_quarterly_results.csv
│ │ │ ├── enterprise_search.py
│ │ │ ├── file_search.py
│ │ │ ├── functions_calling.py
│ │ │ ├── logic_apps.py
│ │ │ ├── logic_apps
│ │ │ │ ├── logic_apps.py
│ │ │ │ ├── user_functions.py
│ │ │ │ └── user_logic_apps.py
│ │ │ ├── openapi
│ │ │ │ ├── countries.json
│ │ │ │ ├── openapi_anonymous.py
│ │ │ │ ├── openapi_connection.py
│ │ │ │ └── weather_openapi.json
│ │ │ ├── quickstart.py
│ │ │ └── requirements.txt
│ │ └── mslearn-resources
│ │ │ └── quickstart
│ │ │ ├── README.md
│ │ │ ├── create_project.py
│ │ │ ├── product_info_1.md
│ │ │ ├── quickstart.py
│ │ │ └── requirements.txt
│ └── typescript
│ │ └── src
│ │ ├── agentsBasics.ts
│ │ ├── azureAiSearch.ts
│ │ ├── bingGrounding.ts
│ │ ├── bingGroundingWithStreaming.ts
│ │ ├── codeInterpreter.ts
│ │ ├── codeInterpreterWithStreaming.ts
│ │ ├── data
│ │ ├── image_file.png
│ │ ├── localFile.txt
│ │ ├── nifty500QuarterlyResults.csv
│ │ ├── sampleFileForUpload.txt
│ │ └── weatherOpenApi.json
│ │ ├── fileSearch.ts
│ │ ├── filesWithLocalUpload.ts
│ │ ├── filesWithPolling.ts
│ │ ├── functionTool.ts
│ │ ├── imageInputWithBase64.ts
│ │ ├── imageInputWithFile.ts
│ │ ├── imageInputWithUrl.ts
│ │ └── openApi.ts
└── mistral
│ ├── .gitkeep
│ ├── README.md
│ ├── pyproject.toml
│ ├── python
│ ├── .gitignore
│ └── mistral-ocr-with-vlm.ipynb
│ ├── requirements.txt
│ └── uv.lock
└── tox.ini
/.github/workflows/pre-commit.yml:
--------------------------------------------------------------------------------
1 | name: Pre-Commit
2 |
3 |
4 | on:
5 | # push:
6 | # branches:
7 | # - main
8 | # pull_request:
9 | # branches:
10 | # - main
11 | workflow_dispatch:
12 |
13 | jobs:
14 | pre-commit:
15 | runs-on: ubuntu-latest
16 | steps:
17 | - uses: actions/checkout@v3
18 | - uses: actions/setup-python@v4
19 | with:
20 | python-version: "3.9"
21 | - run: pip install -r dev-requirements.txt
22 | - name: Run Pre-Commit
23 | run: pre-commit run --all-files
24 |
--------------------------------------------------------------------------------
/.github/workflows/pull-request-checks.yml:
--------------------------------------------------------------------------------
1 | name: Pull Request Checks
2 |
3 | on:
4 | # push:
5 | # branches:
6 | # - main
7 | # pull_request:
8 | # branches:
9 | # - main
10 | workflow_dispatch:
11 |
12 | jobs:
13 | pull_request_size:
14 | if: github.event_name == 'pull_request'
15 | runs-on: ubuntu-latest
16 | steps:
17 | - uses: actions/checkout@v3
18 | - uses: actions/setup-python@v4
19 | with:
20 | python-version: "3.9"
21 | - name: Check Pull Request Size
22 | run: |
23 | git fetch origin ${{ github.event.pull_request.base.ref }} --quiet # Need to manually fetch base branch in CI
24 | python ./.github/scripts/commit-filesize-diff-summary.py --limit 1MB origin/${{ github.event.pull_request.base.ref }}..HEAD
25 |
--------------------------------------------------------------------------------
/.infra/deployment/modules/ai_project.bicep:
--------------------------------------------------------------------------------
1 | param name string
2 | param nameFriendly string = name
3 | param workspaceHubID string
4 | param location string = resourceGroup().location
5 |
6 | resource project 'Microsoft.MachineLearningServices/workspaces@2023-10-01' = {
7 | name: name
8 | #disable-next-line BCP187
9 | kind: 'Project'
10 | location: location
11 | identity: {
12 | type: 'SystemAssigned'
13 | }
14 | properties: {
15 | friendlyName: nameFriendly
16 | #disable-next-line BCP037
17 | hubResourceId: workspaceHubID
18 | }
19 | }
20 |
21 | output name string = project.name
22 | output location string = project.location
--------------------------------------------------------------------------------
/.infra/deployment/modules/ai_project_deployment.bicep:
--------------------------------------------------------------------------------
1 | param name string
2 | param properties object
3 | param ai_services_name string
4 |
5 | var defaults = {
6 | raiPolicyName: 'Microsoft.Default'
7 | versionUpgradeOption: 'OnceNewDefaultVersionAvailable'
8 | type: 'Azure.OpenAI'
9 | sku: {
10 | name: 'Standard'
11 | capacity: 20
12 | }
13 | }
14 |
15 | var properties_with_defaults = union(defaults, properties)
16 |
17 | #disable-next-line BCP081
18 | resource aiResource 'Microsoft.CognitiveServices/accounts@2024-06-01-preview' existing = {
19 | name: ai_services_name
20 |
21 | }
22 |
23 | #disable-next-line BCP081
24 | resource deployment 'Microsoft.CognitiveServices/accounts/deployments@2024-06-01-preview' = {
25 | parent: aiResource
26 | name: name
27 | sku: properties_with_defaults.sku
28 | properties: {
29 | model: properties_with_defaults.model
30 | versionUpgradeOption: properties_with_defaults.versionUpgradeOption
31 | }
32 | }
--------------------------------------------------------------------------------
/.infra/deployment/modules/container_registry.bicep:
--------------------------------------------------------------------------------
1 | param name string
2 | param location string = resourceGroup().id
3 |
4 | resource containerRegistry 'Microsoft.ContainerRegistry/registries@2022-02-01-preview' = {
5 | name: name
6 | location: location
7 | sku: {
8 | name: 'Standard'
9 | }
10 | properties: {
11 | adminUserEnabled: false
12 | }
13 | }
14 |
15 | output id string = containerRegistry.id
--------------------------------------------------------------------------------
/.infra/deployment/modules/keyvault.bicep:
--------------------------------------------------------------------------------
1 | param name string
2 | param location string = resourceGroup().location
3 | param tenantId string = tenant().tenantId
4 |
5 | resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
6 | name: name
7 | location: location
8 | properties: {
9 | tenantId: tenantId
10 | sku: {
11 | name: 'standard'
12 | family: 'A'
13 | }
14 | accessPolicies: []
15 | enableSoftDelete: true
16 | }
17 | }
18 |
19 | output id string = keyVault.id
--------------------------------------------------------------------------------
/.infra/deployment/modules/role_assignment.bicep:
--------------------------------------------------------------------------------
1 | param principalId string
2 | param principalType string
3 | param roleDefinitionId string
4 |
5 | resource roleDefinition 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = {
6 | scope: resourceGroup()
7 | name: roleDefinitionId
8 | }
9 |
10 | resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
11 | name: guid(resourceGroup().id, principalId, roleDefinition.id)
12 | properties: {
13 | roleDefinitionId: roleDefinition.id
14 | principalId: principalId
15 | principalType: principalType
16 | }
17 | }
--------------------------------------------------------------------------------
/.infra/deployment/modules/storageAccount.bicep:
--------------------------------------------------------------------------------
1 | param name string
2 | param location string = resourceGroup().location
3 |
4 | resource storageAccount 'Microsoft.Storage/storageAccounts@2022-05-01' = {
5 | name: name
6 | location: location
7 | sku: {
8 | name: 'Standard_LRS'
9 | }
10 | kind: 'StorageV2'
11 | properties: {
12 | encryption: {
13 | services: {
14 | blob: {
15 | enabled: true
16 | }
17 | file: {
18 | enabled: true
19 | }
20 | }
21 | keySource: 'Microsoft.Storage'
22 | }
23 | supportsHttpsTrafficOnly: true
24 | minimumTlsVersion: 'TLS1_2'
25 | }
26 | }
27 |
28 | output id string = storageAccount.id
--------------------------------------------------------------------------------
/.infra/pytest_plugins/changed_samples/README.md:
--------------------------------------------------------------------------------
1 | # pytest-changed-samples
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.infra/pytest_plugins/changed_samples/build/lib/pytest_changed_samples/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/.infra/pytest_plugins/changed_samples/build/lib/pytest_changed_samples/__init__.py
--------------------------------------------------------------------------------
/.infra/pytest_plugins/changed_samples/build/lib/pytest_changed_samples/git_utils.py:
--------------------------------------------------------------------------------
1 | from pathlib import Path
2 | from typing import Iterable, Optional
3 |
4 | from git import Repo
5 |
6 |
7 | def get_diff_paths(a: str, b: Optional[str]) -> Iterable[Path]:
8 | """Get a list of paths that have changed between two git refs
9 |
10 | :param str a: The base ref to diff against
11 | :param Optional[str] b: The ending ref to diff against. If "None",
12 | will diff against the working tree
13 | :returns: The list of paths
14 | :rtype: Iterable[Path]
15 | """
16 | repo = Repo(search_parent_directories=True)
17 | repo_path = Path(repo.working_dir).resolve()
18 |
19 | # Diffs that are either in the working tree or staged in the index
20 | changed_files = repo.commit(a).diff(b)
21 |
22 | for c in changed_files:
23 | for p in {c.a_path, c.b_path}:
24 | if p is None:
25 | continue
26 |
27 | yield Path(repo_path, p).resolve()
28 |
29 |
30 | def get_all_modified_paths() -> Iterable[Path]:
31 | """Get paths to all non-committed changes tracked by git
32 |
33 | This list includes files in the working tree and staged in the index
34 |
35 | :returns: List of changed paths
36 | :rtype: Iterable[Path]
37 | """
38 | return get_diff_paths("HEAD", None)
39 |
40 |
41 | def get_branch_diff_paths(ref: str = "main") -> Iterable[Path]:
42 | """Get a list of all paths changed between HEAD and the main branch
43 |
44 | :returns: List of changed paths
45 | :rtype: Iterable[Path]
46 | """
47 | return get_diff_paths("HEAD", ref)
48 |
--------------------------------------------------------------------------------
/.infra/pytest_plugins/changed_samples/pyproject.toml:
--------------------------------------------------------------------------------
1 | [build-system]
2 | requires = ["setuptools"]
3 | build-backend = "setuptools.build_meta"
4 |
5 | [project]
6 | name = "pytest-changed-samples"
7 | version = "0.1.0"
8 | authors = []
9 | readme = "README.md"
10 | classifiers = [
11 | "Development Status :: 4 - Beta",
12 | "Framework :: Pytest",
13 | "Intended Audience :: Developers",
14 | "Topic :: Software Development :: Testing",
15 | "Programming Language :: Python",
16 | "Programming Language :: Python :: 3",
17 | "Programming Language :: Python :: 3.8",
18 | "Programming Language :: Python :: 3.9",
19 | "Programming Language :: Python :: 3.10",
20 | "Programming Language :: Python :: 3.11",
21 | "Programming Language :: Python :: 3 :: Only",
22 | "Programming Language :: Python :: Implementation :: CPython",
23 | "Programming Language :: Python :: Implementation :: PyPy",
24 | "Operating System :: OS Independent",
25 | "License :: OSI Approved :: MIT License",
26 | ]
27 | description = "A Pytest plugin to add the option to only run changed samples"
28 | requires-python = ">=3.8"
29 | dependencies = ["gitpython~=3.0", "pytest>=7.0.0"]
30 |
31 |
32 | [project.entry-points.pytest11]
33 | changed_samples = "pytest_changed_samples.plugin"
34 |
35 | [tool.setuptools.packages.find]
36 | where = ["src"]
37 |
38 | [tool.black]
39 | line-length = 120
40 |
41 | [tool.ruff]
42 | line-length = 120
43 |
--------------------------------------------------------------------------------
/.infra/pytest_plugins/changed_samples/src/pytest_changed_samples.egg-info/PKG-INFO:
--------------------------------------------------------------------------------
1 | Metadata-Version: 2.4
2 | Name: pytest-changed-samples
3 | Version: 0.1.0
4 | Summary: A Pytest plugin to add the option to only run changed samples
5 | Classifier: Development Status :: 4 - Beta
6 | Classifier: Framework :: Pytest
7 | Classifier: Intended Audience :: Developers
8 | Classifier: Topic :: Software Development :: Testing
9 | Classifier: Programming Language :: Python
10 | Classifier: Programming Language :: Python :: 3
11 | Classifier: Programming Language :: Python :: 3.8
12 | Classifier: Programming Language :: Python :: 3.9
13 | Classifier: Programming Language :: Python :: 3.10
14 | Classifier: Programming Language :: Python :: 3.11
15 | Classifier: Programming Language :: Python :: 3 :: Only
16 | Classifier: Programming Language :: Python :: Implementation :: CPython
17 | Classifier: Programming Language :: Python :: Implementation :: PyPy
18 | Classifier: Operating System :: OS Independent
19 | Classifier: License :: OSI Approved :: MIT License
20 | Requires-Python: >=3.8
21 | Description-Content-Type: text/markdown
22 | Requires-Dist: gitpython~=3.0
23 | Requires-Dist: pytest>=7.0.0
24 |
25 | # pytest-changed-samples
26 |
27 |
28 |
--------------------------------------------------------------------------------
/.infra/pytest_plugins/changed_samples/src/pytest_changed_samples.egg-info/SOURCES.txt:
--------------------------------------------------------------------------------
1 | README.md
2 | pyproject.toml
3 | src/pytest_changed_samples/__init__.py
4 | src/pytest_changed_samples/git_utils.py
5 | src/pytest_changed_samples/plugin.py
6 | src/pytest_changed_samples/trie.py
7 | src/pytest_changed_samples.egg-info/PKG-INFO
8 | src/pytest_changed_samples.egg-info/SOURCES.txt
9 | src/pytest_changed_samples.egg-info/dependency_links.txt
10 | src/pytest_changed_samples.egg-info/entry_points.txt
11 | src/pytest_changed_samples.egg-info/requires.txt
12 | src/pytest_changed_samples.egg-info/top_level.txt
--------------------------------------------------------------------------------
/.infra/pytest_plugins/changed_samples/src/pytest_changed_samples.egg-info/dependency_links.txt:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.infra/pytest_plugins/changed_samples/src/pytest_changed_samples.egg-info/entry_points.txt:
--------------------------------------------------------------------------------
1 | [pytest11]
2 | changed_samples = pytest_changed_samples.plugin
3 |
--------------------------------------------------------------------------------
/.infra/pytest_plugins/changed_samples/src/pytest_changed_samples.egg-info/requires.txt:
--------------------------------------------------------------------------------
1 | gitpython~=3.0
2 | pytest>=7.0.0
3 |
--------------------------------------------------------------------------------
/.infra/pytest_plugins/changed_samples/src/pytest_changed_samples.egg-info/top_level.txt:
--------------------------------------------------------------------------------
1 | pytest_changed_samples
2 |
--------------------------------------------------------------------------------
/.infra/pytest_plugins/changed_samples/src/pytest_changed_samples/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/.infra/pytest_plugins/changed_samples/src/pytest_changed_samples/__init__.py
--------------------------------------------------------------------------------
/.infra/pytest_plugins/changed_samples/src/pytest_changed_samples/git_utils.py:
--------------------------------------------------------------------------------
1 | from pathlib import Path
2 | from typing import Iterable, Optional
3 |
4 | from git import Repo
5 |
6 |
7 | def get_diff_paths(a: str, b: Optional[str]) -> Iterable[Path]:
8 | """Get a list of paths that have changed between two git refs
9 |
10 | :param str a: The base ref to diff against
11 | :param Optional[str] b: The ending ref to diff against. If "None",
12 | will diff against the working tree
13 | :returns: The list of paths
14 | :rtype: Iterable[Path]
15 | """
16 | repo = Repo(search_parent_directories=True)
17 | repo_path = Path(repo.working_dir).resolve()
18 |
19 | # Diffs that are either in the working tree or staged in the index
20 | changed_files = repo.commit(a).diff(b)
21 |
22 | for c in changed_files:
23 | for p in {c.a_path, c.b_path}:
24 | if p is None:
25 | continue
26 |
27 | yield Path(repo_path, p).resolve()
28 |
29 |
30 | def get_all_modified_paths() -> Iterable[Path]:
31 | """Get paths to all non-committed changes tracked by git
32 |
33 | This list includes files in the working tree and staged in the index
34 |
35 | :returns: List of changed paths
36 | :rtype: Iterable[Path]
37 | """
38 | return get_diff_paths("HEAD", None)
39 |
40 |
41 | def get_branch_diff_paths(ref: str = "main") -> Iterable[Path]:
42 | """Get a list of all paths changed between HEAD and the main branch
43 |
44 | :returns: List of changed paths
45 | :rtype: Iterable[Path]
46 | """
47 | return get_diff_paths("HEAD", ref)
48 |
--------------------------------------------------------------------------------
/.pre-commit-config.yaml:
--------------------------------------------------------------------------------
1 | # See https://pre-commit.com for more information
2 | # See https://pre-commit.com/hooks.html for more hooks
3 | repos:
4 | - repo: https://github.com/pre-commit/pre-commit-hooks
5 | rev: v3.2.0
6 | hooks:
7 | - id: check-added-large-files
8 | - repo: local
9 | hooks:
10 | - id: nb-clean
11 | name: nb-clean
12 | description: "Clean Jupyter notebooks of outputs, metadata, and empty cells, with Git integration"
13 | entry: python
14 | require_serial: true
15 | language: system
16 | types_or: [jupyter]
17 | minimum_pre_commit_version: 2.9.2
18 | args: ["-m", "tox", "-qqq", "run", "-e", "nb-clean", "--", "clean", "--preserve-cell-metadata", "tags", "--"]
19 | - id: ruff
20 | name: ruff
21 | description: "Run 'ruff' for extremely fast Python linting"
22 | entry: tox -qqq run -e ruff -- check --force-exclude
23 | language: python
24 | types_or: [python, pyi, jupyter]
25 | require_serial: true
26 | additional_dependencies: []
27 | minimum_pre_commit_version: "2.9.2"
28 | args: ["--fix", "--exit-non-zero-on-fix"]
29 | - id: black
30 | name: black
31 | description: "Black: The uncompromising Python code formatter"
32 | minimum_pre_commit_version: 2.9.2
33 | require_serial: true
34 | types_or: [python, pyi, jupyter]
35 | entry: python
36 | language: system
37 | args: ["-m", "tox", "-qqq", "run", "-e", "black", "--"]
38 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Microsoft Open Source Code of Conduct
2 |
3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4 |
5 | Resources:
6 |
7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
10 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2025 Microsoft Corporation
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Azure AI Foundry Documentation Samples
2 |
3 | This repository acts as the top-level directory for official Azure AI Foundry documentation sample code and examples. It includes notebooks and sample code that contain end-to-end examples as well as smaller code snippets for common developer tasks.
4 |
5 | This repository is entirely open source, guidance on how to contribute and links to additional repositories are provided below.
6 |
7 | Use the samples in this repository to try out Azure AI Foundry scenarios on your local machine!
8 |
9 | ## Contributing
10 |
11 | We welcome contributions and suggestions! Please see the [contributing guidelines] for details.
12 |
13 |
--------------------------------------------------------------------------------
/SUPPORT.md:
--------------------------------------------------------------------------------
1 | # TODO: The maintainer of this repo has not yet edited this file
2 |
3 | **REPO OWNER**: Do you want Customer Service & Support (CSS) support for this product/project?
4 |
5 | - **No CSS support:** Fill out this template with information about how to file issues and get help.
6 | - **Yes CSS support:** Fill out an intake form at [aka.ms/onboardsupport](https://aka.ms/onboardsupport). CSS will work with/help you to determine next steps.
7 | - **Not sure?** Fill out an intake as though the answer were "Yes". CSS will help you decide.
8 |
9 | *Then remove this first heading from this SUPPORT.MD file before publishing your repo.*
10 |
11 | # Support
12 |
13 | ## How to file issues and get help
14 |
15 | This project uses GitHub Issues to track bugs and feature requests. Please search the existing
16 | issues before filing new issues to avoid duplicates. For new issues, file your bug or
17 | feature request as a new Issue.
18 |
19 | For help and questions about using this project, please **REPO MAINTAINER: INSERT INSTRUCTIONS HERE
20 | FOR HOW TO ENGAGE REPO OWNERS OR COMMUNITY FOR HELP. COULD BE A STACK OVERFLOW TAG OR OTHER
21 | CHANNEL. WHERE WILL YOU HELP PEOPLE?**.
22 |
23 | ## Microsoft Support Policy
24 |
25 | Support for this **PROJECT or PRODUCT** is limited to the resources listed above.
26 |
--------------------------------------------------------------------------------
/azure_ai_projects_onedp-1.0.0a20250423005-py3-none-any.whl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/azure_ai_projects_onedp-1.0.0a20250423005-py3-none-any.whl
--------------------------------------------------------------------------------
/dev-requirements.txt:
--------------------------------------------------------------------------------
1 | tox ~= 4.0
2 | pre-commit ~= 3.0
3 | python-dotenv ~= 1.0
4 | pytest ~= 8.0
5 | pytest-iovis[papermill] == 0.1.0
6 | ipykernel ~= 6.0
7 | .infra/pytest_plugins/changed_samples
8 |
--------------------------------------------------------------------------------
/libs/azure_ai_agents-1.0.0a20250430003-py3-none-any.whl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/libs/azure_ai_agents-1.0.0a20250430003-py3-none-any.whl
--------------------------------------------------------------------------------
/libs/azure_ai_projects-1.0.0b10-py3-none-any.whl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/libs/azure_ai_projects-1.0.0b10-py3-none-any.whl
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "foundry-samples",
3 | "lockfileVersion": 3,
4 | "requires": true,
5 | "packages": {}
6 | }
7 |
--------------------------------------------------------------------------------
/samples/agent-catalog/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/README.md:
--------------------------------------------------------------------------------
1 | ## Agent Catalog - 3P Agent Samples
2 |
3 | This folder contains Third-Party Agent code samples.
4 |
5 | **IMPORTANT NOTE:** Starter templates, instructions, code samples and resources in this 3P-agent-samples file (“samples”) are designed to assist in accelerating development of agents for specific scenarios. It is important that you review all provided resources and carefully test Agent behavior in the context of your use case: ([Learn more](https://learn.microsoft.com/en-us/legal/cognitive-services/agents/transparency-note?context=%2Fazure%2Fai-services%2Fagents%2Fcontext%2Fcontext)).
6 |
7 | Certain Agent offerings may be subject to legal and regulatory requirements, may require licenses, or may not be suitable for all industries, scenarios, or use cases. By using any sample, you are acknowledging that Agents or other output created using that sample are solely your responsibility, and that you will comply with all applicable laws, regulations, and relevant safety standards, terms of service, and codes of conduct.
8 |
9 | **WARNING:** The samples in this 3P-agent-samples folder were created by third parties, not Microsoft, and have not been tested or verified by Microsoft. Your use is subject to the terms provided by the relevant third party. By using any third-party sample in this file, you are acknowledging that Microsoft has no responsibility to you or others with respect to these samples.
10 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/README.md:
--------------------------------------------------------------------------------
1 | ## Agent Catalog - 3P Agent Samples for Azure AI Foundry Agent Service SDK
2 |
3 | This folder contains Third-Party Agent code samples for Azure Ai Foundry Service SDK.
4 |
5 | **IMPORTANT NOTE:** Starter templates, instructions, code samples and resources in this 3P-agent-samples file (“samples”) are designed to assist in accelerating development of agents for specific scenarios. It is important that you review all provided resources and carefully test Agent behavior in the context of your use case: ([Learn more](https://learn.microsoft.com/en-us/legal/cognitive-services/agents/transparency-note?context=%2Fazure%2Fai-services%2Fagents%2Fcontext%2Fcontext)).
6 |
7 | Certain Agent offerings may be subject to legal and regulatory requirements, may require licenses, or may not be suitable for all industries, scenarios, or use cases. By using any sample, you are acknowledging that Agents or other output created using that sample are solely your responsibility, and that you will comply with all applicable laws, regulations, and relevant safety standards, terms of service, and codes of conduct.
8 |
9 | **WARNING:** The samples in this 3P-agent-samples folder were created by third parties, not Microsoft, and have not been tested or verified by Microsoft. Your use is subject to the terms provided by the relevant third party. By using any third-party sample in this file, you are acknowledging that Microsoft has no responsibility to you or others with respect to these samples.
10 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/auquan/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2025 Auquan Ltd.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/auquan/assets/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/marqueeinsights-news-agent/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2025 trebgatte
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/marqueeinsights-news-agent/assets/architecture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/marqueeinsights-news-agent/assets/architecture.png
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/marqueeinsights-news-agent/python/requirements.txt:
--------------------------------------------------------------------------------
1 | azure-ai-agents
2 | azure-identity
3 | python-dotenv
4 |
5 | # test runner
6 | pytest>=7.0.0
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/marqueeinsights-news-agent/python/template.py:
--------------------------------------------------------------------------------
1 | import os
2 | from dotenv import load_dotenv
3 | from azure.identity import DefaultAzureCredential
4 | from azure.ai.agents import AgentsClient
5 | from azure.ai.agents.models import BingGroundingTool
6 |
7 | # Load environment variables from .env file
8 | load_dotenv()
9 |
10 | # Configuration from environment
11 | PROJECT_ENDPOINT = os.getenv("PROJECT_ENDPOINT")
12 | MODEL_DEPLOYMENT_NAME = os.getenv("MODEL_DEPLOYMENT_NAME")
13 | BING_CONNECTION_ID = os.getenv("BING_CONNECTION_ID")
14 |
15 | # Validate configuration
16 | if not all([PROJECT_ENDPOINT, MODEL_DEPLOYMENT_NAME, BING_CONNECTION_ID]):
17 | raise ValueError("Missing one or more environment variables: PROJECT_ENDPOINT, MODEL_DEPLOYMENT_NAME, BING_CONNECTION_ID")
18 |
19 | # Initialize the Agents client
20 | agents_client = AgentsClient(
21 | endpoint=PROJECT_ENDPOINT,
22 | credential=DefaultAzureCredential(),
23 | )
24 |
25 | # Load system prompt instructions
26 | with open("system_prompt.txt", "r", encoding="utf-8") as f:
27 | instructions = f.read().strip()
28 |
29 | # Initialize the Bing Grounding tool
30 | bing_tool = BingGroundingTool(connection_id=BING_CONNECTION_ID)
31 |
32 | # Create or update the AI News agent
33 | with agents_client:
34 | agent = agents_client.create_agent(
35 | model=MODEL_DEPLOYMENT_NAME,
36 | name="ai-news",
37 | instructions=instructions,
38 | tools=bing_tool.definitions,
39 | )
40 |
41 | print(f"AI News agent created with ID: {agent.id}")
42 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/marqueeinsights-news-agent/sample_data/example_bing_response.json:
--------------------------------------------------------------------------------
1 | {
2 | "value": [
3 | {
4 | "name": "Microsoft Launches Azure AI Health Insights",
5 | "url": "https://news.microsoft.com/health-insights-launch",
6 | "datePublished": "2025-05-07T10:00:00-07:00",
7 | "description": "Microsoft announced a new Azure AI service aimed at improving diagnostic workflows and predictive analytics in healthcare."
8 | },
9 | {
10 | "name": "Stanford Researchers Publish Legal AI Risk Guidelines",
11 | "url": "https://law.stanford.edu/legal-ai-guidelines",
12 | "datePublished": "2025-05-07T12:00:00-07:00",
13 | "description": "Stanford Law School released a comprehensive framework for assessing risks in AI tools used within legal practice."
14 | }
15 | ]
16 | }
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/marqueeinsights-news-agent/system_prompt.txt:
--------------------------------------------------------------------------------
1 | ## System Prompt
2 |
3 | The system prompt defines the agent’s core behavior and enforces constraints on source filtering, prioritization, summarization, and output formatting. Create a `system_prompt.txt` file in your repo root with content like this:
4 |
5 | ```text
6 | You are an AI agent named "AI News." Your task is to:
7 | 1. Query Bing News for AI developments reported in the past 24 hours Pacific Time.
8 | 2. Filter out any articles not from your list of credible domains.
9 | 3. Prioritize the results in this order:
10 | a. Articles mentioning both Microsoft and Healthcare.
11 | b. Articles mentioning both Microsoft and Legal.
12 | c. Articles mentioning Healthcare alone.
13 | d. Articles mentioning Legal alone.
14 | 4. Summarize each selected development in one or two sentences, focusing on its implications for the Microsoft ecosystem, Healthcare, and Legal sectors.
15 | 5. Format the final output as a Markdown table with columns: Headline, Date, Summary, Implications, Link. Limit to 10 rows; if more are found, consolidate extras into a single line item.
16 | 6. Do not include any commentary outside the table.
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/mihcm-hr-assist-agent/.gitignore:
--------------------------------------------------------------------------------
1 | #Environments
2 | .env
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/mihcm-hr-assist-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/mihcm-hr-assist-agent/ArchitectureOverview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/mihcm-hr-assist-agent/ArchitectureOverview.png
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/mihcm-hr-assist-agent/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2025 HR Assist Agent
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/mihcm-hr-assist-agent/modules-mi-agent/add-capability-host.bicep:
--------------------------------------------------------------------------------
1 | @description('AI hub name')
2 | param aiHubName string
3 |
4 | @description('AI project name')
5 | param aiProjectName string
6 |
7 | @description('Name for ACS connection.')
8 | param aoaiConnectionName string
9 |
10 | @description('Name for capabilityHost.')
11 | param capabilityHostName string
12 |
13 | var storageConnections = ['${aiProjectName}/workspaceblobstore']
14 | var aiServiceConnections = ['${aoaiConnectionName}']
15 |
16 | resource aiHub 'Microsoft.MachineLearningServices/workspaces@2024-10-01-preview' existing = {
17 | name: aiHubName
18 | }
19 |
20 | resource aiProject 'Microsoft.MachineLearningServices/workspaces@2024-10-01-preview' existing = {
21 | name: aiProjectName
22 | }
23 |
24 | #disable-next-line BCP081
25 | resource hubCapabilityHost 'Microsoft.MachineLearningServices/workspaces/capabilityHosts@2024-10-01-preview' = {
26 | name: '${aiHubName}-${capabilityHostName}'
27 | parent: aiHub
28 | properties: {
29 | capabilityHostKind: 'Agents'
30 | }
31 | }
32 |
33 | #disable-next-line BCP081
34 | resource projectCapabilityHost 'Microsoft.MachineLearningServices/workspaces/capabilityHosts@2024-10-01-preview' = {
35 | name: '${aiProjectName}-${capabilityHostName}'
36 | parent: aiProject
37 | properties: {
38 | capabilityHostKind: 'Agents'
39 | aiServicesConnections: aiServiceConnections
40 | storageConnections: storageConnections
41 | }
42 | dependsOn: [
43 | hubCapabilityHost
44 | ]
45 | }
46 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/mihcm-hr-assist-agent/requirements.txt:
--------------------------------------------------------------------------------
1 | azure-identity==1.19.0
2 | python-dotenv==1.0.1
3 | azure-ai-projects==1.0.0b7
4 | jsonref==1.1.0
5 | # azure-ai-agents
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/saifr-comm-compliance-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/saifr-comm-compliance-agent/Saifr_Logo_Official_Registered trademark_RGB.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/saifr-comm-compliance-agent/Saifr_Logo_Official_Registered trademark_RGB.jpg
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/saifr-comm-compliance-agent/architecture_overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/saifr-comm-compliance-agent/architecture_overview.png
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/saifr-comm-compliance-agent/python/requirements.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/saifr-comm-compliance-agent/python/requirements.txt
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2025 Sight Machine
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/assets/demo_arch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/assets/demo_arch.png
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/assets/sm_arch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/assets/sm_arch.png
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/infra/LICENSE:
--------------------------------------------------------------------------------
1 | This folder includes code originally obtained from
2 | https://github.com/Azure-Samples/azure-functions-ai-services-agent-python
3 | and is used under the terms of the MIT License.
4 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/infra/agent/ai-search-role-assignments.bicep:
--------------------------------------------------------------------------------
1 | // Assigns the necessary roles to the AI project
2 |
3 | param aiSearchName string
4 | param aiProjectPrincipalId string
5 | param aiProjectId string
6 |
7 | resource searchService 'Microsoft.Search/searchServices@2024-06-01-preview' existing = {
8 | name: aiSearchName
9 | scope: resourceGroup()
10 | }
11 |
12 | // search roles
13 | resource searchIndexDataContributorRole 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = {
14 | name: '8ebe5a00-799e-43f5-93ac-243d3dce84a7'
15 | scope: resourceGroup()
16 | }
17 |
18 | resource searchIndexDataContributorAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
19 | scope: searchService
20 | name: guid(aiProjectId, searchIndexDataContributorRole.id, searchService.id)
21 | properties: {
22 | principalId: aiProjectPrincipalId
23 | roleDefinitionId: searchIndexDataContributorRole.id
24 | principalType: 'ServicePrincipal'
25 | }
26 | }
27 |
28 | resource searchServiceContributorRole 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = {
29 | name: '7ca78c08-252a-4471-8644-bb5ff32d4ba0'
30 | scope: resourceGroup()
31 | }
32 |
33 | resource searchServiceContributorRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
34 | scope: searchService
35 | name: guid(aiProjectId, searchServiceContributorRole.id, searchService.id)
36 | properties: {
37 | principalId: aiProjectPrincipalId
38 | roleDefinitionId: searchServiceContributorRole.id
39 | principalType: 'ServicePrincipal'
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/infra/app/storage-Access.bicep:
--------------------------------------------------------------------------------
1 | param principalID string
2 | param principalType string = 'ServicePrincipal' // Workaround for https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-template#new-service-principal
3 | param roleDefinitionID string
4 | param storageAccountName string
5 |
6 | resource storageAccount 'Microsoft.Storage/storageAccounts@2023-05-01' existing = {
7 | name: storageAccountName
8 | }
9 |
10 | // Allow access from API to storage account using a managed identity and least priv Storage roles
11 | resource storageRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
12 | name: guid(storageAccount.id, principalID, roleDefinitionID)
13 | scope: storageAccount
14 | properties: {
15 | roleDefinitionId: resourceId('Microsoft.Authorization/roleDefinitions', roleDefinitionID)
16 | principalId: principalID
17 | principalType: principalType
18 | }
19 | }
20 |
21 | output ROLE_ASSIGNMENT_NAME string = storageRoleAssignment.name
22 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/infra/core/host/appserviceplan.bicep:
--------------------------------------------------------------------------------
1 | param name string
2 | param location string = resourceGroup().location
3 | param tags object = {}
4 |
5 | param kind string = ''
6 | param reserved bool = true
7 | param sku object
8 |
9 | resource appServicePlan 'Microsoft.Web/serverfarms@2023-12-01' = {
10 | name: name
11 | location: location
12 | tags: tags
13 | sku: sku
14 | kind: kind
15 | properties: {
16 | reserved: reserved
17 | }
18 | }
19 |
20 | output id string = appServicePlan.id
21 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/infra/core/identity/userAssignedIdentity.bicep:
--------------------------------------------------------------------------------
1 | param identityName string
2 | param location string
3 | param tags object = {}
4 |
5 | resource userAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-07-31-preview' = {
6 | name: identityName
7 | location: location
8 | tags: tags
9 | }
10 |
11 | output identityId string = userAssignedIdentity.id
12 | output identityName string = userAssignedIdentity.name
13 | output identityPrincipalId string = userAssignedIdentity.properties.principalId
14 | output identityClientId string = userAssignedIdentity.properties.clientId
15 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/infra/core/monitor/appinsights-access.bicep:
--------------------------------------------------------------------------------
1 | param principalID string
2 | param roleDefinitionID string
3 | param appInsightsName string
4 |
5 | resource applicationInsights 'Microsoft.Insights/components@2020-02-02' existing = {
6 | name: appInsightsName
7 | }
8 |
9 | // Allow access from API to app insights using a managed identity and least priv role
10 | resource appInsightsRoleAssignment 'Microsoft.Authorization/roleAssignments@2020-04-01-preview' = {
11 | name: guid(applicationInsights.id, principalID, roleDefinitionID)
12 | scope: applicationInsights
13 | properties: {
14 | roleDefinitionId: resourceId('Microsoft.Authorization/roleDefinitions', roleDefinitionID)
15 | principalId: principalID
16 | principalType: 'ServicePrincipal' // Workaround for https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-template#new-service-principal
17 | }
18 | }
19 |
20 | output ROLE_ASSIGNMENT_NAME string = appInsightsRoleAssignment.name
21 |
22 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/infra/core/monitor/applicationinsights.bicep:
--------------------------------------------------------------------------------
1 | param name string
2 | param location string = resourceGroup().location
3 | param tags object = {}
4 |
5 | param logAnalyticsWorkspaceId string
6 | param disableLocalAuth bool = false
7 |
8 | resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = {
9 | name: name
10 | location: location
11 | tags: tags
12 | kind: 'web'
13 | properties: {
14 | Application_Type: 'web'
15 | WorkspaceResourceId: logAnalyticsWorkspaceId
16 | DisableLocalAuth: disableLocalAuth
17 | }
18 | }
19 |
20 | output connectionString string = applicationInsights.properties.ConnectionString
21 | output instrumentationKey string = applicationInsights.properties.InstrumentationKey
22 | output name string = applicationInsights.name
23 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/infra/core/monitor/loganalytics.bicep:
--------------------------------------------------------------------------------
1 | param name string
2 | param location string = resourceGroup().location
3 | param tags object = {}
4 |
5 | resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2021-12-01-preview' = {
6 | name: name
7 | location: location
8 | tags: tags
9 | properties: any({
10 | retentionInDays: 30
11 | features: {
12 | searchVersion: 1
13 | }
14 | sku: {
15 | name: 'PerGB2018'
16 | }
17 | })
18 | }
19 |
20 | output id string = logAnalytics.id
21 | output name string = logAnalytics.name
22 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/infra/core/monitor/monitoring.bicep:
--------------------------------------------------------------------------------
1 | param logAnalyticsName string
2 | param applicationInsightsName string
3 | param location string = resourceGroup().location
4 | param tags object = {}
5 | param disableLocalAuth bool = false
6 |
7 | module logAnalytics 'loganalytics.bicep' = {
8 | name: 'loganalytics'
9 | params: {
10 | name: logAnalyticsName
11 | location: location
12 | tags: tags
13 | }
14 | }
15 |
16 | module applicationInsights 'applicationinsights.bicep' = {
17 | name: 'applicationinsights'
18 | params: {
19 | name: applicationInsightsName
20 | location: location
21 | tags: tags
22 | logAnalyticsWorkspaceId: logAnalytics.outputs.id
23 | disableLocalAuth: disableLocalAuth
24 | }
25 | }
26 |
27 | output applicationInsightsConnectionString string = applicationInsights.outputs.connectionString
28 | output applicationInsightsInstrumentationKey string = applicationInsights.outputs.instrumentationKey
29 | output applicationInsightsName string = applicationInsights.outputs.name
30 | output logAnalyticsWorkspaceId string = logAnalytics.outputs.id
31 | output logAnalyticsWorkspaceName string = logAnalytics.outputs.name
32 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/infra/core/storage/storage-account.bicep:
--------------------------------------------------------------------------------
1 | param name string
2 | param location string = resourceGroup().location
3 | param tags object = {}
4 |
5 | param allowBlobPublicAccess bool = false
6 | param containers array = []
7 | param kind string = 'StorageV2'
8 | param minimumTlsVersion string = 'TLS1_2'
9 | param sku object = { name: 'Standard_LRS' }
10 | param networkAcls object = {
11 | bypass: 'AzureServices'
12 | defaultAction: 'Allow'
13 | }
14 |
15 | resource storage 'Microsoft.Storage/storageAccounts@2023-05-01' = {
16 | name: name
17 | location: location
18 | tags: tags
19 | kind: kind
20 | sku: sku
21 | properties: {
22 | minimumTlsVersion: minimumTlsVersion
23 | allowBlobPublicAccess: allowBlobPublicAccess
24 | allowSharedKeyAccess: false
25 | networkAcls: networkAcls
26 | }
27 |
28 | resource blobServices 'blobServices' = if (!empty(containers)) {
29 | name: 'default'
30 | resource container 'containers' = [for container in containers: {
31 | name: container.name
32 | properties: {
33 | publicAccess: container.?publicAccess ?? 'None'
34 | }
35 | }]
36 | }
37 |
38 | resource queueServices 'queueServices' = {
39 | name: 'default'
40 | resource queue 'queues' = [for queueName in ['nameinputqueue', 'nameoutputqueue', 'datainputqueue', 'dataoutputqueue', 'predinputqueue', 'predoutputqueue',]: {
41 | name: queueName
42 | }]
43 | }
44 | }
45 |
46 | output name string = storage.name
47 | output primaryEndpoints object = storage.properties.primaryEndpoints
48 | output id string = storage.id
49 |
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/infra/scripts/createlocalsettings.ps1:
--------------------------------------------------------------------------------
1 | $ErrorActionPreference = "Stop"
2 |
3 | if (-not (Test-Path ".\python\local.settings.json")) {
4 |
5 | $output = azd env get-values
6 |
7 | # Parse the output to get the endpoint values
8 | foreach ($line in $output) {
9 | if ($line -match "PROJECT_CONNECTION_STRING"){
10 | $AIProjectConnectionString = ($line -split "=")[1] -replace '"',''
11 | }
12 | if ($line -match "STORAGE_CONNECTION__queueServiceUri"){
13 | $StorageConnectionQueue = ($line -split "=")[1] -replace '"',''
14 | }
15 | }
16 |
17 | @{
18 | "IsEncrypted" = "false";
19 | "Values" = @{
20 | "AzureWebJobsStorage" = "UseDevelopmentStorage=true";
21 | "FUNCTIONS_WORKER_RUNTIME" = "python";
22 | "PROJECT_CONNECTION_STRING" = "$AIProjectConnectionString";
23 | "STORAGE_CONNECTION__queueServiceUri" = "$StorageConnectionQueue";
24 | }
25 | } | ConvertTo-Json | Out-File -FilePath ".\python\local.settings.json" -Encoding ascii
26 | }
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/infra/scripts/createlocalsettings.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | if [ ! -f "./python/local.settings.json" ]; then
6 |
7 | output=$(azd env get-values)
8 |
9 | # Initialize variables
10 | AIProjectConnectionString=""
11 | StorageConnectionQueue=""
12 |
13 | # Parse the output to get the endpoint URLs
14 | while IFS= read -r line; do
15 | if [[ $line == *"PROJECT_CONNECTION_STRING"* ]]; then
16 | AIProjectConnectionString=$(echo "$line" | cut -d '=' -f 2 | tr -d '"')
17 | fi
18 | if [[ $line == *"STORAGE_CONNECTION__queueServiceUri"* ]]; then
19 | StorageConnectionQueue=$(echo "$line" | cut -d '=' -f 2 | tr -d '"')
20 | fi
21 | done <<< "$output"
22 |
23 | cat < ./python/local.settings.json
24 | {
25 | "IsEncrypted": "false",
26 | "Values": {
27 | "AzureWebJobsStorage": "UseDevelopmentStorage=true",
28 | "FUNCTIONS_WORKER_RUNTIME": "python",
29 | "PROJECT_CONNECTION_STRING": "$AIProjectConnectionString",
30 | "STORAGE_CONNECTION__queueServiceUri": "$StorageConnectionQueue"
31 | }
32 | }
33 | EOF
34 |
35 | fi
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/python/host.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0",
3 | "logging": {
4 | "applicationInsights": {
5 | "samplingSettings": {
6 | "isEnabled": true,
7 | "excludedTypes": "Request"
8 | }
9 | }
10 | },
11 | "extensionBundle": {
12 | "id": "Microsoft.Azure.Functions.ExtensionBundle",
13 | "version": "[4.*, 5.0.0)"
14 | },
15 | "extensions": {
16 | "queues": {
17 | "maxPollingInterval": "00:00:02",
18 | "visibilityTimeout" : "00:00:30",
19 | "batchSize": 16,
20 | "maxDequeueCount": 5,
21 | "messageEncoding": "base64"
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/samples/agent-catalog/3p-agent-samples/foundry-agent-service-sdk/sightmachine-filler-optimization-agent/python/requirements.txt:
--------------------------------------------------------------------------------
1 | # DO NOT include azure-functions-worker in this file
2 | # The Python Worker is managed by Azure Functions platform
3 | # Manually managing azure-functions-worker may cause unexpected issues
4 |
5 | azure-functions
6 | azure-ai-projects
7 | azure-storage-queue
8 | azure-identity
9 | pandas
--------------------------------------------------------------------------------
/samples/agent-catalog/aifoundry-agent-designer-win32-x64-0.0.29.vsix:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/aifoundry-agent-designer-win32-x64-0.0.29.vsix
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/README.md:
--------------------------------------------------------------------------------
1 | ## Agent Catalog - Microsoft-authored Agent Samples
2 |
3 | This folder contains Microsoft-authored Agent code samples for the Azure AI Agent Service SDK and the Semantic Kernel SDK.
4 |
5 | **IMPORTANT NOTE:** Starter templates, instructions, code samples and resources in this msft-agent-samples file (“samples”) are designed to assist in accelerating development of agents for specific scenarios. It is important that you review all provided resources and carefully test Agent behavior in the context of your use case: ([Learn More](https://learn.microsoft.com/en-us/legal/cognitive-services/agents/transparency-note?context=%2Fazure%2Fai-services%2Fagents%2Fcontext%2Fcontext)).
6 |
7 | Certain Agent offerings may be subject to legal and regulatory requirements, may require licenses, or may not be suitable for all industries, scenarios, or use cases. By using any sample, you are acknowledging that Agents or other output created using that sample are solely your responsibility, and that you will comply with all applicable laws, regulations, and relevant safety standards, terms of service, and codes of conduct.
8 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/README.md:
--------------------------------------------------------------------------------
1 | ## Agent Catalog - Microsoft-authored Agent Samples for Azure AI Foundry Agent Service SDK
2 |
3 | This folder contains Microsoft-authored Agent code samples for the Azure AI Foundry Agent Service SDK
4 |
5 | **IMPORTANT NOTE:** Starter templates, instructions, code samples and resources in this msft-agent-samples file (“samples”) are designed to assist in accelerating development of agents for specific scenarios. It is important that you review all provided resources and carefully test Agent behavior in the context of your use case: ([Learn More](https://learn.microsoft.com/en-us/legal/cognitive-services/agents/transparency-note?context=%2Fazure%2Fai-services%2Fagents%2Fcontext%2Fcontext)).
6 |
7 | Certain Agent offerings may be subject to legal and regulatory requirements, may require licenses, or may not be suitable for all industries, scenarios, or use cases. By using any sample, you are acknowledging that Agents or other output created using that sample are solely your responsibility, and that you will comply with all applicable laws, regulations, and relevant safety standards, terms of service, and codes of conduct.
8 |
9 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/browser-automation-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/commspilot/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/commspilot/deployments/bing-grounding.bicep:
--------------------------------------------------------------------------------
1 | param account_name string
2 | param location string = 'global'
3 | var bingSearchName = 'bingsearch-${account_name}'
4 |
5 | resource accountResource 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' existing = {
6 | name: account_name
7 | scope: resourceGroup()
8 | }
9 |
10 | resource bingSearch 'Microsoft.Bing/accounts@2020-06-10' = {
11 | name: bingSearchName
12 | location: location
13 | sku: {
14 | name: 'G1'
15 | }
16 | kind: 'Bing.Grounding'
17 | }
18 |
19 | resource bingConnection 'Microsoft.CognitiveServices/accounts/connections@2025-04-01-preview' = {
20 | name: '${account_name}-bingsearchconnection'
21 | parent: accountResource
22 | properties: {
23 | category: 'ApiKey'
24 | target: 'https://api.bing.microsoft.com/'
25 | authType: 'ApiKey'
26 | credentials: {
27 | key: listKeys(bingSearch.id, '2020-06-10').key1
28 | }
29 | isSharedToAll: true
30 | metadata: {
31 | ApiType: 'Azure'
32 | Location: bingSearch.location
33 | ResourceId: bingSearch.id
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/customer-service-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/customer-service-agent/assets/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/customer-service-agent/core/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/customer-service-agent/core/RoutingAgent.agent:
--------------------------------------------------------------------------------
1 | # AI Foundry Agent Definition
2 | name: RoutingAgent
3 | description: ROutes the issue to the appropriate support team based on the issue description
4 | model: gpt-4o
5 | instructions: |-
6 | You are an assistant that routes the issue to the appropriate support team based on the issue user is facing.
7 | Before routing the issue to appropriate team, summarise the issue that user said he is facing and exclude any other details like trouble shooting steps or escalation steps.
8 |
9 | Here are the available teams and their fuctions:
10 | - Windows Activation Support: Windows license activation issues
11 | - Windows Support: Windows related issues
12 | - Azure Support: Azure related issues
13 | - Network Support: Network related issues
14 | - Hardware Support: Hardware related issues
15 | - Microsoft office Support: Microsoft Office related issues
16 | - General Support: General issues not related to the above categories
17 | top_p: 0
18 | temperature: 0
19 | tools: []
20 | tool_resources: {}
21 | events: []
22 | inputs: []
23 | outputs:
24 | - type: llm
25 | schema:
26 | type: string
27 | name: TeamName
28 | description: The name of the support team to route the issue to
29 | - type: llm
30 | schema:
31 | type: string
32 | name: IssueDescription
33 | description: The description of the issue
34 | system_prompts: {}
35 | response_format: auto
36 | id: asst_6lyvxePlkIpIpFdoloZsTUCE
37 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/customer-service-agent/core/SelfServiceAgent.agent:
--------------------------------------------------------------------------------
1 | # AI Foundry Agent Definition
2 | name: SelfServiceAgent
3 | description: Provides automated troubleshooting steps to resolve common issues
4 | model: gpt-4o
5 | instructions: |-
6 | You are a helpful assistant that provides automated troubleshooting steps based on your available knowledge base to help resolve user issues.
7 | If you are unable to resolve the user's issue on your own, then escalate.
8 | top_p: 0
9 | temperature: 0
10 | tools:
11 | - type: file_search
12 | tool_resources:
13 | file_search:
14 | vector_store_ids:
15 | - vs_tRnlhMp3GCWe9hPrzySxboy5
16 | events:
17 | - type: llm
18 | name: escalate
19 | condition: if the issue is not related to Windows license activation or if you are unable to provide adequate troubleshooting steps
20 | - type: llm
21 | name: issue_resolved
22 | condition: If adequate troubleshooting steps are provided that resolved user issue
23 | inputs: []
24 | outputs:
25 | - type: llm
26 | schema:
27 | type: string
28 | name: IssueDescription
29 | description: Summary of the issue
30 | - type: llm
31 | schema:
32 | type: string
33 | name: AttemptedResolutionSteps
34 | description: Attempted steps taken to resolve the issue
35 | system_prompts: {}
36 | response_format: auto
37 | id: asst_ZyLKr9JolJbcyY6QpJ9HZUyw
38 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/customer-service-agent/core/WindowsSupport.agent:
--------------------------------------------------------------------------------
1 | # AI Foundry Agent Definition
2 | name: WindowsSupport
3 | description: Expert agent for Windows topic
4 | model: gpt-4o
5 | instructions: |-
6 | You are a helpful windows support agent that provides automated troubleshooting steps to resolve common Windows issues. Use the available files as your knowledge base to help resolve user issues.
7 | If you are unable to resolve the issue, then hand off to human support team.
8 | If you are able to provide adequate troubleshooting steps that resolved user issue, then mark the issue as resolved.
9 |
10 | Here is the issue description provided by the user:
11 | {{IssueDescription}}
12 | top_p: 0
13 | temperature: 0
14 | tools:
15 | - type: file_search
16 | tool_resources:
17 | file_search:
18 | vector_store_ids:
19 | - vs_vUIhIxSbIzMWvM4tMEOpRuhM
20 | events:
21 | - type: llm
22 | name: handoff_to_human_support_team
23 | condition: if the issue is not resolved or if you are unable to provide adequate troubleshooting steps
24 | - type: llm
25 | name: issue_resolved
26 | condition: If adequate troubleshooting steps are provided that resolved user issue
27 | inputs:
28 | - type: llm
29 | name: IssueDescription
30 | description: The issue description provided by the user
31 | outputs:
32 | - type: llm
33 | schema:
34 | type: string
35 | name: AttemptedResolutionSteps
36 | description: The attempted steps taken to resolve the issue
37 | system_prompts: {}
38 | response_format: auto
39 | id: asst_TqXNMH0gPgL0lJmoE79hgjXM
40 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/customer-service-agent/skills/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/customer-service-agent/skills/self-service-knowledge.skill:
--------------------------------------------------------------------------------
1 | # AI Foundry Skill Definition
2 | type: file_search
3 | tool_resources:
4 | file_search:
5 | vector_store_ids:
6 | - vs_tRnlhMp3GCWe9hPrzySxboy5
7 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/customer-service-agent/skills/windows-support-knowledge.skill:
--------------------------------------------------------------------------------
1 | # AI Foundry Skill Definition
2 | type: file_search
3 | tool_resources:
4 | file_search:
5 | vector_store_ids:
6 | - vs_vUIhIxSbIzMWvM4tMEOpRuhM
7 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/customer-service-agent/src/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/customer-service-agent/src/scripts/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/customer-service-agent/workflows/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/exact-qna-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/exact-qna-agent/config.yaml:
--------------------------------------------------------------------------------
1 | # The endpoint of the Azure AI Foundry project where your Agent will be created. It can be found in the project overview page. For example, https://my-resource.services.ai.azure.com/api/projects/my-project
2 | project_endpoint:
3 |
4 | # The name of model deployment to be used for your Agent.
5 | model_name:
6 |
7 | # The endpoint for Azure AI Language service resource, Azure hub resource or Azure AI Foundry resource where your CLU and CQA projects are created. For example, https://my-resource.cognitiveservices.azure.com
8 | language_resource_url:
9 |
10 | # The connection name of the above resource when added in the Azure AI Foundry portal to your project
11 | language_resource_connection_name:
12 |
13 | # Go to the page of above connection in the Azure AI Foundry portal, then construct the connection ID by append "/connections/" to the wsid parameter value in the page URL.
14 | # For example, if the connection page URL contains "wsid=/subscriptions//resourceGroups//providers/Microsoft.CognitiveServices/accounts//projects/",
15 | # Then the connection ID is /subscriptions//resourceGroups//providers/Microsoft.CognitiveServices/accounts//projects//connections/
16 | connection_id:
17 |
18 | # Project and deployment names for Custom Question Answering (CQA) that your Agent will use.
19 | cqa_project_name:
20 | cqa_deployment_name:
21 |
22 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/exact-qna-agent/requirements.txt:
--------------------------------------------------------------------------------
1 | artifacts-keyring==0.4.0
2 | azure-ai-agents==1.0.0a20250506003
3 | azure-core==1.34.1a20250508002
4 | azure-identity==1.22.0
5 | certifi==2025.4.26
6 | cffi==1.17.1
7 | charset-normalizer==3.4.2
8 | cryptography==44.0.3
9 | idna==3.10
10 | isodate==0.7.2
11 | jaraco.classes==3.4.0
12 | jaraco.context==6.0.1
13 | jaraco.functools==4.1.0
14 | keyring==25.6.0
15 | more-itertools==10.7.0
16 | msal==1.32.3
17 | msal-extensions==1.3.1
18 | pycparser==2.22
19 | PyJWT==2.10.1
20 | pywin32-ctypes==0.2.3
21 | PyYAML==6.0.2
22 | requests==2.32.3
23 | six==1.17.0
24 | typing_extensions==4.13.2
25 | urllib3==2.4.0
26 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/exact-qna-agent/utils.py:
--------------------------------------------------------------------------------
1 | import re
2 |
3 | def bind_parameters(input_string: str, parameters: dict) -> str:
4 | """
5 | Replace occurrences of '${key}' in the input string with the value of the key in the parameters dictionary.
6 |
7 | :param input_string: The string containing keys of value to replace.
8 | :param parameters: A dictionary containing the values to substitute in the input string.
9 | :return: The modified string with parameters replaced.
10 | """
11 | if parameters is None:
12 | return input_string
13 |
14 | # Define the regex pattern to match '${key}'
15 | parameter_binding_regex = re.compile(r"\$\{([^}]+)\}")
16 |
17 | # Replace matches with corresponding values from the dictionary
18 | return parameter_binding_regex.sub(
19 | lambda match: parameters.get(match.group(1), match.group(0)),
20 | input_string
21 | )
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/home-loan-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/home-loan-agent/Contoso_Loan_Documentation_Checklist.md:
--------------------------------------------------------------------------------
1 | # Contoso Bank Loan Documentation Checklist
2 |
3 | ## Identification & Eligibility
4 | - Government-issued photo ID (e.g., Driver's License, Passport)
5 | - Social Security Number
6 | - Certificate of Eligibility (COE)
7 | - DD-214 (Discharge papers for veterans not on active duty)
8 | - Statement of service (for active duty applicants)
9 |
10 | ## Income Verification
11 | - Most recent 2 pay stubs
12 | - Last 2 years of W-2 forms
13 | - Last 2 years of federal tax returns (if self-employed)
14 | - Proof of other income (e.g., rental, pensions, alimony)
15 |
16 | ## Financial Documents
17 | - 2 most recent bank statements
18 | - Proof of down payment (if applicable)
19 | - List of monthly debts and expenses
20 |
21 | ## Property Details (if applicable)
22 | - Signed purchase agreement
23 | - Contoso Bank appraisal request form (Contoso Bank Form 26-1805)
24 | - Homeowner's insurance information
25 | - Contact info for real estate agent or builder
26 |
27 | ## Other Supporting Documents
28 | - Explanation letter for credit issues (if required)
29 | - Divorce decree or child support documentation (if applicable)
30 | - Bankruptcy or foreclosure paperwork (if occurred in last 7 years)
31 |
32 | ---
33 |
34 | For more information, visit: [https://www.contosobank.com/loans/home](https://www.contosobank.com/loans/home)
35 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/intent-routing-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/intent-routing-agent/config.yaml:
--------------------------------------------------------------------------------
1 | # The endpoint of the Azure AI Foundry project where your Agent will be created. It can be found in the project overview page. For example, https://my-resource.services.ai.azure.com/api/projects/my-project
2 | project_endpoint:
3 |
4 | # The name of model deployment to be used for your Agent.
5 | model_name:
6 |
7 | # The endpoint for Azure AI Language service resource, Azure hub resource or Azure AI Foundry resource where your CLU and CQA projects are created. For example, https://my-resource.cognitiveservices.azure.com
8 | language_resource_url:
9 |
10 | # The connection name of the above resource when added in the Azure AI Foundry portal to your project
11 | language_resource_connection_name:
12 |
13 | # Go to the page of above connection in the Azure AI Foundry portal, then construct the connection ID by append "/connections/" to the wsid parameter value in the page URL.
14 | # For example, if the connection page URL contains "wsid=/subscriptions//resourceGroups//providers/Microsoft.CognitiveServices/accounts//projects/",
15 | # Then the connection ID is /subscriptions//resourceGroups//providers/Microsoft.CognitiveServices/accounts//projects//connections/
16 | connection_id:
17 |
18 | # Project and deployment names for Conversational Language Understanding (CLU) and Custom Question Answering (CQA) that your Agent will use.
19 | cqa_project_name:
20 | cqa_deployment_name:
21 | clu_project_name:
22 | clu_deployment_name:
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/intent-routing-agent/requirements.txt:
--------------------------------------------------------------------------------
1 | artifacts-keyring==0.4.0
2 | azure-ai-agents==1.0.0a20250506003
3 | azure-core==1.34.1a20250508002
4 | azure-identity==1.22.0
5 | certifi==2025.4.26
6 | cffi==1.17.1
7 | charset-normalizer==3.4.2
8 | cryptography==44.0.3
9 | idna==3.10
10 | isodate==0.7.2
11 | jaraco.classes==3.4.0
12 | jaraco.context==6.0.1
13 | jaraco.functools==4.1.0
14 | keyring==25.6.0
15 | more-itertools==10.7.0
16 | msal==1.32.3
17 | msal-extensions==1.3.1
18 | pycparser==2.22
19 | PyJWT==2.10.1
20 | pywin32-ctypes==0.2.3
21 | PyYAML==6.0.2
22 | requests==2.32.3
23 | six==1.17.0
24 | typing_extensions==4.13.2
25 | urllib3==2.4.0
26 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/intent-routing-agent/utils.py:
--------------------------------------------------------------------------------
1 | import re
2 |
3 | def bind_parameters(input_string: str, parameters: dict) -> str:
4 | """
5 | Replace occurrences of '${key}' in the input string with the value of the key in the parameters dictionary.
6 |
7 | :param input_string: The string containing keys of value to replace.
8 | :param parameters: A dictionary containing the values to substitute in the input string.
9 | :return: The modified string with parameters replaced.
10 | """
11 | if parameters is None:
12 | return input_string
13 |
14 | # Define the regex pattern to match '${key}'
15 | parameter_binding_regex = re.compile(r"\$\{([^}]+)\}")
16 |
17 | # Replace matches with corresponding values from the dictionary
18 | return parameter_binding_regex.sub(
19 | lambda match: parameters.get(match.group(1), match.group(0)),
20 | input_string
21 | )
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/magentic-one-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/magentic-one-agent/core/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/magentic-one-agent/core/BingSearch.agent:
--------------------------------------------------------------------------------
1 | # AI Foundry Agent Definition
2 | name: BingSearchAgent
3 | description: Assistant for browsing web.
4 | model: gpt-4o
5 | instructions: You are helpful agent who helps to find any information from the web. You have access to single tool. Given a topic or set of keywords you can issue web search using the given tool and return the information.
6 | top_p: 0
7 | temperature: 0
8 | tools:
9 | - type: bing_grounding
10 | bing_grounding:
11 | connections:
12 | - connection_id: /subscriptions/921496dc-987f-410f-bd57-426eb2611356/resourceGroups/ai-agents-karthik-eu/providers/Microsoft.MachineLearningServices/workspaces/project-demo-eu-fw7g/connections/agentsbinggrounding
13 | tool_resources: {}
14 | id: asst_3Bu3T2LIru3SwQzedVAxZll0
15 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/magentic-one-agent/core/codeExecutor.agent:
--------------------------------------------------------------------------------
1 | # AI Foundry Agent Definition
2 | name: CodeExecutor
3 | description: Agent which can execute code.
4 | model: gpt-4o
5 | instructions: You are helpful assistant who can execute the provided code and provide the output from the code execution.
6 | top_p: 0
7 | temperature: 0
8 | tools:
9 | - type: code_interpreter
10 | tool_resources:
11 | code_interpreter:
12 | file_ids: []
13 | id: asst_YDyojcWRI36sSmqezB7OMngO
14 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/magentic-one-agent/workflow/magentic.one.fdl:
--------------------------------------------------------------------------------
1 | # AI Foundry Definition Language
2 | name: magentic.One
3 | states:
4 | - name: MagenticOneResearch
5 | isFinal: false
6 | actors:
7 | - agent: deepresearch
8 | humanInLoopMode: onNoMessage
9 | streamOutput: true
10 | inputs:
11 | team: teams
12 | instructions: instructions
13 | - name: EndState
14 | isFinal: true
15 | transitions:
16 | - from: MagenticOneResearch
17 | to: EndState
18 | variables:
19 | - Type: userDefined
20 | name: teams
21 | value:
22 | - agent: BingSearchAgent
23 | description: Agent which can search web.
24 | - agent: CodeExecutor
25 | description: Agent which can execute code produced by the MagenticOneCoder. This agent cannot generate code.
26 | - agent: MagenticOneCoder
27 | description: Agent which can generate code for a given problem but cannot execute the code.
28 | - Type: userDefined
29 | name: instructions
30 | value: |
31 | You are generalist multi-agent helps solve open ended tasks.
32 | startstate: MagenticOneResearch
33 | id: wf_agent_36yppJcFOvMB7JO1BhU5tP91
34 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/meeting-prep-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/meeting-prep-agent/deployments/bing-grounding.bicep:
--------------------------------------------------------------------------------
1 |
2 | param account_name string
3 | param location string = 'global'
4 | var bingSearchName = 'bingsearch-${account_name}'
5 |
6 | resource accountResource 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' existing = {
7 | name: account_name
8 | scope: resourceGroup()
9 | }
10 |
11 | resource bingSearch 'Microsoft.Bing/accounts@2020-06-10' = {
12 | name: bingSearchName
13 | location: location
14 | sku: {
15 | name: 'G1'
16 | }
17 | kind: 'Bing.Grounding'
18 | }
19 |
20 | resource bingConnection 'Microsoft.CognitiveServices/accounts/connections@2025-04-01-preview' = {
21 | name: '${account_name}-bingsearchconnection'
22 | parent: accountResource
23 | properties: {
24 | category: 'ApiKey'
25 | target: 'https://api.bing.microsoft.com/'
26 | authType: 'ApiKey'
27 | credentials: {
28 | key: listKeys(bingSearch.id, '2020-06-10').key1
29 | }
30 | isSharedToAll: true
31 | metadata: {
32 | ApiType: 'Azure'
33 | Location: bingSearch.location
34 | ResourceId: bingSearch.id
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/portfolio-navigator/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/research-flow-agent/Core/LedgerFactsUpdate.agent:
--------------------------------------------------------------------------------
1 | # AI Foundry Agent Definition
2 | name: LedgerFactsUpdate
3 | description: Agent which updates ledger fact
4 | model: gpt-4o
5 | instructions: |-
6 | As a reminder, we are working to solve the following task:
7 |
8 | {{task}}
9 |
10 | It's clear we aren't making as much progress as we would like, but we may have learned something new. Please rewrite the following fact sheet, updating it to include anything new we have learned that may be helpful. Example edits can include (but are not limited to) adding new guesses, moving educated guesses to verified facts if appropriate, etc. Updates may be made to any section of the fact sheet, and more than one section of the fact sheet can be edited. This is an especially good time to update educated guesses, so please at least add or update one educated guess or hunch, and explain your reasoning.
11 |
12 | Here is the old fact sheet:
13 |
14 | {{facts}}
15 | """
16 | top_p: 0
17 | temperature: 0
18 | tools: []
19 | tool_resources: {}
20 | events: []
21 | inputs:
22 | - type: llm
23 | name: task
24 | description: task
25 | - type: llm
26 | name: facts
27 | description: facts
28 | outputs:
29 | - type: llm
30 | schema:
31 | type: string
32 | name: updatedFacts
33 | description: The updated facts for the problem.
34 | system_prompts: {}
35 | response_format: auto
36 | id: asst_BKfJzkDib4bIBPBg7VLMZLjP
37 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/research-flow-agent/Core/LedgerPlanner.agent:
--------------------------------------------------------------------------------
1 | # AI Foundry Agent Definition
2 | name: LedgerPlanner
3 | description: Ledger Planner Agent
4 | model: gpt-4o
5 | instructions: |-
6 | You are an helpful assistant help us create a plan to solve the following problem.
7 |
8 | {{task}}
9 |
10 | We have collected the following facts so far.
11 |
12 | {{facts}}
13 |
14 | You have following team at your disposal.
15 |
16 | Your team:
17 |
18 | {{team}}
19 |
20 | You are also provided additional domain specific instructions:
21 |
22 | {{instructions}}
23 |
24 | Please understand their individual capability and based on that provide a nice plan for us. You do not have to directly interact with your team. You just output the plan in the form of short bulletin we will pass it to executors.
25 |
26 | Based on the team composition, and known and unknown facts, please devise a short bullet-point plan for addressing the original request. Remember, there is no requirement to involve all team members -- a team member's particular expertise may not be needed for this task.
27 |
28 | Your task is complete once you have devised the plan. You are not allowed to execute the plan.
29 | top_p: 0
30 | temperature: 0
31 | tools: []
32 | tool_resources: {}
33 | events: []
34 | inputs:
35 | - type: llm
36 | name: team
37 | description: team
38 | - type: llm
39 | name: instructions
40 | description: instructions
41 | - type: llm
42 | name: facts
43 | description: facts
44 | - type: llm
45 | name: task
46 | description: task
47 | outputs: []
48 | system_prompts: {}
49 | response_format: auto
50 | id: asst_6jBa8H5pA9wxYj17giC6hIxw
51 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/research-flow-agent/Core/LedgerPlanupdate.agent:
--------------------------------------------------------------------------------
1 | # AI Foundry Agent Definition
2 | name: LedgerPlanUpdate
3 | description: Ledger Plan Update
4 | model: gpt-4o
5 | instructions: |-
6 | This is the current plan we were executing
7 |
8 | {{plan}}
9 |
10 | Here are the updated facts
11 |
12 | {{facts}}
13 |
14 | Please briefly explain what went wrong on this last run (the root cause of the failure), and then come up with a new plan that takes steps and/or includes hints to overcome prior challenges and especially avoids repeating the same mistakes. As before, the new plan should be concise, be expressed in bullet-point form, and consider the following team composition (do not involve any other outside people since we cannot contact anyone else):
15 |
16 | Your team:
17 |
18 | {{team}}
19 | top_p: 0
20 | temperature: 0
21 | tools: []
22 | tool_resources: {}
23 | events: []
24 | inputs:
25 | - type: llm
26 | name: plan
27 | description: plan
28 | - type: llm
29 | name: team
30 | description: team
31 | - type: llm
32 | name: facts
33 | description: facts
34 | outputs: []
35 | system_prompts: {}
36 | response_format: auto
37 | id: asst_l8k5IvizoYchB4GbK19vBh8f
38 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/research-flow-agent/Core/Summarizer.agent:
--------------------------------------------------------------------------------
1 | # AI Foundry Agent Definition
2 | name: FinalStepAgent
3 | description: Summarizer
4 | model: gpt-4o
5 | instructions: |-
6 | We are working on the following task:
7 | {{task}}
8 |
9 | We have completed the task.
10 |
11 | The above messages contain the conversation that took place to complete the task.
12 |
13 | Based on the information gathered, provide the final answer to the original request.
14 | The answer should be phrased as if you were speaking to the user.
15 | top_p: 0
16 | temperature: 0
17 | tools: []
18 | tool_resources: {}
19 | events: []
20 | inputs:
21 | - type: llm
22 | name: task
23 | description: The task that was completed.
24 | outputs: []
25 | system_prompts: {}
26 | response_format: auto
27 | id: asst_tNOYoCBajtxKcfgWJQfpDbAy
28 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/research-flow-agent/Core/agentRouter.agent:
--------------------------------------------------------------------------------
1 | # AI Foundry Agent Definition
2 | name: ActionRouterAgent
3 | description: Agent which routes to right agent based on deep research progress.
4 | model: gpt-4o
5 | instructions: |-
6 | Here are the teams available to you
7 |
8 | {{team}}
9 |
10 | {{systemAgents}}
11 |
12 | Determine the next step based on the conversation history.
13 | Based on the next step, determine the targetAgent from the available teams and memorize it.
14 | You MUST always select an agent from the team.
15 | top_p: 0
16 | temperature: 0
17 | tools: []
18 | tool_resources: {}
19 | events: []
20 | inputs:
21 | - type: llm
22 | name: team
23 | description: team
24 | - type: llm
25 | name: systemAgents
26 | description: systemAgents
27 | outputs:
28 | - type: llm
29 | schema:
30 | type: string
31 | name: targetAgent
32 | description: The agent name of the next speaker.
33 | system_prompts: {}
34 | response_format: auto
35 | id: asst_XDeaWgGCxUD6xVaQenvjWIYU
36 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/sales-analyst-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/sales-analyst-agent/env.example:
--------------------------------------------------------------------------------
1 | PROJECT_CONNECTION_STRING=";;;"
2 | AZURE_OPENAI_DEPLOYMENT="gpt-4o-mini"
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/sales-analyst-agent/requirements.txt:
--------------------------------------------------------------------------------
1 | azure-ai-projects==1.0.0b1
2 | azure-identity==1.19.0
3 | openpyxl==3.1.5
4 | openai==1.55.0
5 | pandas==2.2.3
6 | python-dotenv==1.0.1
7 | tabulate==0.9.0
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/sales-analyst-agent/template.py:
--------------------------------------------------------------------------------
1 | from azure.ai.agent import Agent, Tool, CodeInterpreterTool, FileSearchTool
2 | from azure.ai.agent.runtime import AgentRuntime
3 | from azure.ai.agent.models import ToolDefinition
4 |
5 | # Agent system message
6 | SYSTEM_MESSAGE = """You are an expert sales analyst.
7 | Use the uploaded sales data to answer questions about orders, customers, regions, and product performance.
8 | Always explain your reasoning and cite relevant files or calculations."""
9 |
10 | # Initialize tools
11 | file_search_tool = FileSearchTool(name="file_search", vector_store_ids=[""])
12 | code_interpreter_tool = CodeInterpreterTool(name="code_interpreter")
13 |
14 | tools = [file_search_tool, code_interpreter_tool]
15 |
16 | # Define the agent
17 | agent = Agent(
18 | name="sales-analyst-agent",
19 | instructions=SYSTEM_MESSAGE,
20 | tools=[ToolDefinition.from_tool(t) for t in tools],
21 | )
22 |
23 | # Optional: agent runtime for programmatic execution
24 | runtime = AgentRuntime(agent=agent)
25 |
26 | if __name__ == "__main__":
27 | print("Sales Analyst Agent template loaded successfully.")
28 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/text-translation-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/text-translation-agent/config.yaml:
--------------------------------------------------------------------------------
1 | # The endpoint of the Azure AI Foundry project where your Agent will be created. It can be found in the project overview page. For example, https://my-resource.services.ai.azure.com/api/projects/my-project
2 | project_endpoint:
3 |
4 | # The name of model deployment to be used for your Agent.
5 | model_name:
6 |
7 | # The connection name of the above resource when added in the Azure AI Foundry portal to your project
8 | translator_resource_connection_name:
9 |
10 | # the region when the translator resource/AI service resource was created.
11 | translator_resource_region:
12 |
13 | # Go to the page of above connection in the Azure AI Foundry portal, then construct the connection ID by append "/connections/" to the wsid parameter value in the page URL.
14 | # For example, if the connection page URL contains "wsid=/subscriptions//resourceGroups//providers/Microsoft.CognitiveServices/accounts//projects/",
15 | # Then the connection ID is /subscriptions//resourceGroups//providers/Microsoft.CognitiveServices/accounts//projects//connections/
16 | connection_id:
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/text-translation-agent/requirements.txt:
--------------------------------------------------------------------------------
1 | artifacts-keyring==0.4.0
2 | #azure-ai-agents==1.0.0a20250506003
3 | azure-ai-agents==1.0.0
4 | azure-core==1.34.0
5 | azure-identity==1.22.0
6 | azure-storage-blob==12.26.0b1
7 | certifi==2025.4.26
8 | cffi==1.17.1
9 | charset-normalizer==3.4.2
10 | cryptography==44.0.3
11 | idna==3.10
12 | isodate==0.7.2
13 | jaraco.classes==3.4.0
14 | jaraco.context==6.0.1
15 | jaraco.functools==4.1.0
16 | jsonref==1.1.0
17 | keyring==25.6.0
18 | more-itertools==10.7.0
19 | msal==1.32.3
20 | msal-extensions==1.3.1
21 | pycparser==2.22
22 | PyJWT==2.10.1
23 | pywin32-ctypes==0.2.3
24 | requests==2.32.3
25 | six==1.17.0
26 | typing_extensions==4.13.2
27 | urllib3==2.4.0
28 | PyYAML==6.0.2
29 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/text-translation-agent/utils.py:
--------------------------------------------------------------------------------
1 | import re
2 |
3 | def bind_parameters(input_string: str, parameters: dict) -> str:
4 | """
5 | Replace occurrences of '${key}' in the input string with the value of the key in the parameters dictionary.
6 |
7 | :param input_string: The string containing keys of value to replace.
8 | :param parameters: A dictionary containing the values to substitute in the input string.
9 | :return: The modified string with parameters replaced.
10 | """
11 | if parameters is None:
12 | return input_string
13 |
14 | # Define the regex pattern to match '${key}'
15 | parameter_binding_regex = re.compile(r"\$\{([^}]+)\}")
16 |
17 | # Replace matches with corresponding values from the dictionary
18 | return parameter_binding_regex.sub(
19 | lambda match: parameters.get(match.group(1), match.group(0)),
20 | input_string
21 | )
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/travel-planner/.env:
--------------------------------------------------------------------------------
1 | PROJECT_ENDPOINT=
2 | MODEL_DEPLOYMENT_NAME=
3 | BING_CONNECTION_ID=
4 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/travel-planner/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/travel-planner/deployments/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/travel-planner/deployments/bing-grounding.bicep:
--------------------------------------------------------------------------------
1 | param account_name string
2 | param location string = 'global'
3 | var bingSearchName = 'bingsearch-${account_name}'
4 |
5 | resource accountResource 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' existing = {
6 | name: account_name
7 | scope: resourceGroup()
8 | }
9 |
10 | resource bingSearch 'Microsoft.Bing/accounts@2020-06-10' = {
11 | name: bingSearchName
12 | location: location
13 | sku: {
14 | name: 'G1'
15 | }
16 | kind: 'Bing.Grounding'
17 | }
18 |
19 | resource bingConnection 'Microsoft.CognitiveServices/accounts/connections@2025-04-01-preview' = {
20 | name: '${account_name}-bingsearchconnection'
21 | parent: accountResource
22 | properties: {
23 | category: 'ApiKey'
24 | target: 'https://api.bing.microsoft.com/'
25 | authType: 'ApiKey'
26 | credentials: {
27 | key: listKeys(bingSearch.id, '2020-06-10').key1
28 | }
29 | isSharedToAll: true
30 | metadata: {
31 | ApiType: 'Azure'
32 | Location: bingSearch.location
33 | ResourceId: bingSearch.id
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/travel-planner/sample-data/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/README.md:
--------------------------------------------------------------------------------
1 | # Voice Live API Browser Sample
2 |
3 | A Next.js-based chat application demonstrating the usage of the Voice Live API.
4 |
5 | ## Live Demo
6 |
7 | Try the [Live Demo](https://aka.ms/voice-agent/demo).
8 |
9 | ## Features
10 |
11 | - 🔄 Real-time speech conversations
12 | - 🛠️ Configurable conversation settings
13 |
14 | ## Prerequisites
15 |
16 | - Node.js (version 18 or higher)
17 | - npm or yarn
18 |
19 | ## Getting Started
20 |
21 | 1. Clone the repository:
22 | ```bash
23 | git clone
24 | cd
25 | ```
26 |
27 | 2. Install dependencies:
28 | ```bash
29 | npm install
30 | # or
31 | yarn install
32 | ```
33 |
34 | 3. Start the development server:
35 | ```bash
36 | npm run dev
37 | # or
38 | yarn dev
39 | ```
40 |
41 | 4. Open [http://localhost:3000](http://localhost:3000) in your browser.
42 |
43 | > Note: the `rt-client` package is a modified version, source code is available in [this repo](https://github.com/yulin-li/aoai-realtime-audio-sdk/tree/feature/voice-agent/javascript/standalone)
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/components.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://ui.shadcn.com/schema.json",
3 | "style": "new-york",
4 | "rsc": true,
5 | "tsx": true,
6 | "tailwind": {
7 | "config": "tailwind.config.ts",
8 | "css": "src/app/globals.css",
9 | "baseColor": "neutral",
10 | "cssVariables": true,
11 | "prefix": ""
12 | },
13 | "aliases": {
14 | "components": "@/components",
15 | "utils": "@/lib/utils",
16 | "ui": "@/components/ui",
17 | "lib": "@/lib",
18 | "hooks": "@/hooks"
19 | }
20 | }
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/next-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | // NOTE: This file should not be edited
5 | // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
6 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/next.config.ts:
--------------------------------------------------------------------------------
1 | import type { NextConfig } from "next";
2 |
3 | const nextConfig: NextConfig = {
4 | output: 'export',
5 | webpack: (config, { isServer }) => {
6 | if (isServer) {
7 | config.resolve.fallback = {
8 | ...config.resolve.fallback,
9 | bufferutil: false,
10 | 'utf-8-validate': false,
11 | };
12 | }
13 | return config;
14 | },
15 | };
16 |
17 | export default nextConfig;
18 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "realtime-demo",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint",
10 | "format": "prettier --write src"
11 | },
12 | "dependencies": {
13 | "@azure/search-documents": "^12.1.0",
14 | "@radix-ui/react-accordion": "^1.2.1",
15 | "@radix-ui/react-icons": "^1.3.0",
16 | "@radix-ui/react-select": "^2.1.2",
17 | "@radix-ui/react-slider": "^1.2.1",
18 | "@radix-ui/react-slot": "^1.1.0",
19 | "@radix-ui/react-switch": "^1.1.1",
20 | "class-variance-authority": "^0.7.0",
21 | "lucide-react": "^0.453.0",
22 | "next": "^15.3.0",
23 | "react": "18.3.1",
24 | "react-dom": "18.3.1",
25 | "react-markdown": "^9.0.3",
26 | "rt-client": "./rt-client-0.5.2.tgz",
27 | "tailwind-merge": "^2.5.4",
28 | "tailwindcss-animate": "^1.0.7"
29 | },
30 | "devDependencies": {
31 | "@types/node": "^20",
32 | "@types/react": "^18",
33 | "@types/react-dom": "^18",
34 | "eslint": "^8",
35 | "eslint-config-next": "15.0.1",
36 | "postcss": "^8",
37 | "prettier": "^3.3.3",
38 | "tailwindcss": "^3.4.1",
39 | "typescript": "^5"
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/postcss.config.mjs:
--------------------------------------------------------------------------------
1 | /** @type {import('postcss-load-config').Config} */
2 | const config = {
3 | plugins: {
4 | tailwindcss: {},
5 | },
6 | };
7 |
8 | export default config;
9 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/public/audio-processor.js:
--------------------------------------------------------------------------------
1 | class AudioRecorderProcessor extends AudioWorkletProcessor {
2 | constructor() {
3 | super();
4 | this.isRecording = false;
5 | this.bufferSize = 2400; // 100ms at 24kHz
6 | this.currentBuffer = [];
7 |
8 | this.port.onmessage = (event) => {
9 | if (event.data.command === "START_RECORDING") {
10 | this.isRecording = true;
11 | } else if (event.data.command === "STOP_RECORDING") {
12 | this.isRecording = false;
13 |
14 | if (this.currentBuffer.length > 0) {
15 | this.sendBuffer();
16 | }
17 | }
18 | };
19 | }
20 |
21 | sendBuffer() {
22 | if (this.currentBuffer.length > 0) {
23 | const audioData = new Float32Array(this.currentBuffer);
24 | this.port.postMessage({
25 | eventType: "audio",
26 | audioData: audioData,
27 | });
28 | this.currentBuffer = [];
29 | }
30 | }
31 |
32 | process(inputs) {
33 | const input = inputs[0];
34 | if (input.length > 0 && this.isRecording) {
35 | const audioData = input[0];
36 |
37 | this.currentBuffer.push(...audioData);
38 |
39 | if (this.currentBuffer.length >= this.bufferSize) {
40 | this.sendBuffer();
41 | }
42 | }
43 | return true;
44 | }
45 | }
46 |
47 | registerProcessor("audio-recorder-processor", AudioRecorderProcessor);
48 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/rt-client-0.5.2.tgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/rt-client-0.5.2.tgz
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/src/app/fonts/GeistMonoVF.woff:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:e8b65928f551b17e3d67c3f709721b952c39842d14b00701f9232057fde73608
3 | size 67864
4 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/src/app/fonts/GeistVF.woff:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:296fafafd41304f7c992079054b8af914dbbd865f32de97c66d0f613b55755d6
3 | size 66268
4 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/src/app/layout.tsx:
--------------------------------------------------------------------------------
1 | import type { Metadata } from "next";
2 | import localFont from "next/font/local";
3 | import "./globals.css";
4 |
5 | const geistSans = localFont({
6 | src: "./fonts/GeistVF.woff",
7 | variable: "--font-geist-sans",
8 | weight: "100 900",
9 | });
10 | const geistMono = localFont({
11 | src: "./fonts/GeistMonoVF.woff",
12 | variable: "--font-geist-mono",
13 | weight: "100 900",
14 | });
15 |
16 | export const metadata: Metadata = {
17 | title: "Voice Live Demo",
18 | description: "Voice Live Demo",
19 | };
20 |
21 | export default function RootLayout({
22 | children,
23 | }: Readonly<{
24 | children: React.ReactNode;
25 | }>) {
26 | return (
27 |
28 |
29 |
30 |
31 |
34 | {children}
35 |
36 |
37 | );
38 | }
39 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/src/app/page.tsx:
--------------------------------------------------------------------------------
1 | import ChatInterface from "./chat-interface";
2 |
3 | export default function Home() {
4 | return (
5 |
6 |
7 |
8 | );
9 | }
10 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/src/components/ui/input.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | import { cn } from "@/lib/utils";
4 |
5 | export type InputProps = React.InputHTMLAttributes;
6 |
7 | const Input = React.forwardRef(
8 | ({ className, type, ...props }, ref) => {
9 | return (
10 |
19 | );
20 | },
21 | );
22 | Input.displayName = "Input";
23 |
24 | export { Input };
25 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/src/components/ui/slider.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import * as React from "react";
4 | import * as SliderPrimitive from "@radix-ui/react-slider";
5 |
6 | import { cn } from "@/lib/utils";
7 |
8 | const Slider = React.forwardRef<
9 | React.ElementRef,
10 | React.ComponentPropsWithoutRef
11 | >(({ className, ...props }, ref) => (
12 |
20 |
21 |
22 |
23 |
24 |
25 | ));
26 | Slider.displayName = SliderPrimitive.Root.displayName;
27 |
28 | export { Slider };
29 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/src/components/ui/switch.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import * as React from "react";
4 | import * as SwitchPrimitives from "@radix-ui/react-switch";
5 |
6 | import { cn } from "@/lib/utils";
7 |
8 | const Switch = React.forwardRef<
9 | React.ElementRef,
10 | React.ComponentPropsWithoutRef
11 | >(({ className, ...props }, ref) => (
12 |
20 |
25 |
26 | ));
27 | Switch.displayName = SwitchPrimitives.Root.displayName;
28 |
29 | export { Switch };
30 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/src/lib/utils.ts:
--------------------------------------------------------------------------------
1 | import { type ClassValue, clsx } from "clsx";
2 | import { twMerge } from "tailwind-merge";
3 |
4 | export function cn(...inputs: ClassValue[]) {
5 | return twMerge(clsx(inputs));
6 | }
7 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/foundry-agent-service-sdk/voice-live-agent/samples/react/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2017",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "strict": true,
8 | "noEmit": true,
9 | "esModuleInterop": true,
10 | "module": "esnext",
11 | "moduleResolution": "bundler",
12 | "resolveJsonModule": true,
13 | "isolatedModules": true,
14 | "jsx": "preserve",
15 | "incremental": true,
16 | "plugins": [
17 | {
18 | "name": "next"
19 | }
20 | ],
21 | "paths": {
22 | "@/*": ["./src/*"]
23 | }
24 | },
25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
26 | "exclude": ["node_modules"]
27 | }
28 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/README.md:
--------------------------------------------------------------------------------
1 | ## Agent Catalog - Microsoft-authored Agent Samples for Semantic Kernel SDK
2 |
3 | This folder contains Microsoft-authored Agent code samples for the Semantic Kernel SDK.
4 |
5 | **IMPORTANT NOTE:** Starter templates, instructions, code samples and resources in this msft-agent-samples file (“samples”) are designed to assist in accelerating development of agents for specific scenarios. It is important that you review all provided resources and carefully test Agent behavior in the context of your use case: ([Learn More](https://learn.microsoft.com/en-us/legal/cognitive-services/agents/transparency-note?context=%2Fazure%2Fai-services%2Fagents%2Fcontext%2Fcontext)).
6 |
7 | Certain Agent offerings may be subject to legal and regulatory requirements, may require licenses, or may not be suitable for all industries, scenarios, or use cases. By using any sample, you are acknowledging that Agents or other output created using that sample are solely your responsibility, and that you will comply with all applicable laws, regulations, and relevant safety standards, terms of service, and codes of conduct.
8 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/ai-redteaming-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/ai-redteaming-agent/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/ai-redteaming-agent/requirements.txt:
--------------------------------------------------------------------------------
1 | azure-ai-evaluation[redteam] >= 1.8.0
2 | semantic-kernel
3 | python-dotenv
4 | requests
5 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
23 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/assets/input/123LogisticsContract.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/assets/input/123LogisticsContract.pdf
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/assets/input/ABCContract.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/assets/input/ABCContract.pdf
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/assets/input/AgentInstructions.md:
--------------------------------------------------------------------------------
1 | You are responsible for comparing different versions of a contract, extracting key fields and clauses, and generating detailed reports on the changes. This role requires a keen eye for detail, strong analytical skills, and the ability to communicate findings clearly and concisely. Make sure to analyze the contracts thoroughly. The contracts are formatted in markdown in a user's prompt. Generate the response with differences in a markdown format.
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/assets/input/ContractSchema.json:
--------------------------------------------------------------------------------
1 | {
2 | "scenario": "document",
3 | "fieldSchema": {
4 | "fields": {
5 | "Summary": {
6 | "type": "string",
7 | "method": "generate",
8 | "description": "Generate the summary of this contract with names of the parties, dates and any contract values"
9 | },
10 | "Article": {
11 | "type": "array",
12 | "items": {
13 | "type": "object",
14 | "properties": {
15 | "ArticleName": {
16 | "type": "string",
17 | "method": "extract",
18 | "description": "Name of the article listed as Article4:Contracting Out, and so on"
19 | }
20 | },
21 | "method": "extract"
22 | },
23 | "method": "generate",
24 | "description": "List of all the articles in the document"
25 | },
26 | "Sections": {
27 | "type": "string",
28 | "method": "classify",
29 | "description": "Sections of the Contract",
30 | "enum": [
31 | "Preamble",
32 | "Article"
33 | ],
34 | "enumDescriptions": {
35 | "Preamble": "Preamble",
36 | "Article": "Article"
37 | }
38 | }
39 | },
40 | "definitions": {}
41 | }
42 | }
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/assets/input/XYZContract.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/assets/input/XYZContract.pdf
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/assets/other/123 Logistics Contract.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/assets/other/123 Logistics Contract.docx
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/assets/other/ABC Contract.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/assets/other/ABC Contract.docx
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/assets/other/XYZ Contract.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/assets/other/XYZ Contract.docx
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/requirements.txt:
--------------------------------------------------------------------------------
1 | azure-ai-agents==1.0.0
2 | azure-ai-projects==1.0.0b11
3 | azure_storage==0.37.0
4 | python-dotenv==1.1.0
5 | Requests==2.32.3
6 | semantic_kernel==1.31.0
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/src/.env.example:
--------------------------------------------------------------------------------
1 | # Azure AI Content Understanding settings
2 | AZURE_AI_CU_ENDPOINT=https://demo.services.ai.azure.com/
3 | AZURE_AI_CU_API_VERSION=2024-12-01-preview
4 | AZURE_AI_CU_SCHEMA_FILE_PATH="./assets/input/ContractSchema.json"
5 |
6 | # Provide your Azure AI Agent details
7 | AZURE_AI_AGENT_ENDPOINT=https://demo.services.ai.azure.com/api/projects/demo
8 | AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME=demo
9 |
10 | # Provide your Azure AI Agent agent ID
11 | # If empty, the program will create a new agent using the instructions from the file below.
12 | AZURE_AI_AGENT_AGENT_ID=asst_7sc5xGxNNrvN1fQVMlXFBAv3
13 | AGENT_INSTRUCTIONS_PATH="./assets/input/AgentInstructions.md"
14 |
15 | # Secrets
16 | AZURE_AI_CU_SUBSCRIPTION="..."
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/src/template.py:
--------------------------------------------------------------------------------
1 | import asyncio
2 |
3 | from agents.contract_analysis_agent import ContractAnalysisAgent
4 | from dotenv import find_dotenv, load_dotenv
5 | from tools.content_understanding_tool import ContentUnderstandingTool
6 |
7 |
8 | async def run_agent():
9 | # Load environment variables from .env file
10 | load_dotenv(find_dotenv())
11 |
12 | # Create the agent
13 | agent = ContractAnalysisAgent()
14 |
15 | # Invoke the Content Understanding tool to convert PDF contracts to markdown
16 | tool = ContentUnderstandingTool()
17 | analyzer_id = tool.create_analyzer()
18 | contract1 = tool.analyze(
19 | './assets/input/123LogisticsContract.pdf',
20 | analyzer_id)
21 | contract2 = tool.analyze(
22 | './assets/input/ABCContract.pdf',
23 | analyzer_id)
24 | tool.delete_analyzer(analyzer_id)
25 |
26 | # Execute the agent with the contracts
27 | response = await agent.execute([contract1, contract2])
28 |
29 | if __name__ == "__main__":
30 | asyncio.run(run_agent())
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/contract-analysis-agent/src/utils/logger.py:
--------------------------------------------------------------------------------
1 | # Helper class to log the program execution status
2 | class Logger:
3 | @staticmethod
4 | def log_start(name: str):
5 | print("\n\n--------------------------------------------------------------\n")
6 | print(f"Starting: {name}")
7 |
8 | @staticmethod
9 | def log_completion(name: str):
10 | print(f"\nCompleted: {name}")
11 |
12 | def log_result(result):
13 | print(f"\nResult:\n{result}")
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/healthcare-multi-agent-orchestrator/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore all files in the output directory, except for the sample output
2 | assets/output/2*
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/input/CUAnalyzerSchema.json:
--------------------------------------------------------------------------------
1 | {
2 | "scenario": "videoShot",
3 | "fieldSchema": {
4 | "fields": {
5 | "Description": {
6 | "type": "string",
7 | "method": "generate",
8 | "description": "Describe in detail the steps discussed in this segment based on the visual and transcript"
9 | },
10 | "Category": {
11 | "type": "string",
12 | "method": "generate",
13 | "description": "Categorize the description to determine the main topic and purpose of the video segment."
14 | },
15 | "SafetyInstruction": {
16 | "type": "string",
17 | "method": "generate",
18 | "description": "Identify what safety instructions are identified here"
19 | },
20 | "KeyTips": {
21 | "type": "string",
22 | "method": "generate",
23 | "description": "Identify the key tips discussed in this segment as a numbered list"
24 | },
25 | "KeyFrame": {
26 | "type": "string",
27 | "method": "generate",
28 | "description": "Identify the key frame in this segment that most clearly illustrates the key point of this segment. It must be a frame included in the markdown transcript. Output it in miliseconds - for example, 1188."
29 | }
30 | },
31 | "definitions": {}
32 | }
33 | }
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/input/VideoExample480p.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/input/VideoExample480p.mp4
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.1188.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.1188.jpg
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.126984.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.126984.jpg
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.148896.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.148896.jpg
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.158400.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.158400.jpg
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.166716.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.166716.jpg
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.29700.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.29700.jpg
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.50424.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.50424.jpg
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.67056.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.67056.jpg
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.74184.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.74184.jpg
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.8316.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.8316.jpg
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.99660.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/assets/output/sample/keyFrame.99660.jpg
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/requirements.txt:
--------------------------------------------------------------------------------
1 | azure-ai-agents==1.0.0
2 | azure-ai-projects==1.0.0b11
3 | azure_storage==0.37.0
4 | Pillow==11.2.1
5 | python-dotenv==1.1.0
6 | Requests==2.32.3
7 | semantic_kernel==1.31.0
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/src/.env.example:
--------------------------------------------------------------------------------
1 | # Azure AI Content Understanding settings
2 | AZURE_AI_CU_ENDPOINT=https://demo.services.ai.azure.com/
3 | AZURE_AI_CU_API_VERSION=2024-12-01-preview
4 | AZURE_AI_CU_SCHEMA_FILE_PATH="./assets/input/CUAnalyzerSchema.json"
5 |
6 | OUTPUT_DIR="./assets/output"
7 |
8 | # Provide your Azure AI Agent deployment name
9 | AZURE_AI_AGENT_ENDPOINT=https://demo.services.ai.azure.com/api/projects/demo
10 | AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME=demo
11 |
12 | # Provide your Azure AI Agent agent ID
13 | # If empty, the program will create a new agent using the instructions from the file below.
14 | AZURE_AI_AGENT_AGENT_ID=asst_khVNTAcnbWy6rMs3SmpNWQtp
15 | AGENT_INSTRUCTIONS_PATH="./assets/input/AgentInstructions.md"
16 |
17 | # Secrets
18 | AZURE_AI_CU_SUBSCRIPTION="..."
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/src/template.py:
--------------------------------------------------------------------------------
1 | import asyncio
2 | import os
3 | from datetime import datetime
4 | from pathlib import Path
5 |
6 | from agents.sop_forge_agent import SOPForgeAgent
7 | from dotenv import find_dotenv, load_dotenv
8 | from tools.content_understanding_tool import ContentUnderstandingTool
9 |
10 |
11 | async def run_agent():
12 | # Load environment variables from .env file
13 | load_dotenv(find_dotenv())
14 |
15 | # Create the agent
16 | agent = SOPForgeAgent()
17 |
18 | # Create output directory
19 | output_folder = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
20 | output_directory = os.path.join(os.getenv("OUTPUT_DIR"), output_folder)
21 | Path(output_directory).mkdir(exist_ok=True)
22 |
23 | # Invoke the Content Understanding tool to convert PDF contracts to markdown
24 | tool = ContentUnderstandingTool()
25 | analyzer_id = tool.create_analyzer()
26 | analyzed_video_steps = tool.analyze(
27 | intput_file_path='./assets/input/VideoExample480p.mp4',
28 | analyzer_id=analyzer_id,
29 | output_directory=output_directory)
30 | tool.delete_analyzer(analyzer_id)
31 |
32 | # Execute the agent with the contracts
33 | response = await agent.execute(analyzed_video_steps)
34 |
35 | # Save the response to a markdown file
36 | output_file_path = os.path.join(output_directory, "readme.md")
37 | with open(output_file_path, "w", encoding="utf-8") as output_file:
38 | output_file.write(response)
39 |
40 | if __name__ == "__main__":
41 | asyncio.run(run_agent())
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/sop-forge-agent/src/utils/logger.py:
--------------------------------------------------------------------------------
1 | # Helper class to log the program execution status
2 | class Logger:
3 | @staticmethod
4 | def log_start(name: str):
5 | print("\n\n--------------------------------------------------------------\n")
6 | print(f"Starting: {name}")
7 |
8 | @staticmethod
9 | def log_completion(name: str):
10 | print(f"\nCompleted: {name}")
11 |
12 | def log_result(result):
13 | print(f"\nResult:\n{result}")
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/video-translation-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/video-translation-agent/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/video-translation-agent/assets/architecture-diagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/video-translation-agent/assets/architecture-diagram.png
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/video-translation-agent/requirements.txt:
--------------------------------------------------------------------------------
1 | azure-identity
2 | azure-storage-blob
3 | semantic-kernel
4 | semantic-kernel[openai]
5 | python-dotenv
6 | aiohttp
7 | requests
8 | urllib3
9 | orjson
10 | pydantic
11 | termcolor
12 | azure-cognitiveservices-speech
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/video-translation-agent/sample_data/en-US-TryoutOriginalTTSIntro.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/video-translation-agent/sample_data/en-US-TryoutOriginalTTSIntro.mp4
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/video-translation-agent/sample_data/es-ES-TryOutOriginalElSalvadorMicrosoftIntro.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/video-translation-agent/sample_data/es-ES-TryOutOriginalElSalvadorMicrosoftIntro.mp4
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/video-translation-agent/src/video_translation_enum.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) Microsoft. All rights reserved.
2 | # Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
3 |
4 | from enum import Enum
5 |
6 | class VoiceKind(str, Enum):
7 | PlatformVoice = 'PlatformVoice'
8 | PersonalVoice = 'PersonalVoice'
9 |
10 | class Region(str, Enum):
11 | eastus = 'eastus'
12 | westus = 'westus'
13 |
14 | class OneApiState(str, Enum):
15 | NotStarted = 'NotStarted'
16 | Running = 'Running'
17 | Succeeded = 'Succeeded'
18 | Failed = 'Failed'
19 |
20 | class OperationStatus(str, Enum):
21 | NotStarted = 'NotStarted'
22 | Running = 'Running'
23 | Succeeded = 'Succeeded'
24 | Failed = 'Failed'
25 | Canceled = 'Canceled'
26 |
27 | class WebvttFileKind(str, Enum):
28 | SourceLocaleSubtitle = 'SourceLocaleSubtitle'
29 | TargetLocaleSubtitle = 'TargetLocaleSubtitle'
30 | MetadataJson = 'MetadataJson'
31 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/video-translation-agent/src/video_translation_util.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) Microsoft. All rights reserved.
2 | # Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
3 |
4 | from dataclasses import dataclass, fields, is_dataclass
5 | from typing import Any, Type
6 | from urllib3.util import Url
7 | from urllib.parse import urlencode
8 | import urllib3
9 |
10 | def dict_to_dataclass(data: dict, dataclass_type: Type[Any]) -> Any:
11 | if not is_dataclass(dataclass_type):
12 | raise ValueError(f"{dataclass_type} is not a dataclass")
13 |
14 | # Retrieve the dataclass fields
15 | field_names = {field.name: field.type for field in fields(dataclass_type)}
16 | filtered_data = {}
17 |
18 | for key, value in data.items():
19 | if key in field_names:
20 | field_type = field_names[key]
21 | if is_dataclass(field_type): # Check for nested dataclass
22 | filtered_data[key] = dict_to_dataclass(value, field_type)
23 | else:
24 | filtered_data[key] = value
25 |
26 | return dataclass_type(**filtered_data)
27 |
28 |
29 | def append_url_args(url: Url, args: dict) -> Url:
30 | encoded_args = ""
31 | if len(args) == 0:
32 | return url
33 | else:
34 | encoded_args += urlencode(args)
35 | if "?" in url.url:
36 | url = f"{url}&{encoded_args}"
37 | else:
38 | url = f"{url}?{encoded_args}"
39 | return urllib3.util.parse_url(url)
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/warranty-claim-processing-agent/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/warranty-claim-processing-agent/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/warranty-claim-processing-agent/assets/input/sample-claim-signed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/warranty-claim-processing-agent/assets/input/sample-claim-signed.png
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/warranty-claim-processing-agent/assets/other/claims_analysis_agent_output_schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/draft-07/schema#",
3 | "title": "ClaimAssessment",
4 | "type": "object",
5 | "properties": {
6 | "recommended_action": {
7 | "type": "string",
8 | "enum": [
9 | "investigate",
10 | "approve",
11 | "deny",
12 | "request-additional-information"
13 | ]
14 | },
15 | "recommended_action_reason": {
16 | "type": "string"
17 | },
18 | "resolution_type": {
19 | "type": "string",
20 | "enum": [
21 | "repair",
22 | "refund"
23 | ]
24 | },
25 | "urgency": {
26 | "type": "string",
27 | "enum": [
28 | "high",
29 | "other"
30 | ]
31 | },
32 | "claim_summary": {
33 | "type": "string"
34 | },
35 | "analysis_summary": {
36 | "type": "string"
37 | }
38 | },
39 | "required": [
40 | "recommended_action",
41 | "recommended_action_reason",
42 | "urgency",
43 | "claim_summary",
44 | "analysis_summary"
45 | ],
46 | "additionalProperties": false
47 | }
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/warranty-claim-processing-agent/assets/other/sample-claim.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/warranty-claim-processing-agent/assets/other/sample-claim.docx
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/warranty-claim-processing-agent/assets/readme/flow-diagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/warranty-claim-processing-agent/assets/readme/flow-diagram.png
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/warranty-claim-processing-agent/requirements.txt:
--------------------------------------------------------------------------------
1 | azure-ai-agents==1.0.0
2 | azure-ai-projects==1.0.0b11
3 | azure_storage==0.37.0
4 | python-dotenv==1.1.0
5 | semantic_kernel==1.31.0
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/warranty-claim-processing-agent/src/.env.example:
--------------------------------------------------------------------------------
1 | # Provide your Cognitive Services endpoint
2 | # For example, "https://demo.cognitiveservices.azure.com/"
3 | COGNITIVE_SERVICES_ENDPOINT=
4 | COGNITIVE_SERVICES_KEY=
5 |
6 | # Provide your Azure AI Agent details
7 | AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME=gpt-4.1
8 | AZURE_AI_AGENT_ENDPOINT=https://mike-1rp-resource.services.ai.azure.com/api/projects/mike-1rp
9 |
10 | # Provide your Azure AI Agent agent ID here for the Risk Assessment Agent - e.g., "asst_jAHzkylLNLt2XgcjKAqa2ozj"
11 | # If empty, the program will create a new agent using the instructions from the file below.
12 | AZURE_AI_AGENT_PROJECT_ENDPOINT=
13 | AZURE_AI_AGENT_AGENT_ID=asst_xZS4J9PgGAN10lQWgpRtn7cp
14 | AGENT_INSTRUCTIONS_PATH=assets/other/claims_analysis_agent_instructions.md
15 |
16 | # Path to the claim image document to be processed
17 | INPUT_DOCUMENT_PATH=assets/input/sample-claim-signed.png
18 |
19 | # You can mock each agent to return a sample, hardcoded response without calling the AI backend service.
20 | # This allows you to save the cost or reduce latency when debugging the application.
21 | # To mock a respective agent, set the corresponding variable to True.
22 | MOCK_DOC_INTELLIGENCE_STEP=True
23 | MOCK_PII_REDACTION_STEP=True
24 | MOCK_CLAIMS_ANALYSIS_STEP=True
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/warranty-claim-processing-agent/src/steps/audit_database_step.py:
--------------------------------------------------------------------------------
1 | from semantic_kernel.functions import kernel_function
2 | from semantic_kernel.processes.kernel_process import KernelProcessStep
3 |
4 | from utils.logger import Logger
5 |
6 |
7 | # Non-AI step that saves data with unredacted PII to an audit trail database.
8 | # This class is mocked for the purpose of the sample application.
9 | class MockAuditDatabaseStep(KernelProcessStep):
10 | _stepName = "MockAuditDatabaseStep"
11 |
12 | @kernel_function
13 | def execute(self, unredacted_data):
14 | Logger.log_step_start(self._stepName)
15 |
16 | Logger.log_step_result("Saved unredacted data to the audit trail database.")
17 | Logger.log_step_completion(self._stepName)
18 |
19 | return input
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/warranty-claim-processing-agent/src/steps/quick_access_database_step.py:
--------------------------------------------------------------------------------
1 | from semantic_kernel.functions import kernel_function
2 | from semantic_kernel.processes.kernel_process import KernelProcessStep
3 |
4 | from utils.logger import Logger
5 |
6 |
7 | # Non-AI step for saving claim analysis output with redacted PII to a quick-access database widely used by the employees.
8 | class MockQuickAccessDatabaseStep(KernelProcessStep):
9 | _stepName = "MockQuickAccessDatabaseStep"
10 |
11 | @kernel_function
12 | def execute(self, redacted_data):
13 | Logger.log_step_start(self._stepName)
14 |
15 | Logger.log_step_result("Saved redacted data to the quick access database.")
16 | Logger.log_step_completion(self._stepName)
17 |
18 | return redacted_data
--------------------------------------------------------------------------------
/samples/agent-catalog/msft-agent-samples/semantic-kernel-sdk/warranty-claim-processing-agent/src/utils/logger.py:
--------------------------------------------------------------------------------
1 | # Helper class to log the steps of the pipeline execution
2 | class Logger:
3 | @staticmethod
4 | def log_step_start(step_name):
5 | print("\n\n--------------------------------------------------------------\n")
6 | print(f"Starting step: {step_name}")
7 |
8 | @staticmethod
9 | def log_step_completion(step_name):
10 | print(f"\nCompleted step: {step_name}")
11 |
12 | def log_step_result(result):
13 | print(f"\nStep result:\n{result}")
--------------------------------------------------------------------------------
/samples/agent-catalog/vscode_ext_early_access/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/microsoft/csharp/mslearn-resources/quickstart/README.md:
--------------------------------------------------------------------------------
1 | # C# Getting Started Sample
2 |
3 | This sample demonstrates how to use the AI Foundry platform with C#/.NET. It provides basic examples for authentication, accessing data, and performing common operations with the Foundry APIs.
4 |
5 | ## Prerequisites
6 |
7 | - [.NET SDK](https://dotnet.microsoft.com/download) (version 9.0 or later recommended)
8 | - Visual Studio 22 or Visual Studio Code
9 |
10 | ## Install Dependencies
11 |
12 |
13 | ## Setup
14 |
15 | 1. Clone this repository
16 | 2. Set up your Azure Ai Foundry account and secrets at the .env file
17 |
18 |
19 | ## Running the Sample
20 |
--------------------------------------------------------------------------------
/samples/microsoft/csharp/mslearn-resources/quickstart/Samples/.env.example:
--------------------------------------------------------------------------------
1 | AZURE_AI_ENDPOINT=https://your.services.ai.azure.com/api/projects/project
2 | AZURE_AI_MODEL=your_model_name
--------------------------------------------------------------------------------
/samples/microsoft/csharp/mslearn-resources/quickstart/Samples/SimpleInference.cs:
--------------------------------------------------------------------------------
1 | //
2 | using Azure;
3 | using Azure.Identity;
4 | using Azure.AI.Projects;
5 | using Azure.AI.Inference;
6 |
7 | var projectEndpoint = new Uri(System.Environment.GetEnvironmentVariable("AZURE_AI_ENDPOINT"));
8 | var modelDeploymentName = System.Environment.GetEnvironmentVariable("AZURE_AI_MODEL");
9 | var credential = new DefaultAzureCredential();
10 |
11 | AIProjectClient client = new AIProjectClient(projectEndpoint, credential);
12 |
13 | ChatCompletionsClient chatClient = client.GetChatCompletionsClient();
14 |
15 | var requestOptions = new ChatCompletionsOptions()
16 | {
17 | Messages =
18 | {
19 | new ChatRequestSystemMessage("You are a helpful assistant."),
20 | new ChatRequestUserMessage("How many feet are in a mile?"),
21 | },
22 | Model = modelDeploymentName
23 | };
24 | Response response = chatClient.Complete(requestOptions);
25 | Console.WriteLine(response.Value.Content);
26 | //
27 |
--------------------------------------------------------------------------------
/samples/microsoft/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/data/.gitkeep
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/00-basic/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | description: This template deploys an Azure AI Foundry project.
3 | page_type: sample
4 | products:
5 | - azure
6 | - azure-resource-manager
7 | urlFragment: aifoundry-basic-project
8 | languages:
9 | - bicep
10 | - json
11 | ---
12 | # Deploy an Azure AI Foundry project
13 |
14 | This Azure AI Foundry template is built on Azure Cognitive Services as a resource provider. This template deploys an Azure AI Foundry resource and project. This allows you to access AI Foundry capabilities like Agents, Evaluations, Tracing, etc.
15 |
16 | If you are new to Azure AI Foundry, see:
17 |
18 | - [Azure AI Foundry](https://learn.microsoft.com/azure/ai-foundry/)
19 |
20 | If you are new to template deployment, see:
21 |
22 | - [Azure Resource Manager documentation](https://learn.microsoft.com/azure/azure-resource-manager/)
23 | - [Azure AI services quickstart article](https://learn.microsoft.com/azure/cognitive-services/resource-manager-template)
24 |
25 | `Tags: Microsoft.CognitiveServices/accounts/projects`
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/00-basic/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://aka.ms/azure-quickstart-templates-metadata-schema#",
3 | "type": "QuickStart",
4 | "itemDisplayName": "Azure AI Foundry project basic setup",
5 | "description": "This set of templates demonstrates how to set up Azure AI Foundry project with the basic setup, meaning with public internet access enabled, Microsoft-managed keys for encryption and Microsoft-managed identity configuration.",
6 | "summary": "This set of templates demonstrates how to set up Azure AI Foundry with the basic setup. This is the recommended way to get started with Azure AI Foundry.",
7 | "githubUsername": "andyaviles121",
8 | "dateUpdated": "2025-04-09",
9 | "environments": [
10 | "AzureCloud"
11 | ]
12 | }
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/01-connections/README.md:
--------------------------------------------------------------------------------
1 | # Connections Bicep Examples
2 |
3 | Connections enable your AI applications to access tools and objects managed elsewhere in or outside of Azure.
4 |
5 | This folder provides a set of examples for the most common connection categories.
6 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/01-connections/deployment.parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "aiFoundryName": {
6 | "value": ""
7 | },
8 | "connectedResourceName": {
9 | "value": ""
10 | },
11 | "location": {
12 | "value": "westus"
13 | },
14 | "newOrExisting": {
15 | "value": "new"
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/10-private-network-basic/README.md:
--------------------------------------------------------------------------------
1 | # Deploy AI Foundry with a private network configuration
2 |
3 | > **NOTE:** This examples shows how to disable public network access for Azure AI Foundry. This template includes:
4 | * PNA disabled Foundry resource (account) with private endpoint
5 |
6 |
7 | ## Steps
8 |
9 | 1. Create new (or use existing) resource group:
10 |
11 | ```bash
12 | az group create --name --location
13 | ```
14 |
15 | 2. Deploy the main.bicep
16 |
17 | ```bash
18 | az deployment group create --resource-group --template-file main.bicep
19 | ```
20 |
21 | **NOTE:** To access your Foundry resource securely, please using either a VM, VPN, or ExpressRoute.
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/15-private-network-standard-agent-setup/CheckCapabilityHostReadiness.ps1:
--------------------------------------------------------------------------------
1 | param(
2 | [string] $subscriptionId,
3 | [string] $resourcegroup,
4 | [string] $accountName)
5 | while ($true) {
6 |
7 | $token = (az account get-access-token --subscription $subscriptionId --query accessToken -o tsv)
8 |
9 | $uri = "https://management.azure.com/subscriptions/$subscriptionId/resourceGroups/$resourcegroup/providers/Microsoft.CognitiveServices/accounts/$accountName/capabilityHosts/?api-version=2025-04-01-preview"
10 | $content = (az rest --method get --uri $uri --headers "Authorization=Bearer $token")
11 | $jsonObject = $content | ConvertFrom-Json
12 | $provisioningState = $jsonObject.value[0].properties.provisioningState
13 |
14 | Write-Output "Provisioning State: $provisioningState"
15 | if ($provisioningState -eq "Succeeded") {
16 | Write-Output "Provisioning State: $provisioningState, Please proceed with project creation template."
17 | break;
18 | }
19 |
20 | if ($provisioningState -eq "Failed" -or $provisioningState -eq "Canceled") {
21 | Write-Output "Provisioning State: $provisioningState, project provisioning will not work."
22 | break;
23 | }
24 |
25 | Start-Sleep -Seconds 30
26 | }
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/15-private-network-standard-agent-setup/CheckCapabilityHostReadiness.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | subscriptionId="$1"
4 | resourcegroup="$2"
5 | accountName="$3"
6 |
7 | if [[ -z "$subscriptionId" || -z "$resourcegroup" || -z "$accountName" ]]; then
8 | echo "Usage: $0 "
9 | exit 1
10 | fi
11 |
12 | while true; do
13 | token=$(az account get-access-token --subscription "$subscriptionId" --query accessToken -o tsv)
14 | uri="https://management.azure.com/subscriptions/$subscriptionId/resourceGroups/$resourcegroup/providers/Microsoft.CognitiveServices/accounts/$accountName/capabilityHosts/?api-version=2025-04-01-preview"
15 | content=$(az rest --method get --uri "$uri" --headers "Authorization=Bearer $token")
16 | provisioningState=$(echo "$content" | jq -r '.value[0].properties.provisioningState')
17 |
18 | echo "Provisioning State: $provisioningState"
19 |
20 | if [[ "$provisioningState" == "Succeeded" ]]; then
21 | echo "Provisioning State: $provisioningState, Please proceed with project creation template."
22 | break
23 | fi
24 |
25 | if [[ "$provisioningState" == "Failed" || "$provisioningState" == "Canceled" ]]; then
26 | echo "Provisioning State: $provisioningState, project provisioning will not work."
27 | break
28 | fi
29 |
30 | sleep 30
31 | done
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/15-private-network-standard-agent-setup/modules-network-secured/add-project-capability-host.bicep:
--------------------------------------------------------------------------------
1 | param cosmosDBConnection string
2 | param azureStorageConnection string
3 | param aiSearchConnection string
4 | param projectName string
5 | param accountName string
6 | param projectCapHost string
7 |
8 | var threadConnections = ['${cosmosDBConnection}']
9 | var storageConnections = ['${azureStorageConnection}']
10 | var vectorStoreConnections = ['${aiSearchConnection}']
11 |
12 |
13 | resource account 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' existing = {
14 | name: accountName
15 | }
16 |
17 | resource project 'Microsoft.CognitiveServices/accounts/projects@2025-04-01-preview' existing = {
18 | name: projectName
19 | parent: account
20 | }
21 |
22 | resource projectCapabilityHost 'Microsoft.CognitiveServices/accounts/projects/capabilityHosts@2025-04-01-preview' = {
23 | name: projectCapHost
24 | parent: project
25 | properties: {
26 | capabilityHostKind: 'Agents'
27 | vectorStoreConnections: vectorStoreConnections
28 | storageConnections: storageConnections
29 | threadStorageConnections: threadConnections
30 | }
31 |
32 | }
33 |
34 | output projectCapHost string = projectCapabilityHost.name
35 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/15-private-network-standard-agent-setup/modules-network-secured/ai-account-reference.bicep:
--------------------------------------------------------------------------------
1 | @description('Reference to an existing AI account. This module is used to reference an existing AI account in the Bicep template.')
2 | param accountName string
3 |
4 | resource account 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' existing = {
5 | name: accountName
6 | }
7 |
8 | output accountName string = account.name
9 | output accountID string = account.id
10 | output accountTarget string = account.properties.endpoint
11 | output accountPrincipalId string = account.identity.principalId
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/15-private-network-standard-agent-setup/modules-network-secured/ai-project-reference.bicep:
--------------------------------------------------------------------------------
1 | param accountName string
2 | param projectName string
3 | param cosmosDBName string
4 | param azureStorageName string
5 | param aiSearchName string
6 |
7 |
8 | resource account 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' existing = {
9 | name: accountName
10 | scope: resourceGroup()
11 | }
12 |
13 | resource project 'Microsoft.CognitiveServices/accounts/projects@2025-04-01-preview' existing = {
14 | parent: account
15 | name: projectName
16 |
17 | resource project_connection_cosmosdb_account 'connections@2025-04-01-preview' existing = {
18 | name: cosmosDBName
19 | }
20 |
21 | resource project_connection_azure_storage 'connections@2025-04-01-preview' existing= {
22 | name: azureStorageName
23 | }
24 |
25 | resource project_connection_ai_search 'connections@2025-04-01-preview' existing= {
26 | name: aiSearchName
27 | }
28 | }
29 |
30 | output projectName string = project.name
31 | output projectId string = project.id
32 | output projectPrincipalId string = project.identity.principalId
33 |
34 | #disable-next-line BCP053
35 | output projectWorkspaceId string = project.properties.internalId
36 |
37 | // return the BYO connection names
38 | output cosmosDBConnection string = cosmosDBName
39 | output azureStorageConnection string = azureStorageName
40 | output aiSearchConnection string = aiSearchName
41 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/15-private-network-standard-agent-setup/modules-network-secured/azure-storage-account-role-assignment.bicep:
--------------------------------------------------------------------------------
1 | param azureStorageName string
2 | param projectPrincipalId string
3 |
4 | resource storageAccount 'Microsoft.Storage/storageAccounts@2023-05-01' existing = {
5 | name: azureStorageName
6 | scope: resourceGroup()
7 | }
8 |
9 | // Blob Storage Owner: b7e6dc6d-f1e8-4753-8033-0f276bb0955b
10 | // Blob Storage Contributor: ba92f5b4-2d11-453d-a403-e96b0029c9fe
11 | resource storageBlobDataContributor 'Microsoft.Authorization/roleDefinitions@2022-05-01-preview' existing = {
12 | name: 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'
13 | scope: resourceGroup()
14 | }
15 |
16 | resource storageBlobDataContributorRoleAssignmentProject 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
17 | scope: storageAccount
18 | name: guid(projectPrincipalId, storageBlobDataContributor.id, storageAccount.id)
19 | properties: {
20 | principalId: projectPrincipalId
21 | roleDefinitionId: storageBlobDataContributor.id
22 | principalType: 'ServicePrincipal'
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/15-private-network-standard-agent-setup/modules-network-secured/cosmosdb-account-role-assignment.bicep:
--------------------------------------------------------------------------------
1 | // Assigns Role Cosmos DB Operator to the Project Principal ID
2 | @description('Name of the AI Search resource')
3 | param cosmosDBName string
4 |
5 | @description('Principal ID of the AI project')
6 | param projectPrincipalId string
7 |
8 |
9 | resource cosmosDBAccount 'Microsoft.DocumentDB/databaseAccounts@2024-12-01-preview' existing = {
10 | name: cosmosDBName
11 | scope: resourceGroup()
12 | }
13 |
14 | resource cosmosDBOperatorRole 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = {
15 | name: '230815da-be43-4aae-9cb4-875f7bd000aa'
16 | scope: resourceGroup()
17 | }
18 |
19 | resource cosmosDBOperatorRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
20 | scope: cosmosDBAccount
21 | name: guid(projectPrincipalId, cosmosDBOperatorRole.id, cosmosDBAccount.id)
22 | properties: {
23 | principalId: projectPrincipalId
24 | roleDefinitionId: cosmosDBOperatorRole.id
25 | principalType: 'ServicePrincipal'
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/15-private-network-standard-agent-setup/modules-network-secured/format-project-workspace-id.bicep:
--------------------------------------------------------------------------------
1 |
2 | param projectWorkspaceId string
3 |
4 | var part1 = substring(projectWorkspaceId, 0, 8) // First 8 characters
5 | var part2 = substring(projectWorkspaceId, 8, 4) // Next 4 characters
6 | var part3 = substring(projectWorkspaceId, 12, 4) // Next 4 characters
7 | var part4 = substring(projectWorkspaceId, 16, 4) // Next 4 characters
8 | var part5 = substring(projectWorkspaceId, 20, 12) // Remaining 12 characters
9 |
10 | var formattedGuid = '${part1}-${part2}-${part3}-${part4}-${part5}'
11 |
12 | output projectWorkspaceIdGuid string = formattedGuid
13 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/15-private-network-standard-agent-setup/modules-network-secured/standard-dependent-reference.bicep:
--------------------------------------------------------------------------------
1 | @description('The name of the AI Search resource to reference')
2 | param aiSearchName string
3 |
4 | @description('Name of the storage account to reference')
5 | param azureStorageName string
6 |
7 | @description('Name of the new Cosmos DB account to reference')
8 | param cosmosDBName string
9 |
10 |
11 | resource cosmosDB 'Microsoft.DocumentDB/databaseAccounts@2024-11-15' existing = {
12 | name: cosmosDBName
13 | }
14 |
15 | resource aiSearch 'Microsoft.Search/searchServices@2024-06-01-preview' existing = {
16 | name: aiSearchName
17 | }
18 |
19 | resource storage 'Microsoft.Storage/storageAccounts@2023-05-01' existing = {
20 | name: azureStorageName
21 |
22 | }
23 |
24 | output aiSearchName string = aiSearch.name
25 | output azureStorageName string = storage.name
26 | output cosmosDBName string = cosmosDB.name
27 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/20-user-assigned-identity/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | description: This template deploys an Azure AI Foundry account, project, and model deployment with your User-Assigned Managed Identity.
3 | page_type: sample
4 | products:
5 | - azure
6 | - azure-resource-manager
7 | urlFragment: aifoundry-uai
8 | languages:
9 | - bicep
10 | - json
11 | ---
12 | # Set up Azure AI Foundry with user-assigned identity
13 |
14 | This Azure AI Foundry template is built on Azure Cognitive Services as a resource provider. This template deploys an Azure AI Foundry account and project, previously known as Azure AI Services.
15 |
16 | Run the command for BICEP:
17 |
18 | az deployment group create --name "{DEPLOYMENT_NAME}" --resource-group "{RESOURCE_GROUP_NAME}" --template-file ./main.bicep --parameters userAssignedIdentityName="{UASER_ASSIGNED_MANAGED_IDENTITY_NAME}"
19 |
20 | Limitations:
21 | 1. User-Assigned Managed Identity is not supported with Customer Managed Keys.
22 |
23 | If you are new to Azure AI Foundry, see:
24 |
25 | - [Azure AI Foundry](https://learn.microsoft.com/azure/ai-foundry/)
26 |
27 | If you are new to template deployment, see:
28 |
29 | - [Azure Resource Manager documentation](https://learn.microsoft.com/azure/azure-resource-manager/)
30 | - [Azure AI services quickstart article](https://learn.microsoft.com/azure/cognitive-services/resource-manager-template)
31 |
32 | `Tags: Microsoft.CognitiveServices/accounts/projects`
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/20-user-assigned-identity/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://aka.ms/azure-quickstart-templates-metadata-schema#",
3 | "itemDisplayName": "Creates an AI Foundry using User-Assigned Identity",
4 | "description": "This template allows you to create an AI Foundry account and project using User-Assigned Identity.",
5 | "summary": "This template allows you to create an AI Foundry account and project using User-Assigned Identity.",
6 | "githubUsername": "andyaviles121",
7 | "dateUpdated": "2025-04-16",
8 | "type": "QuickStart"
9 | }
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/25-entraid-passthrough/README.md:
--------------------------------------------------------------------------------
1 | # Azure AI Agent Service: Standard Agent Setup 1RP with Private E2E Networking
2 |
3 | > **NOTE:** This template is to set-up a connection to a storage account and assign entraID passthrough for your storage resource. This includes creating:
4 | * a Foundry resource
5 | * A storage account (the one other resource to connect to)
6 | * Azure storage connection with EntraID passthrough auth
7 | * Storage Blob Data Owner role assignment for project MSI on storage
8 |
9 | ## Steps
10 |
11 | 1. Create new (or use existing) resource group:
12 |
13 | ```bash
14 | az group create --name --location eastus
15 | ```
16 |
17 | 2. Deploy the main-create.bicep
18 |
19 | ```bash
20 | az deployment group create --resource-group --template-file main.bicep
21 | ```
22 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/30-customer-managed-keys/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | description: This template deploys an Azure AI Foundry account, project, and model deployment while using your key for encryption (Customer Managed Key).
3 | page_type: sample
4 | products:
5 | - azure
6 | - azure-resource-manager
7 | urlFragment: aifoundry-cmk
8 | languages:
9 | - bicep
10 | - json
11 | ---
12 | # Set up Azure AI Foundry with Customer Managed Keys for Encryption
13 |
14 | This Azure AI Foundry template example demonstrates how to configure customer-managed key encryption on an AI Foundry resource.
15 |
16 | Configuring customer managed keys is performed using a two-step approach, in which first the resource is created without encryption to allow the managed identity to be created. In a second step, the managed identity is assigned access to your key vault and encryption is applied on your resource.
17 |
18 | Run the command for BICEP:
19 |
20 | az deployment group create --name "{DEPLOYMENT_NAME}" --resource-group "{RESOURCE_GROUP_NAME}" --template-file ./main.bicep --parameters azureKeyVaultName="{KEY_VAULT_NAME}" azureKeyName="{KEY_NAME}" azureKeyVersion="{KEY_VERSION}"
21 |
22 | Prerequisites:
23 | 1. An Azure Key Vault with an existing key, soft delete and purge protection enabled
24 |
25 | Limitations:
26 | 1. Agent service does not support customer-managed key encryption in the basic setup. To use customer-managed key encryption, you must bring your own storage resources using the standard setup.
27 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/30-customer-managed-keys/deployment.parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "aiFoundryName": {
6 | "value": ""
7 | },
8 | "location": {
9 | "value": "eastus2"
10 | },
11 | "keyVaultName": {
12 | "value": ""
13 | },
14 | "keyName": {
15 | "value": ""
16 | },
17 | "keyVersion": {
18 | "value": ""
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/31-customer-managed-keys-standard-agent/deployment.parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "location": {
6 | "value": ""
7 | },
8 | "aiFoundryName": {
9 | "value": ""
10 | },
11 | "projectName": {
12 | "value": ""
13 | },
14 | "aiSearchResourceId": {
15 | "value": ""
16 | },
17 | "azureStorageAccountResourceId": {
18 | "value": ""
19 | },
20 | "azureCosmosDBAccountResourceId": {
21 | "value": ""
22 | },
23 | "projectCapHost": {
24 | "value": "projcaphost"
25 | },
26 | "accountCapHost": {
27 | "value": "caphostacc"
28 | },
29 | "keyVaultName": {
30 | "value": "yourkeyvaultname"
31 | },
32 | "keyName": {
33 | "value": "yourkeyvaultkey"
34 | },
35 | "keyVersion": {
36 | "value": "yourkeyversion"
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/31-customer-managed-keys-standard-agent/modules-standard/add-project-capability-host.bicep:
--------------------------------------------------------------------------------
1 | param cosmosDBConnection string
2 | param azureStorageConnection string
3 | param aiSearchConnection string
4 | param projectName string
5 | param accountName string
6 | param projectCapHost string
7 | param accountCapHost string
8 |
9 | var threadConnections = ['${cosmosDBConnection}']
10 | var storageConnections = ['${azureStorageConnection}']
11 | var vectorStoreConnections = ['${aiSearchConnection}']
12 |
13 | #disable-next-line BCP081
14 | resource account 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' existing = {
15 | name: accountName
16 | }
17 | #disable-next-line BCP081
18 | resource project 'Microsoft.CognitiveServices/accounts/projects@2025-04-01-preview' existing = {
19 | name: projectName
20 | parent: account
21 | }
22 |
23 | #disable-next-line BCP081
24 | resource accountCapabilityHost 'Microsoft.CognitiveServices/accounts/capabilityHosts@2025-04-01-preview' = {
25 | name: accountCapHost
26 | parent: account
27 | properties: {
28 | capabilityHostKind: 'Agents'
29 | }
30 | }
31 |
32 | #disable-next-line BCP081
33 | resource projectCapabilityHost 'Microsoft.CognitiveServices/accounts/projects/capabilityHosts@2025-04-01-preview' = {
34 | name: projectCapHost
35 | parent: project
36 | properties: {
37 | capabilityHostKind: 'Agents'
38 | vectorStoreConnections: vectorStoreConnections
39 | storageConnections: storageConnections
40 | threadStorageConnections: threadConnections
41 | }
42 | dependsOn: [
43 | accountCapabilityHost
44 | ]
45 | }
46 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/31-customer-managed-keys-standard-agent/modules-standard/ai-search-role-assignments.bicep:
--------------------------------------------------------------------------------
1 | // Assigns the necessary roles to the AI project
2 |
3 | @description('Name of the AI Search resource')
4 | param aiSearchName string
5 |
6 | @description('Principal ID of the AI project')
7 | param projectPrincipalId string
8 |
9 | resource searchService 'Microsoft.Search/searchServices@2024-06-01-preview' existing = {
10 | name: aiSearchName
11 | scope: resourceGroup()
12 | }
13 |
14 | // search roles
15 | resource searchIndexDataContributorRole 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = {
16 | name: '8ebe5a00-799e-43f5-93ac-243d3dce84a7'
17 | scope: resourceGroup()
18 | }
19 |
20 | resource searchIndexDataContributorAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
21 | scope: searchService
22 | name: guid(projectPrincipalId, searchIndexDataContributorRole.id, searchService.id)
23 | properties: {
24 | principalId: projectPrincipalId
25 | roleDefinitionId: searchIndexDataContributorRole.id
26 | principalType: 'ServicePrincipal'
27 | }
28 | }
29 |
30 | resource searchServiceContributorRole 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = {
31 | name: '7ca78c08-252a-4471-8644-bb5ff32d4ba0'
32 | scope: resourceGroup()
33 | }
34 |
35 | resource searchServiceContributorRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
36 | scope: searchService
37 | name: guid(projectPrincipalId, searchServiceContributorRole.id, searchService.id)
38 | properties: {
39 | principalId: projectPrincipalId
40 | roleDefinitionId: searchServiceContributorRole.id
41 | principalType: 'ServicePrincipal'
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/31-customer-managed-keys-standard-agent/modules-standard/azure-storage-account-role-assignment.bicep:
--------------------------------------------------------------------------------
1 | param azureStorageName string
2 | param projectPrincipalId string
3 |
4 | resource storageAccount 'Microsoft.Storage/storageAccounts@2023-05-01' existing = {
5 | name: azureStorageName
6 | scope: resourceGroup()
7 | }
8 |
9 | // Blob Storage Owner: b7e6dc6d-f1e8-4753-8033-0f276bb0955b
10 | // Blob Storage Contributor: ba92f5b4-2d11-453d-a403-e96b0029c9fe
11 | resource storageBlobDataContributor 'Microsoft.Authorization/roleDefinitions@2022-05-01-preview' existing = {
12 | name: 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'
13 | scope: resourceGroup()
14 | }
15 |
16 | resource storageBlobDataContributorRoleAssignmentProject 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
17 | scope: storageAccount
18 | name: guid(projectPrincipalId, storageBlobDataContributor.id, storageAccount.id)
19 | properties: {
20 | principalId: projectPrincipalId
21 | roleDefinitionId: storageBlobDataContributor.id
22 | principalType: 'ServicePrincipal'
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/31-customer-managed-keys-standard-agent/modules-standard/cosmosdb-account-role-assignment.bicep:
--------------------------------------------------------------------------------
1 | // Assigns Role Cosmos DB Operator to the Project Principal ID
2 | @description('Name of the AI Search resource')
3 | param cosmosDBName string
4 |
5 | @description('Principal ID of the AI project')
6 | param projectPrincipalId string
7 |
8 | resource cosmosDBAccount 'Microsoft.DocumentDB/databaseAccounts@2024-12-01-preview' existing = {
9 | name: cosmosDBName
10 | scope: resourceGroup()
11 | }
12 |
13 | resource cosmosDBOperatorRole 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = {
14 | name: '230815da-be43-4aae-9cb4-875f7bd000aa'
15 | scope: resourceGroup()
16 | }
17 |
18 | resource cosmosDBOperatorRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
19 | scope: cosmosDBAccount
20 | name: guid(projectPrincipalId, cosmosDBOperatorRole.id, cosmosDBAccount.id)
21 | properties: {
22 | principalId: projectPrincipalId
23 | roleDefinitionId: cosmosDBOperatorRole.id
24 | principalType: 'ServicePrincipal'
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/40-basic-agent-setup/README.md:
--------------------------------------------------------------------------------
1 | # Azure AI Foundry Agent Service: Basic Setup
2 |
3 | ## Basic Agent Setup
4 |
5 |
6 | This bicep template provisions required resources for a basic project setup. A new Cognitive Services Account is created, a gpt-4o model is deployed, and a new project is created.
7 |
8 | All agents created in this project will automatically use Microsoft managed, multitenant search and storage resources.
9 |
10 | ### Prerequisites
11 | 1. To deploy the template, you must have the following roles:
12 | * **Azure AI Account Owner** or **Contributor**
13 | 1. To create your first agent you must have the permissions:
14 | * **Azure AI User**
15 |
16 | For more information, [see the getting started guide.](https://learn.microsoft.com/en-us/azure/ai-services/agents/environment-setup)
17 |
18 | ### Steps
19 |
20 | 1. To deploy this template, click the "Deploy to Azure" button or you can run one of the following commands:
21 |
22 | [](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fazure-ai-foundry%2Ffoundry-samples%2Frefs%2Fheads%2Fmain%2Fsamples%2Fmicrosoft%2Finfrastructure-setup%2F40-basic-agent-setup%2Fbasic-setup.json)
23 |
24 |
25 | * Create new (or use existing) resource group:
26 |
27 | ```bash
28 | az group create --name --location eastus
29 | ```
30 |
31 | * Deploy the template
32 |
33 | ```bash
34 | az deployment group create --resource-group --template-file basic-setup.bicep
35 | ```
36 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/40-basic-agent-setup/basic-setup.parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "location": {
6 | "value": "eastus"
7 | },
8 | "aiServicesName": {
9 | "value": "aiServices"
10 | },
11 | "projectName": {
12 | "value": "project"
13 | },
14 | "modelName": {
15 | "value": "gpt-4o"
16 | },
17 | "modelFormat": {
18 | "value": "OpenAI"
19 | },
20 | "modelVersion": {
21 | "value": "2024-11-20"
22 | },
23 | "modelSkuName": {
24 | "value": "GlobalStandard"
25 | },
26 | "modelCapacity": {
27 | "value": 1
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/41-standard-agent-setup/azuredeploy.parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "location": {
6 | "value": "eastus"
7 | },
8 | "aiServices": {
9 | "value": "aiservices"
10 | },
11 | "firstProjectName": {
12 | "value": "project"
13 | },
14 | "modelName": {
15 | "value": "gpt-4o"
16 | },
17 | "modelFormat": {
18 | "value": "OpenAI"
19 | },
20 | "modelVersion": {
21 | "value": "2024-11-20"
22 | },
23 | "modelSkuName": {
24 | "value": "GlobalStandard"
25 | },
26 | "modelCapacity": {
27 | "value": 1
28 | },
29 | "aiSearchResourceId": {
30 | "value": ""
31 | },
32 | "azureStorageAccountResourceId": {
33 | "value": ""
34 | },
35 | "azureCosmosDBAccountResourceId": {
36 | "value": ""
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/41-standard-agent-setup/modules-standard/add-project-capability-host.bicep:
--------------------------------------------------------------------------------
1 | param cosmosDBConnection string
2 | param azureStorageConnection string
3 | param aiSearchConnection string
4 | param projectName string
5 | param accountName string
6 | param projectCapHost string
7 | param accountCapHost string
8 |
9 | var threadConnections = ['${cosmosDBConnection}']
10 | var storageConnections = ['${azureStorageConnection}']
11 | var vectorStoreConnections = ['${aiSearchConnection}']
12 |
13 |
14 | resource account 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' existing = {
15 | name: accountName
16 | }
17 |
18 | resource project 'Microsoft.CognitiveServices/accounts/projects@2025-04-01-preview' existing = {
19 | name: projectName
20 | parent: account
21 | }
22 |
23 | resource accountCapabilityHost 'Microsoft.CognitiveServices/accounts/capabilityHosts@2025-04-01-preview' = {
24 | name: accountCapHost
25 | parent: account
26 | properties: {
27 | capabilityHostKind: 'Agents'
28 |
29 | }
30 | }
31 |
32 |
33 | resource projectCapabilityHost 'Microsoft.CognitiveServices/accounts/projects/capabilityHosts@2025-04-01-preview' = {
34 | name: projectCapHost
35 | parent: project
36 | properties: {
37 | capabilityHostKind: 'Agents'
38 | vectorStoreConnections: vectorStoreConnections
39 | storageConnections: storageConnections
40 | threadStorageConnections: threadConnections
41 | }
42 | dependsOn: [
43 | accountCapabilityHost
44 | ]
45 | }
46 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/41-standard-agent-setup/modules-standard/ai-account-identity.bicep:
--------------------------------------------------------------------------------
1 |
2 | param accountName string
3 | param location string
4 | param modelName string
5 | param modelFormat string
6 | param modelVersion string
7 | param modelSkuName string
8 | param modelCapacity int
9 |
10 | resource account 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' = {
11 | name: accountName
12 | location: location
13 | sku: {
14 | name: 'S0'
15 | }
16 | kind: 'AIServices'
17 | identity: {
18 | type: 'SystemAssigned'
19 | }
20 | properties: {
21 | allowProjectManagement: true
22 | customSubDomainName: accountName
23 | networkAcls: {
24 | defaultAction: 'Allow'
25 | virtualNetworkRules: []
26 | ipRules: []
27 | }
28 | publicNetworkAccess: 'Enabled'
29 |
30 | // API-key based auth is not supported for the Agent service
31 | disableLocalAuth: false
32 | }
33 | }
34 |
35 | resource modelDeployment 'Microsoft.CognitiveServices/accounts/deployments@2025-04-01-preview'= {
36 | parent: account
37 | name: modelName
38 | sku : {
39 | capacity: modelCapacity
40 | name: modelSkuName
41 | }
42 | properties: {
43 | model:{
44 | name: modelName
45 | format: modelFormat
46 | version: modelVersion
47 | }
48 | }
49 | }
50 |
51 | output accountName string = account.name
52 | output accountID string = account.id
53 | output accountTarget string = account.properties.endpoint
54 | output accountPrincipalId string = account.identity.principalId
55 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/41-standard-agent-setup/modules-standard/ai-search-role-assignments.bicep:
--------------------------------------------------------------------------------
1 | // Assigns the necessary roles to the AI project
2 |
3 | @description('Name of the AI Search resource')
4 | param aiSearchName string
5 |
6 | @description('Principal ID of the AI project')
7 | param projectPrincipalId string
8 |
9 | resource searchService 'Microsoft.Search/searchServices@2024-06-01-preview' existing = {
10 | name: aiSearchName
11 | scope: resourceGroup()
12 | }
13 |
14 | // search roles
15 | resource searchIndexDataContributorRole 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = {
16 | name: '8ebe5a00-799e-43f5-93ac-243d3dce84a7'
17 | scope: resourceGroup()
18 | }
19 |
20 | resource searchIndexDataContributorAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
21 | scope: searchService
22 | name: guid(projectPrincipalId, searchIndexDataContributorRole.id, searchService.id)
23 | properties: {
24 | principalId: projectPrincipalId
25 | roleDefinitionId: searchIndexDataContributorRole.id
26 | principalType: 'ServicePrincipal'
27 | }
28 | }
29 |
30 | resource searchServiceContributorRole 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = {
31 | name: '7ca78c08-252a-4471-8644-bb5ff32d4ba0'
32 | scope: resourceGroup()
33 | }
34 |
35 | resource searchServiceContributorRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
36 | scope: searchService
37 | name: guid(projectPrincipalId, searchServiceContributorRole.id, searchService.id)
38 | properties: {
39 | principalId: projectPrincipalId
40 | roleDefinitionId: searchServiceContributorRole.id
41 | principalType: 'ServicePrincipal'
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/41-standard-agent-setup/modules-standard/azure-storage-account-role-assignment.bicep:
--------------------------------------------------------------------------------
1 | param azureStorageName string
2 | param projectPrincipalId string
3 |
4 | resource storageAccount 'Microsoft.Storage/storageAccounts@2023-05-01' existing = {
5 | name: azureStorageName
6 | scope: resourceGroup()
7 | }
8 |
9 | // Blob Storage Owner: b7e6dc6d-f1e8-4753-8033-0f276bb0955b
10 | // Blob Storage Contributor: ba92f5b4-2d11-453d-a403-e96b0029c9fe
11 | resource storageBlobDataContributor 'Microsoft.Authorization/roleDefinitions@2022-05-01-preview' existing = {
12 | name: 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'
13 | scope: resourceGroup()
14 | }
15 |
16 | resource storageBlobDataContributorRoleAssignmentProject 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
17 | scope: storageAccount
18 | name: guid(projectPrincipalId, storageBlobDataContributor.id, storageAccount.id)
19 | properties: {
20 | principalId: projectPrincipalId
21 | roleDefinitionId: storageBlobDataContributor.id
22 | principalType: 'ServicePrincipal'
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/41-standard-agent-setup/modules-standard/cosmosdb-account-role-assignment.bicep:
--------------------------------------------------------------------------------
1 | // Assigns Role Cosmos DB Operator to the Project Principal ID
2 | @description('Name of the AI Search resource')
3 | param cosmosDBName string
4 |
5 | @description('Principal ID of the AI project')
6 | param projectPrincipalId string
7 |
8 |
9 | resource cosmosDBAccount 'Microsoft.DocumentDB/databaseAccounts@2024-12-01-preview' existing = {
10 | name: cosmosDBName
11 | scope: resourceGroup()
12 | }
13 |
14 | resource cosmosDBOperatorRole 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = {
15 | name: '230815da-be43-4aae-9cb4-875f7bd000aa'
16 | scope: resourceGroup()
17 | }
18 |
19 | resource cosmosDBOperatorRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
20 | scope: cosmosDBAccount
21 | name: guid(projectPrincipalId, cosmosDBOperatorRole.id, cosmosDBAccount.id)
22 | properties: {
23 | principalId: projectPrincipalId
24 | roleDefinitionId: cosmosDBOperatorRole.id
25 | principalType: 'ServicePrincipal'
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/41-standard-agent-setup/modules-standard/format-project-workspace-id.bicep:
--------------------------------------------------------------------------------
1 |
2 | param projectWorkspaceId string
3 |
4 | var part1 = substring(projectWorkspaceId, 0, 8) // First 8 characters
5 | var part2 = substring(projectWorkspaceId, 8, 4) // Next 4 characters
6 | var part3 = substring(projectWorkspaceId, 12, 4) // Next 4 characters
7 | var part4 = substring(projectWorkspaceId, 16, 4) // Next 4 characters
8 | var part5 = substring(projectWorkspaceId, 20, 12) // Remaining 12 characters
9 |
10 | var formattedGuid = '${part1}-${part2}-${part3}-${part4}-${part5}'
11 |
12 | output projectWorkspaceIdGuid string = formattedGuid
13 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/42-basic-agent-setup-use-existing-azureopenai/azurebyo.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/infrastructure-setup/42-basic-agent-setup-use-existing-azureopenai/azurebyo.PNG
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/42-basic-agent-setup-use-existing-azureopenai/main.parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "location": {
6 | "value": "westus"
7 | },
8 | "ai_services": {
9 | "value": "aiServices"
10 | },
11 | "project_name": {
12 | "value": "project"
13 | },
14 | "existingAoaiResourceId": {
15 | "value": "byo-oai-resource-id"
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/45-basic-agent-bing/README.md:
--------------------------------------------------------------------------------
1 | # Azure AI Foundry Agent Service: Basic Agent Setup with the Bing Search Tool
2 |
3 | Use this template as a starting point for creating a basic agent project where you know you will want to create agents with the Grounding with Bing Search tool. For more information, see [Azure AI Services Agents Environment Setup](https://learn.microsoft.com/en-us/azure/ai-services/agents/environment-setup).
4 |
5 | > **Note:** Deploying the template does not create an agent; it only provisions the necessary resources to get started.
6 |
7 |
8 | ## Getting started
9 |
10 | Creating your first agent with Azure AI Foundry Agent Service is a two-step process:
11 |
12 | 1. **Set up your agent environment.**
13 | 2. **Create and configure your agent** using either your preferred SDK or the Azure Foundry Portal.
14 |
15 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/45-basic-agent-bing/modules/add-bing-search-tool.bicep:
--------------------------------------------------------------------------------
1 | param account_name string = 'aiservicesy4si'
2 | param bingSearchName string = 'bingsearch-${account_name}'
3 |
4 | #disable-next-line BCP081
5 | resource account_name_resource 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' existing = {
6 | name: account_name
7 | scope: resourceGroup()
8 | }
9 |
10 | #disable-next-line BCP081
11 | resource bingSearch 'Microsoft.Bing/accounts@2020-06-10' = {
12 | name: bingSearchName
13 | location: 'global'
14 | sku: {
15 | name: 'G1'
16 | }
17 | kind: 'Bing.Grounding'
18 | }
19 |
20 | #disable-next-line BCP081
21 | resource bing_search_account_connection 'Microsoft.CognitiveServices/accounts/connections@2025-04-01-preview' = {
22 | name: '${account_name}-bingsearchconnection'
23 | parent: account_name_resource
24 | properties: {
25 | category: 'ApiKey'
26 | target: 'https://api.bing.microsoft.com/'
27 | authType: 'ApiKey'
28 | credentials: {
29 | key: '${listKeys(bingSearch.id, '2020-06-10').key1}'
30 | }
31 | isSharedToAll: true
32 | metadata: {
33 | ApiType: 'Azure'
34 | Location: bingSearch.location
35 | ResourceId: bingSearch.id
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/45-basic-agent-bing/modules/ai-account-keys.bicep:
--------------------------------------------------------------------------------
1 |
2 | param account_name string
3 | param location string
4 | param modelName string
5 | param modelFormat string
6 | param modelVersion string
7 | param modelSkuName string
8 | param modelCapacity int
9 |
10 |
11 |
12 | #disable-next-line BCP081
13 | resource account_name_resource 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' = {
14 | name: account_name
15 | location: location
16 | sku: {
17 | name: 'S0'
18 | }
19 | kind: 'AIServices'
20 | identity: {
21 | type: 'SystemAssigned'
22 | }
23 | properties: {
24 | allowProjectManagement: true
25 | customSubDomainName: account_name
26 | networkAcls: {
27 | defaultAction: 'Allow'
28 | virtualNetworkRules: []
29 | ipRules: []
30 | }
31 | publicNetworkAccess: 'Enabled'
32 | disableLocalAuth: false
33 | }
34 | }
35 |
36 |
37 | resource modelDeployment 'Microsoft.CognitiveServices/accounts/deployments@2024-10-01'= {
38 | parent: account_name_resource
39 | name: modelName
40 | sku : {
41 | capacity: modelCapacity
42 | name: modelSkuName
43 | }
44 | properties: {
45 | model:{
46 | name: modelName
47 | format: modelFormat
48 | version: modelVersion
49 | }
50 | }
51 | }
52 |
53 | output account_name string = account_name_resource.name
54 | output account_name_id string = account_name_resource.id
55 | output aiServicesTarget string = account_name_resource.properties.endpoint
56 |
--------------------------------------------------------------------------------
/samples/microsoft/infrastructure-setup/45-basic-agent-bing/modules/ai-project-keys.bicep:
--------------------------------------------------------------------------------
1 |
2 | param account_name string
3 | param location string
4 | param project_name string
5 | param description string
6 | param display_name string
7 |
8 | #disable-next-line BCP081
9 | resource account_name_resource 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' existing = {
10 | name: account_name
11 | scope: resourceGroup()
12 | }
13 |
14 | #disable-next-line BCP081
15 | resource account_name_project_name 'Microsoft.CognitiveServices/accounts/projects@2025-04-01-preview' = {
16 | parent: account_name_resource
17 | name: project_name
18 | location: location
19 | identity: {
20 | type: 'SystemAssigned'
21 | }
22 | properties: {
23 | description: description
24 | displayName: display_name
25 | }
26 | }
27 |
28 | output project_name string = account_name_project_name.name
29 | output project_id string = account_name_project_name.id
30 | output projectPrincipalId string = account_name_project_name.identity.principalId
31 |
--------------------------------------------------------------------------------
/samples/microsoft/java/mslearn-resources/quickstart/.env.template:
--------------------------------------------------------------------------------
1 | # Azure AI Foundry Endpoint
2 | AZURE_ENDPOINT=your_endpoint_here
3 |
4 | # Azure AI Foundry Model Deployment Name
5 | AZURE_DEPLOYMENT=your_deployment_name_here
6 |
7 | # Project ID (Optional - will be generated if not provided)
8 | PROJECT_ID=your_project_id_here
9 | MODEL_DEPLOYMENT_NAME=gpt-4o
10 |
11 | # Note: This sample uses DefaultAzureCredential for authentication
12 | # Please ensure you are logged in with Azure CLI using 'az login'
13 | # For more authentication options, see: https://learn.microsoft.com/en-us/java/api/overview/azure/identity-readme?view=azure-java-stable
14 |
--------------------------------------------------------------------------------
/samples/microsoft/java/mslearn-resources/quickstart/src/main/java/com/azure/ai/foundry/samples/README.md:
--------------------------------------------------------------------------------
1 | # Azure AI Foundry SDK Java Samples
2 |
3 | This directory contains Java sample code for the Azure AI Foundry SDK.
4 |
5 | ## Available Samples
6 |
7 | 1. **CreateProject** - Demonstrates creating a new project in Azure AI Foundry
8 | 2. **ChatCompletionSample** - Shows how to use the chat completion API
9 | 3. **ChatCompletionStreamingSample** - Demonstrates streaming chat completions
10 | 4. **AgentSample** - Shows how to create and run an agent
11 | 5. **FileSearchAgentSample** - Demonstrates adding file search capabilities to an agent
12 | 6. **EvaluateAgentSample** - Shows how to evaluate agent runs
13 |
14 | ## Running the Samples
15 |
16 | See the main [README.md](../../README.md) file for instructions on how to set up and run these samples.
17 |
18 | For detailed testing procedures, refer to [TESTING.md](../../TESTING.md).
19 |
--------------------------------------------------------------------------------
/samples/microsoft/javascript/mslearn-resources/quickstart/.env.template:
--------------------------------------------------------------------------------
1 | MODEL_DEPLOYMENT_NAME=gpt-4o
2 | PROJECT_ENDPOINT=https://.services.ai.azure.com/api/projects/
--------------------------------------------------------------------------------
/samples/microsoft/javascript/mslearn-resources/quickstart/README.md:
--------------------------------------------------------------------------------
1 | # JavaScript QuickStart
2 |
3 | ## Set up your environment
4 |
5 | 1. [Install Node.js (LTS is recommended) and the Azure CLI](https://learn.microsoft.com/en-us/azure/ai-foundry/how-to/develop/install-cli-sdk).
6 |
7 | 1. Make sure to sign in using the CLI az login (or az login --use-device-code) command to authenticate before running your JavaScript scripts.
8 |
9 | 1. Download [`env.template`](https://github.com/azure-ai-foundry/foundry-samples/blob/main/samples/microsoft/javascript/mslearn-resources/quickstart/env.template) and rename it to `.env`. Place it in the root of your project directory.
10 | 1. Open the `.env` file and fill in the following variables based upon your AI Foundry resource and project names:
11 |
12 | - `MODEL_DEPLOYMENT_NAME`: Your deployed Azure OpenAI model. Defaults to `gpt-4o`.
13 | - `PROJECT_ENDPOINT`: The endpoint for your AI Foundry project.
14 |
15 | 1. Download [`package.json`](https://github.com/azure-ai-foundry/foundry-samples/blob/main/samples/microsoft/javascript/mslearn-resources/quickstart/package.json).
16 |
17 | 1. Install packages with `npm install`.
18 |
19 | ## Run a chat completion and agent
20 |
21 | Run `npm start` to start the application and trigger the chat completion and agent.
22 |
--------------------------------------------------------------------------------
/samples/microsoft/javascript/mslearn-resources/quickstart/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "foundry-samples-quickstart",
3 | "version": "1.0.0",
4 | "description": "JavaScript AI Foundry Quickstart",
5 | "homepage": "https://github.com/azure-ai-foundry/foundry-samples#readme",
6 | "bugs": {
7 | "url": "https://github.com/azure-ai-foundry/foundry-samples/issues"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "https://github.com/azure-ai-foundry/foundry-samples.git"
12 | },
13 | "license": "MIT",
14 | "author": "Dan Wahlin, Julia Muiruri",
15 | "type": "module",
16 | "main": "src/quickstart.js",
17 | "scripts": {
18 | "start": "node --no-deprecation src/quickstart.js"
19 | },
20 | "dependencies": {
21 | "@azure/ai-projects": "1.0.0-beta.7",
22 | "@azure/ai-agents": "1.0.0-beta.2",
23 | "@azure/identity": "^4.10.0",
24 | "dotenv": "^16.5.0"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Celonis/media/actions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Celonis/media/actions.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Celonis/media/add_action.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Celonis/media/add_action.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Celonis/media/connection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Celonis/media/connection.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Celonis/media/copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Celonis/media/copy.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Celonis/media/create_copilot_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Celonis/media/create_copilot_menu.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Celonis/media/create_custom_tool.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Celonis/media/create_custom_tool.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Celonis/media/new_asset_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Celonis/media/new_asset_menu.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Celonis/media/publish.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Celonis/media/publish.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/MiHCM/ArchitectureOverview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/MiHCM/ArchitectureOverview.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/MiHCM/requirements.txt:
--------------------------------------------------------------------------------
1 | azure-identity==1.19.0
2 | python-dotenv==1.0.1
3 | azure-ai-projects==1.0.0b7
4 | jsonref==1.1.0
5 | # azure-ai-agents
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Morningstar/media/connect-custom-resource.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Morningstar/media/connect-custom-resource.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Morningstar/media/connected-resources.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Morningstar/media/connected-resources.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Morningstar/media/custom-keys.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Morningstar/media/custom-keys.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Morningstar/media/project-assets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Morningstar/media/project-assets.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Trademo_Global_trade/custom_connection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Trademo_Global_trade/custom_connection.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Tripadvisor/media/add-connection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Tripadvisor/media/add-connection.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Tripadvisor/media/add-data-source.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Tripadvisor/media/add-data-source.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Tripadvisor/media/connect-custom-resource.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Tripadvisor/media/connect-custom-resource.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Tripadvisor/media/connected-resources.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Tripadvisor/media/connected-resources.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Tripadvisor/media/custom-keys.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Tripadvisor/media/custom-keys.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/Tripadvisor/media/project-assets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/python/getting-started-agents/3p-tools/Tripadvisor/media/project-assets.png
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/3p-tools/legalfly/.env.example:
--------------------------------------------------------------------------------
1 | PROJECT_ENDPOINT=
2 | MODEL=
3 | LEGALFLY_API_CONNECTION_NAME=
4 |
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/openapi/countries.json:
--------------------------------------------------------------------------------
1 | {
2 | "openapi": "3.1.0",
3 | "info": {
4 | "title": "RestCountries.NET API",
5 | "description": "Web API version 3.1 for managing country items, based on previous implementations from restcountries.eu and restcountries.com.",
6 | "version": "v3.1"
7 | },
8 | "servers": [
9 | { "url": "https://restcountries.net" }
10 | ],
11 | "auth": [],
12 | "paths": {
13 | "/v3.1/currency": {
14 | "get": {
15 | "description": "Search by currency.",
16 | "operationId": "LookupCountryByCurrency",
17 | "parameters": [
18 | {
19 | "name": "currency",
20 | "in": "query",
21 | "description": "The currency to search for.",
22 | "required": true,
23 | "schema": {
24 | "type": "string"
25 | }
26 | }
27 | ],
28 | "responses": {
29 | "200": {
30 | "description": "Success",
31 | "content": {
32 | "text/plain": {
33 | "schema": {
34 | "type": "string"
35 | }
36 | }
37 | }
38 | }
39 | }
40 | }
41 | }
42 | },
43 | "components": {
44 | "schemes": {}
45 | }
46 | }
--------------------------------------------------------------------------------
/samples/microsoft/python/getting-started-agents/requirements.txt:
--------------------------------------------------------------------------------
1 | pytest
2 | openai
3 | azure-ai-projects
4 | azure-ai-agents
5 | azure-identity
--------------------------------------------------------------------------------
/samples/microsoft/python/mslearn-resources/quickstart/README.md:
--------------------------------------------------------------------------------
1 |
2 | ## Install dependencies
3 |
4 | - install azure CLI
5 | - pip install azure-ai-projects openai azure-identity
6 | - az login
7 |
8 | ## Create a project and model deployment
9 |
10 | see: create_project.py
11 |
12 | ## Run a chat completion
13 |
14 | see: quickstart.py
15 |
16 | ## Create and run an agent
17 |
18 | see: quickstart.py
19 |
20 | ## Add file search to agent
21 |
22 | see: quickstart.py
23 |
24 | ## Evaluate agent run
25 |
26 | This will return scores for how good the agent performed on the task
27 |
28 | see: quickstart.py
29 |
--------------------------------------------------------------------------------
/samples/microsoft/python/mslearn-resources/quickstart/create_project.py:
--------------------------------------------------------------------------------
1 | # source: https://github.com/Azure/agent-first-sdk/blob/main/tests/management_sdk/manage_ai_foundry.ipynb
2 |
3 | #
4 | from azure.identity import DefaultAzureCredential
5 | from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient
6 | import os
7 | import json
8 |
9 | subscription_id = 'your-subscription-id'
10 | resource_group_name = 'your-resource-group-name'
11 | foundry_resource_name = 'your-foundry-resource-name'
12 | foundry_project_name = 'your-foundry-project-name'
13 | location = 'eastus'
14 |
15 | # TODO: add code to create create a new resource group
16 |
17 | client = CognitiveServicesManagementClient(
18 | subscription_id=subscription_id,
19 | credential=DefaultAzureCredential(),
20 | api_version="2025-04-01-preview"
21 | )
22 |
23 | account = client.accounts.begin_create(
24 | resource_group_name=resource_group_name,
25 | account_name=foundry_resource_name,
26 | foundry_project_name=foundry_project_name,
27 | account={
28 | "location": location,
29 | "kind": "AIServices",
30 | "sku": {
31 | "name": "S0",
32 | },
33 | "identity": {
34 | "type": "SystemAssigned"
35 | },
36 | "properties": {
37 | "allowProjectManagement": True
38 | }
39 | }
40 | )
41 |
42 | # TODO: code to do role assignment to give user project manager role on the account
43 |
44 | #
45 |
46 | #
47 |
48 | #
--------------------------------------------------------------------------------
/samples/microsoft/python/mslearn-resources/quickstart/requirements.txt:
--------------------------------------------------------------------------------
1 | azure-ai-projects
2 | openai
3 | azure-identity
--------------------------------------------------------------------------------
/samples/microsoft/typescript/src/data/image_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/microsoft/typescript/src/data/image_file.png
--------------------------------------------------------------------------------
/samples/microsoft/typescript/src/data/localFile.txt:
--------------------------------------------------------------------------------
1 | Hello, World!
2 |
--------------------------------------------------------------------------------
/samples/microsoft/typescript/src/data/sampleFileForUpload.txt:
--------------------------------------------------------------------------------
1 | The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457.
2 |
--------------------------------------------------------------------------------
/samples/microsoft/typescript/src/filesWithLocalUpload.ts:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT License.
3 |
4 | /**
5 | * This sample demonstrates how to use basic files agent operations with local file upload from the Azure Agents service.
6 | *
7 | * @summary demonstrates how to use basic files agent operations with local file upload.
8 | */
9 |
10 | import { AgentsClient } from "@azure/ai-agents";
11 | import { DefaultAzureCredential } from "@azure/identity";
12 |
13 | import * as fs from "fs";
14 | import "dotenv/config";
15 |
16 | const projectEndpoint = process.env["PROJECT_ENDPOINT"] || "";
17 |
18 | export async function main(): Promise {
19 | // Create an Azure AI Client
20 | const client = new AgentsClient(projectEndpoint, new DefaultAzureCredential());
21 |
22 | // Upload local file
23 | const filePath = "./data/localFile.txt";
24 | const localFileStream = fs.createReadStream(filePath);
25 | const localFile = await client.files.upload(localFileStream, "assistants", {
26 | fileName: "localFile.txt",
27 | });
28 |
29 | console.log(`Uploaded local file, file ID : ${localFile.id}`);
30 |
31 | // Retrieve local file
32 | const retrievedLocalFile = await client.files.get(localFile.id);
33 |
34 | console.log(`Retrieved local file, file ID : ${retrievedLocalFile.id}`);
35 |
36 | // Delete local file
37 | await client.files.delete(localFile.id);
38 |
39 | console.log(`Deleted local file, file ID : ${localFile.id}`);
40 | }
41 |
42 | main().catch((err) => {
43 | console.error("The sample encountered an error:", err);
44 | });
45 |
--------------------------------------------------------------------------------
/samples/mistral/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azure-ai-foundry/foundry-samples/196555bd5953c6af503159fa13947112723d01b3/samples/mistral/.gitkeep
--------------------------------------------------------------------------------
/samples/mistral/README.md:
--------------------------------------------------------------------------------
1 | # Mistral AI models on Azure Foundry
2 |
3 | This subdirectory contains code samples to get started with Mistral AI models on
4 | the Azure Foundry platform.
5 |
6 | ## Getting started
7 |
8 | The recommended way to set up your environment is to leverage [uv](). Otherwise you
9 | can rely on the auto-generated `requirements.txt` file with the package manager of
10 | your choice (e.g. pip, poetry, etc.)
11 |
12 | To install the required dependencies and start a notebook server, run the following
13 | commands in your terminal:
14 |
15 | ```bash
16 | uv sync # Installs/updates the required dependencies
17 | uv run jupyter notebook # Starts a notebook server
18 | ```
19 |
20 | From there you can open the Jupyter notebook UI in your web browser following the URL
21 | that the previous command will output.
22 |
23 | You can also run the notebooks from Visual Studio Code, please refer to the
24 | [VSCode documentation](https://code.visualstudio.com/docs/datascience/jupyter-notebooks)
25 | for more details.
26 |
--------------------------------------------------------------------------------
/samples/mistral/pyproject.toml:
--------------------------------------------------------------------------------
1 | [project]
2 | name = "mistral-samples-azure-foundry"
3 | version = "0.1.0"
4 | requires-python = ">=3.11"
5 | dependencies = [
6 | "httpx>=0.28.1",
7 | "notebook>=7.4.2",
8 | "pymupdf>=1.25.5",
9 | ]
10 |
--------------------------------------------------------------------------------
/tox.ini:
--------------------------------------------------------------------------------
1 | [tox]
2 | min_version = 4.0
3 |
4 | [testenv]
5 | skip_install = true
6 |
7 | [testenv:black]
8 | deps =
9 | black[jupyter] ~= 23.0
10 | commands = black {posargs}
11 |
12 | [testenv:ruff]
13 | deps =
14 | ruff ~= 0.9.4
15 | commands = ruff {posargs}
16 |
17 | [testenv:nb-clean]
18 | deps =
19 | nb-clean ~= 3.0
20 | commands = nb-clean {posargs}
21 |
22 | [testenv:typos]
23 | deps =
24 | typos ~= 1.16.0
25 | commands = typos {posargs}
26 |
27 | [testenv:pytest]
28 | deps =
29 | -r dev-requirements.txt
30 | commands = pytest {posargs}
31 |
32 |
33 |
--------------------------------------------------------------------------------