GitHub Integration
The Line of Code Insights (LOCI) Agentic AI is a powerful tool designed to predict performance inefficiencies and power spikes in your compiled binaries before testing or inference. It autonomously optimizes code, configurations, and serving mechanisms. By integrating the LOCI GitHub Action into your workflow, you can shift observability left, reduce resolution time, and lower costs associated with hardware and software reliability issues.
Key Capabilities
The LOCI GitHub Action allows you to:
Upload compiled binaries for in-depth performance analysis.
View a comprehensive Agent Report and insights directly in your workflow summary.
Automatically receive Pull Request (PR) comments with analysis results (requires the GitHub App).
Action Modes
The action operates in two primary modes via the mode input:
upload
Uploads compiled binaries to the LOCI backend for analysis.
project, binaries
summary
Waits for the analysis to complete and attaches the Agent Report (in Agentic Mode) and Function Insights to the workflow run summary.
project
Prerequisites and Setup
Before using the action, ensure the following are configured in your repository:
Required Configuration
GitHub Variable: Add
LOCI_BACKEND_URLas a GitHub Variable.GitHub Secret: Add
LOCI_API_KEYas a GitHub Secret.
Optional Configuration
LOCI GitHub App: Install the LOCI GitHub App on your repository to enable automatic PR comments with results and overall Performance Reviews.
Agentic Summary Token: If you are using Agentic Mode and want the
summarystep to display the full report in the job UI, you must provide a Personal Access Token (PAT) as a GitHub Secret (for exampleLOCI_GITHUB_TOKEN) and pass it to the action via an environment variable:
Usage Examples
The action is sourced from auroralabs-loci/loci-action@v1.
Example 1: Build + Upload
This minimal example checks out code, builds a binary, and uploads it to LOCI for analysis.
Example 2: Build + Upload + Summary
This example adds the summary step, which waits for the analysis to complete and embeds the report and insights directly into the workflow run summary.
Inputs
mode
Yes
—
Operation to perform: upload or summary.
project
Yes
—
Project name to tag the analysis results.
binaries
Yes (for upload)
—
Newline-separated list of binary paths, glob patterns, or a directory. Required for upload, ignored for summary.
target
No
<branch>@<shortSHA>
Project version label. Auto-resolves if not set.
base
No
PR merge base
Base version to compare against. Empty unless set or PR context is used.
top-n-symbols
Yes (for summary)
5
Number of functions shown in function insights during the summary step.
Outputs
target
The resolved project version name for this run.
base
The resolved base version name (may be empty).
summary
The LOCI Agent Summary Report (only available when mode: summary).
LOCI Features and Modes Overview
LOCI supports a Standard Mode and a more comprehensive Agentic Mode, which is generally enabled per company/configuration.
Upload of binaries
✅ Yes
✅ Yes
❌ No
LOCI Dashboard (always)
Function Insights
✅ Yes (via summary step)
✅ Yes (via summary step)
❌ No
Workflow run summary (summary step)
LOCI Agent Summary Report
❌ Not available
✅ Yes
✅ For PR comment
Workflow run summary (summary step`) & PR comment (App)
Performance Review Check
❌ Not available
✅ Yes
✅ Yes (App only)
GitHub Checks tab (pass/fail based on loci.yml config)
Key Workflow Logic:
The
uploadstep is always required to send binaries to the LOCI backend.The
summarystep is optional and is only needed if you want the LOCI report and insights within the workflow run summary itself.In Standard Mode, the summary step adds Function Insights only.
In Agentic Mode, the summary step adds the Agent Summary Report plus Function Insights.
If the GitHub App is installed (and Agentic Mode is enabled), it automatically handles:
Posting the LOCI Agent Summary Report as a PR comment.
Enabling the Performance Review Check Run (pass/fail status based on configuration).