Skip to main content
Save scan and eval results as build artifacts to prove validation before deployment.
API keys required. Add your LLM provider API key (Gemini, OpenAI, or Anthropic) to your CI system’s secrets/environment variables. Never commit API keys to your repository.
Add flintai-cli to your GitHub Actions workflow:
name: Agent validation

on: [pull_request]

jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      
      - name: Set up Python
        uses: actions/setup-python@v6
        with:
          python-version: '3.13'
      
      - name: Install flintai-cli
        run: pip install flintai-cli
      
      - name: Scan agent code
        env:
          GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
        run: flintai scan ./agent --output scan-results.json
      
      - name: Upload scan results
        uses: actions/upload-artifact@v7
        with:
          name: flintai-scan-results
          path: scan-results.json
Attach the artifact to your PR as proof you validated before merge.GitHub Actions documentation →

Exit codes

Flint AI Scan returns standard exit codes for CI/CD integration:
CodeMeaning
0Scan completed successfully
1Scan failed (invalid path, no Python files, etc.)
Exit code 0 means the scan ran successfully, not that no issues were found. Check the JSON results to see findings.

Other CI systems

The core pattern works anywhere:
  1. Install Python 3.13+
  2. Install flintai-cli with pip
  3. Set your LLM API key as an environment variable
  4. Run flintai scan /path/to/agent --output results.json
  5. Save results.json as a build artifact