A drop-in agent for GitHub Actions that automatically identifies CI bottlenecks and generates fixes. FastCI analyzes your workflows in real-time, flags performance issues as GitHub Issues, and can automatically create pull requests to resolve them.
CI maintenance is often neglected until it becomes a critical bottleneck. FastCI prevents technical debt accumulation by continuously monitoring and optimizing your CI pipeline, turning maintenance from reactive to proactive.
Option 1: Install FastCI with AI
Option 2: View manual installation instructions
IMPORTANT: If you have a previous FastCI installation, ignore those instructions and use these updated steps.
Create a fastci.config.json file in your repository root:
{
"accept_terms": "yes"
}FastCI must be the very first step in each job - it should run before any other steps, including actions/checkout.
Required Permission: This workflow requires issues: write permission at the workflow level to create issues.
- uses: jfrog-fastci/fastci@v0permissions:
contents: read
issues: write # Required for FastCI
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: jfrog-fastci/fastci@v0
- uses: actions/checkout@v4
# ... rest of your build stepsIf your job runs in a container, add the volume mount:
permissions:
contents: read
issues: write
jobs:
build:
runs-on: ubuntu-latest
container:
image: node:18
volumes:
- /home/runner:/tmp/fastci/mounts/home/runner
steps:
- uses: jfrog-fastci/fastci@v0
- uses: actions/checkout@v4
# ... rest of your build stepsStep 2.1: Add the FastCI Agent Workflow
To automatically fix issues flagged by FastCI, create the following workflow file at .github/workflows/fastci-agent.yaml:
name: FastCI Agent ⚡
on:
issues:
types: [opened, reopened]
permissions:
contents: write
pull-requests: write
issues: write
jobs:
attempt-fix:
if: contains(github.event.issue.labels.*.name, 'fastci-insight') || startsWith(github.event.issue.title, '[FastCI]')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
id: setup
env:
ISSUE_BODY: ${{ github.event.issue.body }}
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
run: |
curl https://cursor.com/install -fsS | bash
echo "$HOME/.cursor/bin" >> $GITHUB_PATH
git config user.name "Cursor Agent"
git config user.email "[email protected]"
# Extract AI prompt from "For AI Agents" section or use full body
AI_PROMPT=$(echo "$ISSUE_BODY" | sed -n '/## For AI Agents/,/```$/p' | sed -n '/```/,/```/p' | sed '1d;$d')
[ -z "$AI_PROMPT" ] && AI_PROMPT="$ISSUE_BODY"
echo "$AI_PROMPT" > /tmp/ai_prompt.txt
# Generate branch name
CLEAN_TITLE=$(echo "$ISSUE_TITLE" | sed 's/^\[FastCI\] //' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr -cd 'a-z0-9-' | cut -c1-40)
echo "branch=${ISSUE_NUMBER}-bugfix/${CLEAN_TITLE}" >> $GITHUB_OUTPUT
- name: Fix FastCI insight
env:
CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}
GH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
BRANCH: ${{ steps.setup.outputs.branch }}
ISSUE_NUM: ${{ github.event.issue.number }}
REPO: ${{ github.repository }}
run: |
agent -p "Fix CI issue in $REPO. GitHub CLI (\`gh\`) is authenticated.
Issue #$ISSUE_NUM: ${{ github.event.issue.title }}
Task: $(cat /tmp/ai_prompt.txt)
Steps:
1. Create branch: $BRANCH
2. Implement the fix with minimal, targeted changes
3. Commit with message: 'Fix #$ISSUE_NUM: <description>'
4. Push and create PR with body containing 'Fixes #$ISSUE_NUM'
5. Comment on issue #$ISSUE_NUM with PR link
If fix cannot be automated, comment on the issue explaining why.
" --force --model composer-1 --output-format=textStep 2.2: Configure the Required Secrets
For the FastCI Agent workflow to function, configure these secrets in your repository:
| Secret | Description |
|---|---|
CURSOR_API_KEY |
API key for the Cursor AI agent |
GH_ACCESS_TOKEN |
Personal Access Token with repo and issues permissions (needed for PR creation) |
FastCI is currently in beta. By using this action, you agree to the FastCI Beta Agreement. To use FastCI, non-JFrog organizations must explicitly accept the beta terms by setting "accept_terms": "yes" in fastci.config.json.
- Configuration: Add a
fastci.config.jsonfile to your repository root with"accept_terms": "yes" - Permissions: Ensure the
issues: writepermission is set at the workflow level - Beta Agreement: Accept the Beta Agreement via the config file (required for non-JFrog organizations)
- FastCI analyzes your CI runs and identifies performance bottlenecks
- Issues are automatically created with the
fastci-insightlabel or[FastCI]prefix - The FastCI Agent workflow triggers on new issues matching these criteria
- An AI agent implements the fix and creates a pull request
- Merging the PR auto-closes the issue via GitHub's linking feature
- Add
fastci.config.jsonto your repository root - Add the FastCI step to all jobs in your workflows
- Create the
fastci-agent.yamlworkflow - Configure
CURSOR_API_KEYandGH_ACCESS_TOKENsecrets - Run your CI pipeline and watch for FastCI insights!
If you encounter any issues, please reach out to the FastCI team or file an issue in this repository.