Skip to main content

Workflows

Workflows are multi-step automated processes defined in .yml files. They orchestrate agents, tools, and evaluation pipelines into reproducible flows โ€” similar to GitHub Actions but designed for AI-specific operations like evaluation, deployment, and quality gate enforcement.

What Workflows Doโ€‹

Use CaseExample
EvaluationRun groundedness + relevance + safety checks on every push
DeploymentValidate โ†’ build โ†’ deploy โ†’ health check โ†’ evaluate
Quality GatesBlock merge if evaluation scores drop below thresholds
Content SyncRegenerate marketplace, rebuild knowledge index
Multi-AgentChain builder โ†’ reviewer โ†’ tuner for solution plays

Workflow Structureโ€‹

Workflows live in .github/workflows/ (for GitHub Actions) or workflows/ (for standalone FrootAI workflows):

.github/workflows/evaluate-play.yml
name: Evaluate Solution Play

on:
push:
paths:
- 'solution-plays/**'
- 'evaluation/**'
pull_request:
paths:
- 'solution-plays/**'

jobs:
evaluate:
runs-on: ubuntu-latest
strategy:
matrix:
play: ['01-enterprise-rag', '03-deterministic-agent', '07-multi-agent']
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '22'

- name: Validate manifest
run: node engine/index.js solution-plays/${{ matrix.play }}/fai-manifest.json --status

- name: Run FAI Engine evaluation
run: node engine/index.js solution-plays/${{ matrix.play }}/fai-manifest.json --eval

- name: Upload evaluation report
if: always()
uses: actions/upload-artifact@v4
with:
name: eval-report-${{ matrix.play }}
path: evaluation/reports/${{ matrix.play }}.json

FrootAI Workflow Typesโ€‹

Evaluation Workflowโ€‹

Runs quality checks against solution play guardrails:

name: Quality Gate
on: [push, pull_request]

jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm run validate:primitives
- run: node engine/index.js solution-plays/01-enterprise-rag/fai-manifest.json --eval

Deployment Workflowโ€‹

Validates infrastructure and deploys to Azure:

name: Deploy Play
on:
push:
branches: [main]
paths: ['solution-plays/01-*/**']

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate Bicep
run: az bicep build -f solution-plays/01-enterprise-rag/infra/main.bicep
- name: What-If Preview
run: az deployment group what-if --resource-group $RG --template-file infra/main.bicep
- name: Deploy
run: az deployment group create --resource-group $RG --template-file infra/main.bicep

Consistency Workflowโ€‹

Ensures data integrity across all distribution channels:

name: Consistency Check
on: [push]

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm run validate:primitives
- run: node scripts/validate-consistency.js
- run: node scripts/sync-content.js --check

Referencing in fai-manifest.jsonโ€‹

Wire workflows into a solution play:

fai-manifest.json
{
"primitives": {
"workflows": [
"./.github/workflows/evaluate-play.yml",
"./.github/workflows/deploy.yml"
]
}
}

:::tip Conventional Commits Use conventional commit messages (feat:, fix:, docs:, chore:) with workflows. This enables automated changelog generation and semantic versioning via the release pipeline. :::

Multi-Agent Workflow Patternโ€‹

Chain the builder โ†’ reviewer โ†’ tuner triad:

name: Play Lifecycle
on:
workflow_dispatch:
inputs:
play:
description: 'Play number (e.g., 01)'
required: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Build phase
run: echo "Building play ${{ inputs.play }}"

review:
needs: build
runs-on: ubuntu-latest
steps:
- name: Review phase
run: npm run validate:primitives

tune:
needs: review
runs-on: ubuntu-latest
steps:
- name: Tune phase
run: node engine/index.js solution-plays/${{ inputs.play }}-*/fai-manifest.json --eval

Best Practicesโ€‹

  1. Trigger on paths โ€” only run workflows when relevant files change
  2. Use matrix strategies โ€” test multiple plays in parallel
  3. Upload artifacts โ€” save evaluation reports for audit trails
  4. Gate on evaluation โ€” block merges when quality scores drop
  5. Use conventional commits โ€” enable automated release flows
  6. Keep workflows focused โ€” one job per concern (validate, deploy, evaluate)

See Alsoโ€‹