Skip to content

Execution Modes ​

Control how gateway requests are processed with three execution modes: Autonomous (default), Dry Run (plan only), and Supervised (human approval required).

Overview ​

Execution modes give you governance control over AI executions. They are especially useful for:

  • Testing routing configurations before going live
  • Compliance workflows requiring human approval
  • Cost estimation before committing to an execution

Access and Permissions ​

Required roles: Account Owner, Admin, Developer

API Parameter: executionMode in gateway execute requests

Available Modes ​

ModeDescriptionUse Case
AUTONOMOUSExecute immediately (default)Production workloads
DRY_RUNReturn routing plan without executingTesting, cost estimation
SUPERVISEDExecute but hold response for approvalCompliance, high-risk tasks

Autonomous Mode (Default) ​

Standard execution — the gateway routes the prompt to the selected provider and returns the response immediately. This is the default mode when no executionMode parameter is specified.

Dry Run Mode ​

Returns a routing plan showing which provider would be selected, estimated cost, and policy evaluation results — without actually sending the prompt to any AI provider.

TIP

Use DRY_RUN to test routing policies before deploying them, or to get cost estimates for budget planning.

bash
curl -X POST https://app.veriprompt.tech/api/gateway/execute \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Analyze this contract for compliance issues",
    "executionMode": "DRY_RUN",
    "policyId": "policy_eu_legal"
  }'
javascript
const result = await fetch('/api/gateway/execute', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    prompt: 'Analyze this contract for compliance issues',
    executionMode: 'DRY_RUN',
    policyId: 'policy_eu_legal'
  })
});
const plan = await result.json();
// Response includes: provider, model, policyId, geofencing, cost estimate
// No actual AI execution occurs
python
import requests

result = requests.post(
    'https://app.veriprompt.tech/api/gateway/execute',
    headers={'Authorization': 'Bearer YOUR_TOKEN'},
    json={
        'prompt': 'Analyze this contract for compliance issues',
        'executionMode': 'DRY_RUN',
        'policyId': 'policy_eu_legal'
    }
)
plan = result.json()
# Response includes: provider, model, policyId, geofencing, cost estimate
# No actual AI execution occurs

Supervised Mode ​

Executes the prompt but holds the response for human approval before returning it. Creates an Execution Hold that must be approved or rejected.

WARNING

Supervised mode requires a human to approve or reject each execution. Use it for high-value or compliance-sensitive workflows, not for high-volume automated tasks.

bash
# Step 1: Execute in supervised mode
curl -X POST https://app.veriprompt.tech/api/gateway/execute \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Generate investment advice for portfolio rebalancing",
    "executionMode": "SUPERVISED"
  }'
# Response: { "mode": "SUPERVISED", "holdId": "hold_xxx", "message": "Execution held for approval" }

# Step 2: Approve or reject the hold
curl -X PATCH https://app.veriprompt.tech/api/v1/execution-holds/hold_xxx \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "action": "APPROVED" }'
javascript
// Step 1: Execute in supervised mode
const execResult = await fetch('/api/gateway/execute', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    prompt: 'Generate investment advice for portfolio rebalancing',
    executionMode: 'SUPERVISED'
  })
});
const { holdId } = await execResult.json();

// Step 2: Approve the hold
const approval = await fetch(`/api/v1/execution-holds/${holdId}`, {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ action: 'APPROVED' })
});
const response = await approval.json();
python
import requests

# Step 1: Execute in supervised mode
exec_result = requests.post(
    'https://app.veriprompt.tech/api/gateway/execute',
    headers={'Authorization': 'Bearer YOUR_TOKEN'},
    json={
        'prompt': 'Generate investment advice for portfolio rebalancing',
        'executionMode': 'SUPERVISED'
    }
)
hold_id = exec_result.json()['holdId']

# Step 2: Approve the hold
approval = requests.patch(
    f'https://app.veriprompt.tech/api/v1/execution-holds/{hold_id}',
    headers={'Authorization': 'Bearer YOUR_TOKEN'},
    json={'action': 'APPROVED'}
)
response = approval.json()

Execution Timeline ​

Every gateway execution (in any mode) produces an execution timeline showing step-by-step progress:

StepDescription
Security AnalysisCheck request against security policies
Routing PolicyEvaluate routing rules and provider selection
Reference LibraryInject context from bound documents
Provider ExecutionSend prompt to selected AI provider
Protective PromptAnalyze response for security concerns
Response ProcessingProcess, store, and format the response

The timeline is returned in the response metadata and persisted for analytics.

TIP

In DRY_RUN mode, the timeline stops after the Routing Policy step, so you can see which provider would be selected and why — without incurring any AI provider costs.

Learn More ​