Quick-Start LOCI Azure DevOps Integration
The LOCI Azure DevOps integration enables developers and engineering teams to automate performance analysis directly within their existing Azure Pipelines CI/CD workflo +ws. By connecting LOCI's hardware-aware optimization engine with Azure Pipelines and the LociTask@1 extension task, teams gain immediate visibility into the performance i +mpact of every commit, build, and pull request — with findings delivered as PR thread comments before merge.
User Flow Overview

Setup steps (1–3) are performed once per repository.
Usage steps (4–5) repeat automatically on every pull request.
Step-by-Step Guide
Step 1 — Install the LOCI Azure DevOps Extension
Install the LOCI Azure DevOps Extension from the Azure DevOps Marketplace. This extension provides the LociTask@1 pipeline task that uploads your compiled binaries to the LOCI backend for hardware-aware performance analysis.
An active LOCI license is required. Contact [email protected] to obtain one.
Step 2 — Add Your Credentials and Configure the Bot
LOCI dashboard — Sign in as a company user, open Company Details → Edit, tick the agentic checkbox, and save. Copy your API key for the next step.
Add the following to your Azure DevOps pipeline:
LOCI_API_KEY— pipeline secret variable (your LOCI API key)LOCI_AZURE_PAT— pipeline secret variable (the bot user PAT generated below)LOCI_BACKEND_URL— pipeline variable (not secret)
Bot user — Create a dedicated Azure DevOps user for LOCI. Generate a long-lived PAT for that user with the following scopes: Code (Read & Write), Identity (Read), Pull Request Threads (Read & Write), Tokens (Read & Manage). Store it as LOCI_AZURE_PAT. Also set repository-url on your LOCI project to the full Azure DevOps repo URL — without it the bot cannot route PR replies to the correct repository.
Service hook — In Azure DevOps go to Project Settings → Service hooks → Create subscription, choose Web Hooks, set the trigger to Pull request commented on, and point the URL to <your_loci_dashboard_url>/webhook/azure. This enables @<bot-name> chat to respond inline on PR threads.
Step 3 — Add LociTask@1 to Your Pipeline
Add LociTask@1 to your azure-pipelines.yml after your build step:
Step 4 — Open a Pull Request
Opening a PR against your target branch triggers the pipeline automatically. LOCI detects which functions changed between the PR branch and the base, runs hardware-aware execution analysis, and compares results against the baseline — no manual intervention required.
Step 5 — Review the LOCI Report
LOCI posts its findings as PR thread comments from the loci-review bot. Each comment includes execution timing deltas, control-flow analysis, and optimization recommendations grounded in real hardware traces. Mention @<bot-name> in any PR thread to query the analysis inline.
Results are also accessible via the dashboard URL printed in the LociTask@1 task logs. On the Checks tab of your PR, select Performance overview for a full side-by-side comparison.
Next Steps
Last updated