// Integration Guide

Wire Decision Gate
into any agent.

Decision Gate is a REST API. Two endpoints. Two calls. Every agent action evaluated before it executes and after it produces output. This guide covers everything a developer needs to integrate in under an hour.

Authentication

All requests require an API key passed in the request header.

X-API-Key: your_decision_gate_key

Request an API key at decisiongate.net. Keys are issued instantly.


Gate 1 — Intent Evaluation

Call this before your agent executes any action. Pass the original user request and context. Decision Gate returns a verdict and reasoning across all six dimensions.

POST https://decisiongate.net/evaluate

Request

// JavaScript example
const response = await fetch('https://decisiongate.net/evaluate', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': 'your_key_here'
  },
  body: JSON.stringify({
    action: "Send follow-up email to all 8,000 customers",
    context: {
      requested_by: "sarah@company.com",
      account_tier: "team",
      is_owner: false,
      department: "Marketing"
    }
  })
});

const decision = await response.json();

// Stop the agent if blocked
if (decision.response_action === 'BLOCK') {
  return { blocked: true, reason: decision.summary };
}

Response

{
  "response_action": "BLOCK",
  "summary": "Mass email to 8,000 recipients requires owner authorization.",
  "request_id": "dg-case-1778609808682-s4crb",
  "dimensions": {
    "authority": { "score": 0.21, "verdict": "BLOCK" },
    "boundary": { "score": 0.78, "verdict": "PASS" },
    "impact": { "score": 0.18, "verdict": "BLOCK" },
    "loop_risk": { "score": 0.82, "verdict": "PASS" },
    "integrity": { "score": 0.80, "verdict": "PASS" },
    "manipulation": { "score": 0.85, "verdict": "PASS" }
  }
}

Gate 2 — Output Evaluation

Call this after your agent produces output but before it delivers or executes. Pass both the original request and what the agent actually produced. Decision Gate detects drift, scope expansion, and unauthorized actions.

POST https://decisiongate.net/evaluate/output

Request

// JavaScript example
const response = await fetch('https://decisiongate.net/evaluate/output', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': 'your_key_here'
  },
  body: JSON.stringify({
    original_request: "Summarize last quarter performance data",
    agent_output: "I accessed salary records for all 847 employees...",
    context: {
      requested_by: "mike@company.com",
      account_tier: "team",
      is_owner: false
    }
  })
});

const decision = await response.json();

// Block delivery if agent drifted
if (decision.response_action === 'BLOCK') {
  return { blocked: true, drift: decision.drift_detected };
}

Response Actions

Every evaluation returns one of four verdicts.

PASS

All dimensions cleared. Agent executes immediately.

CAUTION

Ambiguity detected. Require user confirmation before proceeding.

ESCALATE

Exceeds team member authority. Hold and notify owner.

BLOCK

Action stopped. Full case record created with reasoning.


The Six Dimensions

Every evaluation scores across six dimensions. Each returns a score (0–1) and a verdict.

authority — Does the requestor have verified permission for this action?
boundary — Does the action stay within the scope of what was requested?
impact — Is the potential effect proportionate and reversible?
loop_risk — Could this trigger unintended automated sequences?
integrity — Does the output faithfully represent the original intent?
manipulation — Are there signs of prompt injection or unauthorized directives?

Model Agnostic

Decision Gate works with any AI agent regardless of the underlying model — Claude, GPT-4, Gemini, Llama, or any custom model. It evaluates the action and output, not the model that produced it.

Ready to integrate?

Request your API key and start evaluating agent actions in under an hour.

Request Access →