Turn raw troubleshooting notes into polished Technical Support Guides (TSGs) in minutes. TSG Builder uses a multi-agent pipeline to research, write, and review your TSGs automatically.
Writing high-quality troubleshooting guides is essential to Support knowledge curation, but tedious. In fast-moving areas like Azure AI Support, new issues emerge constantly, each requiring a new TSG for ease-of-reference by Support Engineers and AI-based support tools.
TSG Builder was born out of this need. The idea: you provide a raw dump of info to start from, the tool researches and formats.
- Human + AI collaboration — You curate initial notes from cases, threads with engineering, incidents; the agent enhances them with research from public docs like Microsoft Learn and relevant GitHub discussions
- Fits existing workflows — Support and supportability teams already review common issues to identify TSG candidates; those notes become your input
- Broadly applicable — Agnostic to team, technology, or support area
- Quick Start
- Prerequisites
- Using TSG Builder
- Configuration
- How It Works
- Troubleshooting
- Telemetry
- Development
- License
Prerequisites: Azure CLI logged in (
az login) + Azure AI Foundry project
- Download
tsg-builder-windows-setup.zipfrom Releases - Extract the zip, then run
tsg-builder-windows-setup.exe- Installs to your user profile (no admin required), creates Start Menu and desktop shortcuts
- Handles upgrades automatically — just re-run the installer when a new version is available
- Launch TSG Builder from the Start Menu or desktop shortcut
- Your browser opens to
http://localhost:5000— complete setup and click Create Agents
First run: SmartScreen may warn about an unrecognized app — click More info → Run anyway. First launch may be slow due to Defender scanning.
-
Download the zip for your platform from Releases:
Platform File Windows (portable) tsg-builder-windows.zipLinux tsg-builder-linux.zipmacOS tsg-builder-macos.zip -
Extract and run:
# Linux/macOS: Make executable after extracting chmod +x tsg-builder-linux # or tsg-builder-macos ./tsg-builder-linux
On Windows, run
tsg-builder-windows.exe. Your browser opens tohttp://localhost:5000.macOS: Right-click → "Open" → "Open" to bypass Gatekeeper on first launch.
-
Complete setup in the browser — enter your Azure AI Foundry endpoint and click Create Agents
Click to expand developer instructions
Requires Python 3.11+, GNU Make, and Azure CLI.
# 1. Clone and setup
git clone <repo-url>
cd tsgbuilder
make setup
# 2. Start the Web UI
make ui
# Opens http://localhost:5000 in your browserThe setup wizard opens automatically to guide you through configuration.
Windows (PowerShell): Install Make first:
winget install GnuWin32.Make [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files (x86)\GnuWin32\bin", "User")Then restart PowerShell.
| Resource | Purpose | How to Get |
|---|---|---|
| Azure AI Foundry Project | Hosts the agent | Create a project |
| Model Deployment | LLM for the agent (recommended: gpt-5.2) |
Deploy in your project |
- Azure CLI — Logged in with
az login(Install Azure CLI) - For source builds only: Python 3.11+, GNU Make
⏱️ Timing: A full run (Research → Write → Review) typically takes 2–5 minutes depending on the complexity of your input and the amount of research needed.
⚠️ Note: This tool uses a Foundry Agent to search the internet. A built-in PII check scans your input before generation and blocks any content containing emails, phone numbers, IP addresses, credentials, or other customer-identifiable information. You'll be prompted to edit or redact before proceeding.
Features:
- ⚙️ Built-in setup wizard — Configure, validate, and create agents from the browser
- 📝 Paste notes directly in the browser
- 🖼️ Image support — Attach screenshots via drag-and-drop, file picker, or paste
- 🔄 Interactive follow-up questions
- 📋 One-click copy to clipboard
- 👁️ Raw/Preview toggle — Switch between raw markdown and rendered preview
- 📊 Real-time status indicators
- 💡 Load example input with one click
You can include screenshots or images with your troubleshooting notes:
- Drag and drop — Drag image files onto the upload zone
- Click to upload — Click the upload zone to open file picker
Supported formats: PNG, JPG, GIF, WebP. Maximum 10 images per request.
Images are sent to the AI agent for visual analysis, which is especially useful for:
- Error screenshots
- Architecture diagrams
- Console/terminal output
- Configuration screenshots
The setup wizard (opens automatically on first run) guides you through configuration:
- Click the ⚙️ Setup button (or it opens automatically)
- Enter your Azure configuration values
- Click Save Configuration
- Run Validation to verify everything works
- Click Create Agents
- Go to Azure Portal
- Navigate to your AI Foundry resource
- Select your project
- Copy the endpoint from the Overview page
- In AI Foundry Portal, go to Deployments
- Use the name of your deployed model (e.g.,
gpt-5.2)
TSG Builder uses a three-stage pipeline: Research → Write → Review.
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ RESEARCH │───▶│ WRITE │───▶│ REVIEW │───▶│ OUTPUT │
│ 🔍 │ │ ✏️ │ │ 🔎 │ │ ✅ │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
Uses tools No tools Validates Final TSG
(Web, MCP) Just writes & fact-checks
- Research — Searches Microsoft Learn and the web for documentation, GitHub issues, and community solutions
- Write — Generates the TSG using only your notes + research (no tool access = no hallucinated searches)
- Review — Validates structure and fact-checks against research; auto-fixes or retries if needed
If information is missing, the agent inserts {{MISSING::...}} placeholders and asks follow-up questions.
Output follows the DFM-copilot-optimized TSG template. For detailed architecture information, see docs/architecture.md.
- Ensure
.envfile exists and containsPROJECT_ENDPOINT - The executable creates
.envautomatically on first run
- Ensure Azure CLI is installed (Install Azure CLI)
- Run
az loginto authenticate - Ensure your account has access to the AI Foundry project
- Verify
PROJECT_ENDPOINTis correct - Check you have the "Azure AI User" role on the project
- Open the web UI and use the Setup wizard to create the agents
- Check
.agent_ids.jsonfile exists in the same directory as the executable
- The agent instructions mandate research before output
- If this persists, recreate the agent via the Setup wizard
- The agent is instructed to include URLs from research in "Related Information"
- Check the agent is correctly configured with both Bing and Learn MCP tools
- The PII check uses the AI Services endpoint from your Foundry resource (derived from
PROJECT_ENDPOINT) - Run
az loginto refresh your credentials - Ensure your account has access to your Foundry project
- The
Personcategory may occasionally flag Azure service names or technical terms - Click "Go Back & Edit" to adjust your notes, or "Redact & Continue" to accept the automatic redaction
- If a category consistently produces false positives, maintainers can adjust
PII_CATEGORIESinpii_check.py
TSG Builder collects anonymous usage telemetry to help improve the tool. Telemetry is enabled by default in release binaries and can be fully disabled.
- Counts and enums — event names (e.g. "TSG generated", "setup completed"), stage names, error classifications
- Durations — pipeline and per-stage wall-clock times
- Token counts — per-stage input/output token usage (aggregate numbers, never content)
- Version and platform — app version, OS platform, Python version, run mode (source/executable)
- Install ID — a random UUID generated on first run, stored in
.envasTSG_INSTALL_ID. Not derived from any machine, user, or network identifier
- Notes, TSG content, or any user-authored text
- Error messages containing user content
- PII of any kind
- File paths, Azure resource names, endpoints, or credentials
- IP addresses or network identifiers
Set TSG_TELEMETRY=0 in your .env file (same directory as the executable or project root):
TSG_TELEMETRY=0
Or set the environment variable before running:
TSG_TELEMETRY=0 ./tsg-builder-linuxWhen opted out:
- No events are emitted
- No
install_idis generated or persisted - The app behaves identically otherwise
Building from source, contributing, and architecture details
make buildThis creates executables in dist/:
- Linux:
dist/tsg-builder-linux - macOS:
dist/tsg-builder-macos - Windows:
dist/tsg-builder-windows.exe
| Command | Description |
|---|---|
make setup |
First-time setup (venv + dependencies) |
make ui |
Start the web UI at http://localhost:5000 |
make build |
Build standalone executable with PyInstaller |
make validate |
Check environment configuration (CLI troubleshooting) |
make install |
Install dependencies only (assumes venv exists) |
make install-dev |
Install dev dependencies (pytest, etc.) |
make clean |
Remove venv and generated files |
make clean DELETE_AGENTS=1 |
Also delete agents from Azure before cleaning |
make lint |
Check Python syntax |
make test |
Run the test suite |
make test-verbose |
Run tests with verbose output |
make test-cov |
Run tests with coverage report |
make test-unit |
Run only unit tests (fast) |
make test-quick |
Skip dep install (fastest) |
make help |
Show all commands |
See docs/architecture.md for detailed pipeline architecture, stage descriptions, and design decisions.
| File | Purpose |
|---|---|
web_app.py |
Flask web UI server (includes agent creation) |
pipeline.py |
Multi-stage pipeline orchestration (Research → Write → Review) |
pii_check.py |
PII detection via Azure AI Language API (pre-flight gate) |
error_utils.py |
Shared Azure SDK error classification utilities |
telemetry.py |
Anonymous usage telemetry (see docs/telemetry.md) |
version.py |
Single source of truth for version, GitHub URL, and TSG signature |
build_exe.py |
PyInstaller build script (bundles templates/, static/) |
tsg_constants.py |
TSG template, agent instructions, and stage prompts |
validate_setup.py |
Validate environment configuration (CLI troubleshooting) |
delete_agents.py |
Delete agents from Azure (used by make clean DELETE_AGENTS=1) |
Makefile |
Common operations |
.env |
Your configuration (git-ignored, auto-created on first run) |
.agent_ids.json |
Pipeline agent IDs after creation |
templates/index.html |
Web UI HTML structure |
static/css/styles.css |
Web UI styles |
static/js/main.js |
Core UI logic (streaming, TSG generation, images, PII modal) |
static/js/setup.js |
Setup modal functionality |
tests/ |
Pytest test suite with fixtures |
- Fork the repository
- Create a feature branch
- Make your changes
- Run
make lintto check syntax - Run
make testto verify tests pass - Submit a pull request
Releases are built automatically by GitHub Actions when a version tag is pushed:
# Create and push a tag
git tag v1.0.0 # or v1.0.0-beta.1 for pre-release
git push origin v1.0.0This triggers a workflow that:
- Builds executables for Linux, macOS, and Windows
- Generates SHA256 checksums
- Creates a draft release with all files attached
After the workflow completes, go to the Releases page to review and publish.
Click to expand PII detection details (project maintainers only)
TSG Builder includes a pre-flight PII check powered by the Azure AI Language PII API via the AI Services endpoint built into each user's Foundry resource. End users need no additional setup — the PII endpoint is derived from the PROJECT_ENDPOINT they already configure.
- Endpoint derivation:
pii_check.pyextracts the AI Services base URL fromPROJECT_ENDPOINT(strips/api/projects/<project>) and uses it withTextAnalyticsClient - Auth:
DefaultAzureCredential(same Entra ID used for Foundry) - RBAC: Users who can access their Foundry project already have the necessary permissions for AI Services PII detection
- Fail-closed: If the PII API is unreachable or errors, generation is blocked
As an additional (optional) layer, a PII content filter can be configured on the Foundry model deployment via the Azure AI Foundry portal. This filters PII from model outputs and is complementary to the input-side PII check in pii_check.py. This is a manual portal configuration, not a code change.
MIT
