Schedule icon
Webhook icon
Parallel icon
ChatCompletion icon
OpenAI icon
GoogleGemini icon
OutputValues icon
If icon
Write icon
Log icon
SlackIncomingWebhook icon

AI Multi-Provider Consensus Gate and Governance Adjudicator

Evaluate high-stakes decisions across multiple LLMs concurrently, adjudicate consensus, and escalate dissent to Slack in Kestra.

Categories
AICloudCore

Diagram unavailable

We could not build the topology for this blueprint. The flow itself is valid, use the YAML on the left to run it.

When automating operational approvals (such as production database schema migrations, IAM permission escalations, or large transaction dispute refunds), relying on a single LLM is a major risk. A single model can hallucinate subtle syntax hazards (such as default-lock DDL on high-traffic tables), miss architectural guidelines, or suffer provider-specific reasoning quirks.

This blueprint orchestrates multi-provider AI consensus in Kestra: it concurrently dispatches candidate change requests to two independent frontier AI providers (OpenAI and Google Gemini) in parallel with identical JSON schemas. If both providers reach unanimous consensus with high confidence, the change passes automatically. If the models split or disagree, the workflow halts execution, formats an executive side-by-side comparison report, and alerts on-call engineers in Slack for human sign-off.

How it works

  1. evaluate_providers_in_parallel (io.kestra.plugin.core.flow.Parallel) queries OpenAI and Google Gemini simultaneously with identical JSON Schema requirements.
  2. evaluate_with_openai (io.kestra.plugin.ai.completion.ChatCompletion) generates a structured verdict (APPROVE, REJECT, MANUAL_REVIEW), confidence score, and justification using OpenAI.
  3. evaluate_with_gemini (io.kestra.plugin.ai.completion.ChatCompletion) independently evaluates the same request using Google Gemini.
  4. adjudicate_consensus (io.kestra.plugin.core.output.OutputValues) computes cross-provider agreement, calculates average confidence, and determines automated approval status.
  5. evaluate_approval_gate (io.kestra.plugin.core.flow.If) branches deterministically:
    • Consensus Approval: Persists an immutable approval audit trail artifact (consensus-approval.md) in Kestra storage and authorizes downstream execution.
    • Dissent / Low Confidence: Halts automated execution, generates a side-by-side comparison report (consensus-dissent-report.md), and delivers an actionable escalation card to Slack for human sign-off.
  6. alert_governance_failure (errors block) notifies Slack if provider communication fails.

What you get

  • Zero single-model dependency for mission-critical enterprise workflows.
  • Multi-cloud parallel orchestration executing in sub-seconds.
  • Publication-ready audit artifacts stored in Kestra internal storage for SOC2/HIPAA compliance.
  • Interactive Slack escalation cards displaying side-by-side reasoning from multiple frontier models.

Who it's for

  • Platform Engineers and DevSecOps teams automating infrastructure change requests.
  • FinTech and Banking compliance teams requiring multi-party verification for automated transactions.
  • AI Safety and Governance teams enforcing European AI Act oversight mandates.

Why orchestrate this with Kestra

Coordinating multiple independent cloud AI providers concurrently requires robust parallel execution, structured output validation, state persistence, and human escalation channels. Kestra handles multi-cloud parallelism, retries, and execution lineage natively without custom glue code.

Prerequisites

  • OpenAI API key.
  • Google Gemini API key.
  • Slack incoming webhook URL for escalation notifications.

Secrets

  • OPENAI_API_KEY: API key for OpenAI provider evaluation.
  • GEMINI_API_KEY: API key for Google Gemini provider evaluation.
  • SLACK_WEBHOOK_URL: Slack incoming webhook endpoint for governance escalations.
  • GOVERNANCE_WEBHOOK_KEY: Authentication key for event-driven CI/CD triggers.

Quick start

  1. Configure OPENAI_API_KEY, GEMINI_API_KEY, and SLACK_WEBHOOK_URL in your Kestra namespace.
  2. Import this blueprint into your Kestra instance.
  3. Click Execute with default parameters to see parallel multi-model adjudication in action.
  4. Enable the schedule or trigger the webhook from Jira/ServiceNow change approval workflows.

How to extend

  • Add Anthropic Claude (io.kestra.plugin.ai.provider.Anthropic) as a third voting party for 2-out-of-3 supermajority quorum.
  • Chain downstream cloud provisioning tasks (Terraform, AWS, Ansible) upon consensus approval.
  • Link human Slack reaction buttons to resume execution dynamically.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.