Scenarios
—
defined baselines
Total Runs
—
cohort executions
Pass Rate
—
across all runs
Last Run
—
most recent execution

Recent Cohort Runs

Loading...
Loading...
Loading...

CI/CD Integration

Block deploys automatically when quality drops. One endpoint, any CI system.

Gate Endpoint

POST to /api/gate before a deploy. Returns HTTP 200 when all scenarios pass, HTTP 422 when any fail.

Request body
{
  "scenario_ids": "all",          // or array of IDs: ["uuid1", "uuid2"]
  "agent_endpoint": "https://your-agent.example.com/run"
}
Response (pass)
{
  "passed": true,
  "summary": { "total": 3, "passed": 3, "failed": 0, "duration_ms": 840 },
  "results": [ { "scenario_id": "...", "scenario_name": "...", "passed": true, "composite_score": 0.95, "threshold": 0.8, ... } ],
  "agent_endpoint": "https://your-agent.example.com/run"
}
Response (fail) — HTTP 422
{
  "passed": false,
  "summary": { "total": 3, "passed": 2, "failed": 1, "duration_ms": 1020 },
  "results": [ ..., { "scenario_name": "safety-check", "passed": false, "composite_score": 0.55, "threshold": 0.8 } ]
}
?ci=1 — append to URL for compact CI output. Same HTTP status codes, fewer fields. Ideal for parsing in scripts.

GitHub Actions

Add a quality gate step to your workflow. The gate runs before deploy — a 422 fails the job and blocks the deploy.

# .github/workflows/deploy.yml
name: Deploy

on:
  push:
    branches: [main]

jobs:
  quality-gate:
    runs-on: ubuntu-latest
    steps:
      - name: Run BaselineForge gate
        run: |
          STATUS=$(curl -s -o /tmp/gate.json -w "%{http_code}" -X POST \
            -H "Content-Type: application/json" \
            -H "Authorization: Bearer ${{ secrets.BASELINEFORGE_API_KEY }}" \
            -d '{"scenario_ids":"all","agent_endpoint":"${{ secrets.AGENT_ENDPOINT }}"}' \
            "https://baselineforge.polsia.app/api/gate?ci=1")
          cat /tmp/gate.json
          [ "$STATUS" -eq 200 ] || (echo "Quality gate FAILED" && exit 1)

  deploy:
    needs: quality-gate
    runs-on: ubuntu-latest
    steps:
      - name: Deploy to production
        run: echo "deploy here..."

Add BASELINEFORGE_API_KEY and AGENT_ENDPOINT as GitHub Actions secrets (Settings → Secrets → Actions). Generate your API key in the API Keys tab.

GitLab CI

# .gitlab-ci.yml
stages:
  - quality
  - deploy

quality-gate:
  stage: quality
  image: alpine
  before_script:
    - apk add --no-cache curl
  script:
    - |
      STATUS=$(curl -s -o /tmp/gate.json -w "%{http_code}" -X POST \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer $BASELINEFORGE_API_KEY" \
        -d "{\"scenario_ids\":\"all\",\"agent_endpoint\":\"$AGENT_ENDPOINT\"}" \
        "https://baselineforge.polsia.app/api/gate?ci=1")
      cat /tmp/gate.json
      [ "$STATUS" -eq 200 ] || (echo "Quality gate FAILED" && exit 1)

deploy:
  stage: deploy
  needs: [quality-gate]
  script:
    - echo "deploy here..."

Set BASELINEFORGE_API_KEY and AGENT_ENDPOINT as GitLab CI/CD variables (Settings → CI/CD → Variables).

Shell / Generic

Works in any CI that can run curl. Non-zero exit code on failure.

#!/bin/bash
set -e

AGENT_URL="https://your-agent.example.com/run"
GATE_URL="https://baselineforge.polsia.app/api/gate?ci=1"
API_KEY="${BASELINEFORGE_API_KEY}"  # set as env secret in your CI

echo "Running quality gate..."
STATUS=$(curl -s -o /tmp/gate.json -w "%{http_code}" -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $API_KEY" \
  -d "{\"scenario_ids\":\"all\",\"agent_endpoint\":\"$AGENT_URL\"}" \
  "$GATE_URL")

cat /tmp/gate.json | python3 -m json.tool 2>/dev/null || cat /tmp/gate.json

if [ "$STATUS" -ne 200 ]; then
  echo ""
  echo "ERROR: Quality gate failed (HTTP $STATUS). Deploy blocked."
  exit 1
fi

echo "Quality gate passed. Proceeding with deploy."

Run specific scenarios

Target only the scenarios relevant to the component being deployed — faster gates, less noise.

curl -X POST https://baselineforge.polsia.app/api/gate?ci=1 \
  -H "Authorization: Bearer bf_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "scenario_ids": ["<uuid-1>", "<uuid-2>"],
    "agent_endpoint": "https://your-agent.example.com/run"
  }'

Find scenario IDs in the Scenarios tab — each row shows the UUID.

Active Webhooks

Loading...

How It Works

After every cohort run that detects a regression (any execution scores below the scenario threshold), BaselineForge fires a POST to all matching webhooks.

Payload
{
  "event": "regression_detected",
  "scenario_id": 42,
  "scenario_name": "onboarding-check",
  "run_id": 187,
  "composite_score": 0.61,
  "threshold": 0.80,
  "delta": -0.19,
  "failed_count": 3,
  "total_executions": 5,
  "scores": { "response_quality": 0.61 },
  "fired_at": "2026-05-12T12:00:00.000Z"
}
Slack-compatible — webhooks to hooks.slack.com automatically receive a formatted Slack message with score details. Retry: 3 attempts, exponential backoff.

Slack Setup

  1. Go to api.slack.com/apps → Create New App → From scratch
  2. Enable Incoming Webhooks and click Add New Webhook to Workspace
  3. Choose the channel to post in, copy the webhook URL
  4. Paste it below as the webhook URL — leave Scenario blank to fire on any regression

Run Detail

—
Total
—
Passed
—
Failed
—
Pass Rate
—
Threshold

Individual Results

Loading results...

About the body field

The body is Portable Text — an array of blocks. Each block has a _type (block, callout, cta, codeBlock, keyPoints, failureMode, clusterNav), a style for text blocks (normal, h2, h3, quote, code, bullet, number), and a children array of {_type:'span', text, marks:[]} spans. Use the "Validate JSON" button below the editor to confirm before saving.

Active Keys

Loading...

Usage

Pass your API key as a Bearer token on every request.

curl -X POST https://baselineforge.polsia.app/api/gate?ci=1 \
  -H "Authorization: Bearer bf_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"scenario_ids":"all","agent_endpoint":"https://your-agent.example.com/run"}'

Store keys as secrets in CI (BASELINEFORGE_API_KEY), never in source code. Once the first key is created, requests without a valid key receive HTTP 401.