Skip to main content

AI Configuration & BYOK

The AI Quality Orchestrator is a suite of opt-in AI features powered by your own LLM provider key. This page explains the BYOK model, how to configure your provider, and how to enable each feature.

BYOK-only: Agnox runs every AI request on your organization's own API key. Until an admin saves a key for the active provider in Settings → AI Models, all AI features are disabled and their buttons are hidden across the dashboard. There is no platform-provided fallback key.

Why BYOK?​

  • Zero markup — AI usage is billed by your provider (Google, OpenAI or Anthropic) directly at their prices. Agnox adds no AI surcharge, and AI features are available on every plan (Smart PR Routing needs Starter and the Automation Planner needs Team, because they build on those plans' capabilities).
  • Encrypted at rest — keys are encrypted with AES-256-GCM and are never shown again, logged, or returned by the API.
  • Your choice of model — pick a provider and a model per capability tier: Fast, Balanced, Deep reasoning.

AI Capabilities at a Glance​

CapabilityWhat it doesDocs
Root Cause AnalysisExplains why a run failed, clusters related failures and suggests locator fixes, with optional GitHub code contextRoot Cause Analysis →
Auto-Bug GenerationDrafts a ready-to-file bug report (Jira or Linear) from a failed runAuto-Bug →
Flakiness DetectiveScores test stability and diagnoses flaky testsFlakiness Detective →
Smart PR RoutingRuns only the tests affected by a PRSmart PR Routing →
Spec-to-TestTurns a requirements document into test casesSpec-to-Test →
Automation PlannerRanks manual tests for automation and builds a brief for your coding agent (no AI key needed); optional AI strategyAutomation Planner →
Smart Test OptimizerDeduplicates and improves manual test casesTest Optimizer →
Quality ChatbotAnswers questions about your test data in plain languageQuality Chatbot →

Enabling AI Features​

All AI features are off by default (opt-in model). Enable them individually in Settings → Features under the "AI Features" section. Apart from the Automation Planner, which needs no key, a feature is usable only when its flag is on and the organization has an API key for its active provider; Settings → Features shows an "AI features are inactive" notice while no key is configured.

FeatureFeature FlagWhere to Use
Root Cause AnalysisrootCauseAnalysisExecution drawer (failed runs), Failure Clusters on the Stability page
Auto-Bug GeneratorautoBugGenerationInvestigation Hub drawer
Flakiness DetectiveflakinessDetectiveAI analysis on the Stability page (the page itself is always available)
Smart Test OptimizertestOptimizerBulk Actions bar in Test Cases
Smart PR RoutingprRoutingRun Settings toggle
Quality ChatbotqualityChatbotAsk AI (sidebar)
Spec-to-Test GenerationspecToTest"Import from Spec" button in Test Cases
Automation PlannerautomationPlannerAutomation Planner (sidebar)

Configuring AI — BYOK (Settings → AI Models)​

AI features use your own provider API key (Bring Your Own Key). Settings → AI Models is always visible to admins, even while AI is disabled:

  1. Go to Settings → AI Models.

  2. In the Bring Your Own Key table, paste the API key for your provider (Google Gemini, OpenAI or Anthropic) and click Save Key. Each row shows "Configured" (green) or "Not configured".

    • If the active provider has no key yet, saving a key for another provider switches the active provider to it, so one step enables AI.
    • AI entry points (Ask AI, drawer AI actions, AI test generation, stability analysis) appear immediately — no reload needed.
  3. Optionally choose the AI Provider and a model per tier:

    • Fast — PR test routing, log triage, chat queries
    • Balanced — failure analysis, flaky-test diagnosis, test generation
    • Deep reasoning — automation planning, multi-failure correlation

    Your key unlocks every tier of its provider, including Deep reasoning, on every plan. The model list shows the models currently supported for your provider.

  4. To rotate a key, paste a new one; to remove it, click Remove. Removing the key of the active provider disables AI features again.

When no key is configured, AI endpoints answer 403 with { success: false, code: "AI_NOT_CONFIGURED" }, and Smart PR Routing simply runs all tests without calling a model. Read-only AI views (report history, failure cluster counts, chat history) stay available.

BYOK Provider Reference​

SettingOptionsDescription
AI ProviderGemini, OpenAI, AnthropicThe provider every AI call goes to (needs a key)
Tier modelsRegistry models of the providerPer-tier override of the default model (Fast / Balanced / Deep)
Cross-provider fallbackOn / OffWhen on, a failing call may retry on another provider you have a key for
BYOK — GeminiRequired to use GeminiYour Google AI Studio or Vertex AI key
BYOK — OpenAIRequired to use OpenAIYour OpenAI API key
BYOK — AnthropicRequired to use AnthropicYour Anthropic Console key

Security: Keys are encrypted at rest using AES-256-GCM before they are stored. Plaintext keys are never stored, logged, or returned by any API response — the API only reports whether a key exists. A key is decrypted only at the moment of an AI call made on your behalf.


Dual-Agent (Actor-Critic) Architecture​

Several AI features use a Dual-Agent pipeline to deliver high-quality, hallucination-resistant output:

┌──────────────────────────────────────────────────────────────────┐
│ STEP 1: Analyzer (Actor) │
│ Temperature: 0.4 — creative, generates suggestions │
│ Output: Structured JSON │
└───────────────────────────┬──────────────────────────────────────┘
│ structured output
▼
┌──────────────────────────────────────────────────────────────────┐
│ STEP 2: Critic (Evaluator) │
│ Temperature: 0.0 — deterministic, no creativity │
│ Input: Raw evidence + Analyzer output │
│ Task: Validate every claim. Override hallucinated suggestions. │
│ Output: Final developer-facing Markdown │
└──────────────────────────────────────────────────────────────────┘

Why two passes?

  • The Analyzer (0.4 temperature) generates creative, detailed suggestions but can occasionally hallucinate file names or APIs not present in the logs.
  • The Critic (0.0 temperature, fully deterministic) cross-checks every claim against raw evidence. Any suggestion not grounded in the provided data is overridden before it reaches you.
  • This pattern prevents the most common failure mode of single-pass LLM analysis: confident but wrong answers.

Features using this pattern: Root Cause Analysis, Auto-Bug Generator, Smart Test Optimizer, Spec-to-Test Generation (4-stage pipeline).

The Automation Planner ranks test cases and builds briefs without AI. Only its optional AI strategy calls your provider, with the test cases you selected.