This repository provides a hands-on implementation of a multi-agent system built with Azure AI Foundry, demonstrating how intelligent agents can be orchestrated to generate and publish personalized business cards as web pages, starting from natural language input.
This application demonstrates a multi-agent architecture where the user interacts through a Python console app to request the creation of a business card for a given person. The user can provide full or partial data (name, profession, location, etc.), and the agents will intelligently complete the rest and generate a realistic business card.
The final output is a web-based HTML card hosted on Azure Blob Storage.
For example, given this input to the application:
Please generate an online business card for Walter Novoa. A Cloud Solutions Architect from Colombia. The title should be CSA.
The system will generate a business card with the provided details and will publish in a public URL with a content like this:
That was a sample input, but the system is flexible enough to handle various formats and incomplete data, showcasing the power of LLM-based agents in understanding and processing natural language. For example:
A recently graduated marketing girl in Africa.
Could produce a card like this (Observe that in this situations we won't have prescriptive results, as the agents have been given the freedom to interpret the input and generate a card based on their understanding of the context):
- How to structure multi-agent solutions in Azure AI Foundry.
- How to connect agents through tools and chain them.
- How to invoke external services like Azure Functions and Blob Storage.
- How to separate model intelligence from system orchestration logic.
- Agentic Web Generator on Azure AI Foundry
The diagram above illustrates the complete solution architecture based on Azure AI Foundry, which enables generating and publishing personal business cards starting from natural language input, using a multi-agent approach. Each component is designed to show how agents, tools, and Azure services interact to produce the final result.
- Tools used by the Orchestrator Agent are clearly shown in green, representing its orchestration capabilities and ability to delegate tasks.
- Calls to GPT-3.5 models are shown in orange, emphasizing that reasoning is powered by a language model.
- Azure Function and Storage are integrated as external components, accessible from agents via tools.
- Separation of storage containers (one for templates, one for generated cards) reflects a clean, scalable architecture.
This setup showcases a modular, extensible AI solution using LLM-based agents, multi-step orchestration, and cloud-native publishing.
-
Python Console App (Desktop Client)
- The flow begins when a user enters a natural language message via a Python console application.
- This message can include complete or partial data about a person to build their business card.
-
Orchestrator Agent in Azure AI Foundry
- The message is sent to the Orchestrator Agent, which analyzes the user's intent.
- This agent has multiple tools (highlighted in green), including:
- A tool to invoke another agent (Agent-to-Agent Tool).
- A tool to invoke an Azure Function (Azure Function Tool).
-
Agent-to-Agent Tool β JSON Card Generator Agent
- The Orchestrator uses its agent tool to delegate the task of understanding the message to a second agent: the JSON Card Generator Agent.
- This agent uses a GPT-3.5 model (connections shown in orange) to extract structured information and convert it into a JSON object containing the business card fields (name, title, city, etc.).
-
Azure Function: HTML Template Filler
- Once the JSON is received, the Orchestrator decides to use the Azure Function Tool.
- It invokes a function deployed as an Azure App Service using Flex Consumption, which receives the JSON as input.
-
Azure Storage β Templates Container
- The Azure Function downloads an HTML template (
Business Card Template.html) from the Templates container in Azure Blob Storage.
- The Azure Function downloads an HTML template (
-
Template Replacement and Publication
- Using the received information, the Azure Function dynamically fills the HTML template.
- Then it saves a new version (
Card1.html,Card2.html, etc.) in the Cards container with public access enabled.
-
Response to the User
- The Azure Function returns the public URL of the generated HTML file.
- The Orchestrator receives this URL and returns it to the original client (the Python Console App), allowing the user to open their personalized card as a web page.
To get started, clone this repository to your local machine:
git clone https://github.com/warnov/agentic-webgen.git
cd agentic-webgenThis solution works on Windows, macOS, and Linux.
To run this solution, you need to have the following tools installed on your machine:
Having the following extensions installed will enhance your development experience:
Run this included PowerShell script if you are in Windows and want to automate the setup of the development environment. winget is required.
Set-ExecutionPolicy Bypass -Scope Process -Force; .\misc\setup-dev-win.ps1This script will automatically install (or update if already installed):
- Visual Studio Code
- Git for Windows
- Python 3.12
- .NET SDK 8
- Azure CLI Tools
- Azure Functions Core Tools
- Recommended VSCode extensions
This solution requires the deployment of a resource group that will contain all the core infrastructure components. Each element is configured to support the application's runtime, storage, and AI capabilities.
We have included the infra folder from where you can deploy all the necessary Azure infrastructure components for this solution. Please check its readme for detailed instructions on deployment.
The infrastructure includes:
-
A Resource Group
A logical container to host all resources related to the solution. All deployments will target this group to ensure scoped management, billing, and lifecycle control. -
Storage Account
A central storage layer that supports both internal operations and public content exposure. The configuration includes:- SKU:
Standard_LRS - Kind:
StorageV2 - Access Tier:
Hot - HTTPS Traffic Only: Enabled
Two blob containers will be created:
templates: private access; used to store internal templates.cards: public (blob-level) access; intended for publish the generated card assets.
- SKU:
-
Azure Function App
The compute component of the solution, responsible for executing backend logic. It is deployed with the following configuration:- Plan: Elastic Premium (EP1) on Linux (
elastickind withElasticPremiumtier) - Runtime: .NET 8 Isolated Worker (
DOTNET-ISOLATED|8.0) - HTTPS Only: Enabled
- App Settings:
(Besides the default ones)
AZURE_STORAGE_CONNECTION_STRING: Storage connection for custom operations set to the connection string of the created storage account
- Plan: Elastic Premium (EP1) on Linux (
-
Azure AI Foundry (Cognitive Services)
The AI orchestration platform that enables multi-agent workflows. It is deployed as a Cognitive Services resource with the following configuration:- Resource Type:
Microsoft.CognitiveServices/accounts - Kind:
AIServices(multi-service AI resource, NOT Azure Machine Learning AI Foundry Hub a it doesn't have Agents in GA yet) - SKU:
S0(Standard pricing tier) - Identity: System-assigned managed identity enabled
- Network Access: Public network access enabled with custom subdomain
- Resource Type:
β οΈ All resources should be deployed in the same Azure region to ensure compatibility, performance, and cost efficiency.
At this point it is supposed that either using the provided ARM template or manually, you have deployed the necessary Azure resources. Now, you should have the required components ready. With these components in place, you can proceed to configure the services as follows:
Two storage containers were deployed:
templates: Contains the HTML template for business cards, which is private and not publicly accessible. A sample template file calledbusiness_card_template.htmlis provided in themiscfolder. You can upload it to thetemplatescontainer using Azure Storage Explorer, the Azure Portal or this command (for this you need to have the Azure CLI installed, configured and authenticated):
az storage blob upload --account-name stagenticwebgenw --container-name templates --file ./misc/business_card_template.html --name business_card_template.htmlThat is the template that will be used by the Azure Function to generate the business cards.
cards: Publicly accessible container where generated business cards will be stored by the Azure Function. The cards will be accessible via public URLs. No required action at this point.
The Azure Function App is already configured to use the storage account created in the infrastructure deployment. You can verify this in the Azure Portal under the Function App's Configuration settings. We just need to upload the code for the Azure Function that will generate the business cards. You can do this by using any of the methods described here.
We need to create an AI Foundry project within the Azure AI Foundry resource. This project will contain the agents, models, and tools necessary for the solution. You can do this by following these steps:
- Go to the Azure AI Foundry resource in the Azure Portal.
- Click on Agents in the left menu: This will take you to the AI Foundry project creation page.
- Write a name for the project, e.g.,
agentic-webgen-project, and click Create. - When the project is created, you will be able to create a deployment. In Azure AI Foundry, a deployment refers to the disposition of a language model to be used by your agents. In the bottom o the left menu select Models + endpoints and then in the right pane clic on +Deploy model. You can create one or many deployments with different models, but for this solution we will use only one deployment of the
gpt-35-turbomodel (a very economic model for this test), so choose Deploy base model and search for it. Select it, leave the default values and click Deploy. - Now let's get the Azure AI Foundry project endpoint so we could reference it in the Python client to manage the agents here. So from the left menu choose Overview and copy the Endpoint URL. It should look like this:
https://<your-foundry-name>.services.ai.azure.com/api/projects/<your-project-name>. You will need this URL to configure the Python client.
With this, you are ready to run the solution. The Python client will use this endpoint to interact with the AI Foundry project and manage the agents! π€
To get started with the code, clone this repository to your local machine:
git clone https://github.com/warnov/agentic-webgen.gitagentic-webgen/
βββ π agent-webmaster-py/ # Python client application and AI agents
β βββ π .env # Environment variables (API keys, endpoints)
β βββ π requirements.txt # Python dependencies
β βββ π agents/ # AI agent implementations
β β βββ π ag_card_generator/ # JSON Card Generator Agent
β β β βββ π ag_card_generator.py # Agent logic for extracting structured data
β β β βββ π ag_card_generator_tester.py # Console Program to test the agent
β β βββ π ag_report_builder/ # Report Builder Agent (extended functionality)
β β β βββ π ag_report_builder.py # Agent for generating reports
β β β βββ π ag_report_builder_tester.py # Console Program to test the agent
β β β βββ π README.md # Agent-specific documentation
β β β βββ π assets/ # Report templates and resources
β β β βββ π tools/ # Agent-specific tools
β β βββ π ag_web_gen/ # Web Generation Agent
β β βββ π ag_web_gen.py # Main orchestrator agent
β β βββ π ag_web_gen_tester.py # Unit tests for orchestration
β β βββ π tools/ # Agent tools (Azure Function calls, etc.)
β βββ π tools/ # Shared tools and utilities
β
βββ π AgenticWebGen.DotNetTools/ # .NET Azure Functions backend
β βββ π AgenticWebGen.DotNetTools.sln # Visual Studio solution file
β βββ π AgenticWebGen.DotNetTools.Fx/ # Main Function App project
β β βββ π AgenticWebGen.Fx.csproj # Project file
β β βββ π FxTemplateFiller.cs # Azure Function for HTML template processing
β β βββ π Program.cs # Function app entry point
β β βββ π host.json # Function host configuration
β β βββ π local.settings.json # Local development settings
β β βββ π Properties/ # Project properties and deployment profiles
β βββ π SqlQuerier.FX/ # Additional SQL querying functions
β βββ π FxReportUploader.cs # Function for report uploads
β βββ π FxSqlQuerier.cs # Function for SQL operations
β βββ π SqlQuerier.FX.csproj # Project file
β
βββ π infra/ # Infrastructure as Code (IaC)
β βββ π infrastructure.json # ARM template for Azure resources
β βββ π infrastructure.parameters.json # ARM template parameters
β βββ π deploy-infrastructure.ps1 # PowerShell deployment script
β βββ π README.md # Infrastructure deployment guide
β
βββ π misc/ # Miscellaneous files and resources
β βββ π agentic_webgen_arch.png # Architecture diagram
β βββ π business_card_template.html # HTML template for business cards
β βββ π contoso_reports_template.html # Sample report template
β βββ π setup-dev.ps1 # Windows development environment setup
β βββ π configure_public_storage.sh # Storage configuration script
β βββ π db_structure.sql # Database schema (for extended features)
β βββ π tech_sample_seed.sql # Sample data for testing
β βββ π final_openapi_spec.json # API specification
β
βββ π requests/ # API testing and development tools
β βββ π bruno.json # Bruno REST client configuration
β βββ π FxTemplateFiller.bru # Template filler function tests
β βββ π FxReportUploader.bru # Report uploader function tests
β βββ π FxSqlQuerier.bru # SQL querier function tests
β βββ π environments/ # API testing environments
β βββ π AgenticWebGen.bru # Production environment
β βββ π AgenticWebGenLocalhost.bru # Local development environment
β βββ π PrivateAgenticWebGen.bru # Private/secure environment
β
βββ π webapp/ # Streamlit web application (alternative UI)
β βββ π streamlit_app.py # Main Streamlit application
β βββ π requirements.txt # Python dependencies for web app
β βββ π startup.sh # Application startup script
β βββ π .env.example # Environment variables template
β βββ π README.md # Web app documentation
β
βββ π README.md # Main project documentation
The Python client application that serves as the main entry point for the solution. Contains the AI agents that orchestrate the business card generation process:
- Orchestrator Agent (
ag_web_gen): Main agent that coordinates the workflow - JSON Card Generator Agent (
ag_card_generator): Extracts structured data from natural language - Report Builder Agent (
ag_report_builder): Extended functionality for report generation
.NET-based Azure Functions that provide backend services:
- FxTemplateFiller: Processes HTML templates and generates business cards
- FxReportUploader: Handles report uploads to Azure Storage
- FxSqlQuerier: Provides database querying capabilities
Infrastructure as Code (IaC) templates for automated Azure resource deployment:
- ARM Templates: Define Storage Account, Function App, and AI Foundry resources
- Deployment Scripts: Automate the infrastructure provisioning process
API testing suite using Bruno REST client for development and debugging:
- Function Tests: Validate Azure Function endpoints
- Environment Configs: Manage different deployment environments (local, staging, production)
Alternative Streamlit-based web interface for users who prefer a GUI over the console application.
Supporting files including templates, documentation, setup scripts, and architectural diagrams.
To run the solution, you need to set up the environment variables and install the required dependencies.
To test your Azure Function locally, follow these steps:
-
Prepare your local settings
- Open the folder:
AgenticWebGen.DotNetTools/AgenticWebGen.DotNetTools.Fx - Copy the template file and rename it:
copy local.settings.json.txt local.settings.json
- Edit
local.settings.jsonand setAZURE_STORAGE_CONNECTION_STRINGto your Azure Storage account connection string.
- Open the folder:
-
Start the Azure Function host
- In the same folder, open a terminal and run:
func start
- (Or use Visual Studio to run/debug if preferred)
- In the same folder, open a terminal and run:
-
Test the endpoint
- With the REST Client extension, open
requests/http/FxTemplateFiller.httpand clickSend Request. - Or use Postman/Curl to send a request to the local endpoint.
- Check the response
- A successful response will look like:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "url": "https://yourstorageaccount.blob.core.windows.net/cards/filled_template_20250730210706.html" }
- Open the returned URL in your browser to view the generated business card.
- A successful response will look like:
To set up and run the Python agents application:
-
Configure environment variables
- In the
agent-webmaster-py/folder, copy the template file and rename it:copy .env.txt .env
- Edit
.envand set these values:PROJECT_ENDPOINT: Your Azure AI Foundry project endpointAZURE_STORAGE_CONNECTION_STRING: Your Azure Storage account connection stringAZURE_FUNCTION_URL: The Azure Function URL (including its code)
- In the
-
Install Python dependencies
- In the same folder, run:
pip install -r requirements.txt
- In the same folder, run:
As it was explained, we have two agents: the JSON Card Generator Agent and the Orchestrator Agent. The first one is used to extract structured data from natural language input, while the second one is used to orchestrate the workflow and call the Azure Function to generate the business card HTML file. So, being the first one the simplest, you can test it by running the following command in the agent-webmaster-py/agents/ag_card_generator/ folder:
python ag_card_generator_tester.pyAn interactive console will prompt you to enter a natural language message, such as "Create a business card for John Doe, a software engineer from Seattle." The agent will process this input and return the structured JSON data it extracted. In the future, this JSON is the one used by the Orchestrator Agent to send it to the Azure Function and generate the business card HTML file.
Once you have tested the JSON Card Generator Agent, you can test the Orchestrator Agent.
This will complete the testing of our whole solution, as the Orchestrator Agent will receive the prompt from the user, call the JSON Card Generator Agent to extract the structured data, and then invoke the Azure Function to generate the business card HTML file whos URL will be returned to the user for them to open it in their browser and see the result.
Just run the following command in the agent-webmaster-py/agents/ag_web_gen/ folder:
python ag_web_gen_tester.pyThis will start an interactive console where you can enter natural language messages to generate business cards with an experience similar to this:



