Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
Demonstrates how to build a streaming enterprise agent using Azure AI Agent Service. This sample integrates local HR and company policy documents, Bing for external context, and GPT-4o (though the service is model-agnostic) to deliver real-time Q&A and automated workflows.
GitHub checked 568h ago - refresh overdue
This sample demonstrates how to build a streaming enterprise agent using Azure AI Agent Service. The agent can answer questions in real time using local HR and company policy documents, integrate external context via Bing, using gpt-4o-2024-05-13.
This demo teaches developers how to:
Create or Reuse Agents Programmatically
Demonstrates how to connect to an Azure AI Foundry hub, either create a new agent with customized instructions (using GPT-4o or any supported model), or reuse an existing agent.
Incorporate Vector Stores for Enterprise Data
Automatically create or reuse a vector store containing local policy files (e.g. HR, PTO, etc.) for retrieval-augmented generation (RAG).
Optional: If the default file search tool isn’t available, the notebook automatically attempts direct Azure AI Search integration via environment variables.
Integrate Server-Side Tools
Illustrates adding tools—like Bing search, file search, and custom Python functions—into a single ToolSet, and how to intercept and log each tool call.
Extend Functionality with Azure Logic Apps
Deploy a Logic App to enable the send_email functionality. This Logic App can be imported using the provided ARM template, and its HTTP endpoint can be integrated into the agent’s toolset.
Stream Real-Time Agent Responses
Demonstrates a streaming approach for partial message updates from the agent, seamlessly handling partial tool invocation and chunked text output.
Build an Interactive Gradio UI
Provides a Gradio-based chat interface that prompts the agent with user questions, displays partial tool calls and final results, and makes it easy to extend or adapt the UI.

Use this demo as a reference for creating, deploying, and managing enterprise-scale AI agents with strong integration, data security, and real-time conversation capabilities.
Clone this repository:
git clone https://github.com/Azure-Samples/azure-ai-agent-service-enterprise-demo.git
Create a virtual environment (using venv as an example):
python -m venv .venv
Activate your virtual environment:
.venv\Scripts\activatesource .venv/bin/activateInstall the required dependencies:
pip install -r requirements.txt
Create a .env file at the root of this folder to store secret keys and settings (e.g., the connection string and optional model name). You can copy the provided .env.example file:
Windows (PowerShell):
Copy-Item -Path .env.example -Destination .env
macOS/Linux:
cp .env.example .env
Then, open the .env file and update it with your configuration details.
Add your Azure AI Foundry connection string:
PROJECT_CONNECTION_STRING="<HostName>;<AzureSubscriptionId>;<ResourceGroup>;<ProjectName>"
Specify the compatible model you want to use (e.g. GPT-4o):
MODEL_NAME="YOUR_MODEL_NAME"
(Optional) Grounding with Bing
You can add real-time web data to your agent via Grounding with Bing Search. For details on how to create a Bing search resource, link it with your Azure AI Agent, and meet display requirements, see Grounding with Bing Search.
BING_CONNECTION_NAME="YOUR_CONNECTION_NAME"
In this sample, the code automatically tries to discover an .env variable named
BING_CONNECTION_NAME. If available, you’ll see a console message likebing > connected. Otherwise, it gracefully proceeds without Bing.
(Optional) OpenWeather API keys to enable fetch_weather tool:
OPENWEATHER_GEO_API_KEY="YOUR_OPENWEATHER_GEOCODING_API_KEY"
OPENWEATHER_ONE_API_KEY="YOUR_OPENWEATHER_ONE_CALL_API_KEY"
If you leave these blank, the weather function will simply return an error or remain disabled.
Tip: If you don’t plan to use Bing grounding or OpenWeather, you can skip setting up those resources. The demo will still work with your local documents and core agent features.
Make sure that .env is listed in your .gitignore. Never commit your credentials to source control!
Open the project folder in Visual Studio Code:
venv environment.Run Jupyter Notebook:
enterprise-streaming-agent.ipynb, in VS Code.FileSearchTool is detected, the code uses AZURE_SEARCH_CONNECTION_NAME and AZURE_SEARCH_INDEX_NAME from your .env file to add the search tool.Try the Demo Chat:
The sample includes a Logic App ARM template (send_email_logic_app.template.json) that you can deploy to enable the send_email functionality.
recipient, subject, and body fields.az deployment group create \
--resource-group <your-resource-group> \
--template-file send_email_logic_app.template.json \
--parameters logicAppName=send_email_logic_app
Blank Logic App template.Send an email action.LOGIC_APP_SEND_EMAIL_URL variable with you Logic App URL:
LOGIC_APP_SEND_EMAIL_URL="https://<your-logic-app-endpoint>"
This demo supports two approaches for enterprise document retrieval:
By default, the FileSearchTool automatically creates a vector store using Azure AI Search in standard agent setup, providing:
For scenarios requiring direct control over an existing search index, update these environment variables to your .env:
#AZURE_SEARCH_CONNECTION_NAME="YOUR_AZURE_SEARCH_CONNECTION_NAME"
#AZURE_SEARCH_INDEX_NAME="YOUR_AZURE_SEARCH_INDEX_NAME"
Please review our Known Issues for current bugs and workarounds before reporting new problems.
GitHub checked 16h ago - refresh overdue. Recently viewed repositories target hourly refresh. This repository is archived.