Skip to content

AI Agents ​

AI Agents in VeriPrompt are reusable, configurable workflows that bundle prompts, routing rules, and personas into a single deployable unit. They are designed for repeated tasks such as support responses, compliance checks, content generation, and autonomous data processing.

Overview ​

ConceptDescription
AgentA named entity with a persona, system prompt, routing policy, and optional access profile. Each agent gets its own API key.
ScenarioAn execution configuration linked to an agent. Defines what the agent runs (a stored prompt, a gateway call, a chain, etc.).
RunA single execution of a scenario. Captures request/response, token usage, provider info, and warnings.

When to use agents ​

  • You need a consistent, repeatable workflow across a team or product.
  • You want a single API key that enforces a specific routing policy and access profile.
  • You run scheduled or automated prompts (compliance scans, report generation, monitoring).
  • You need audit trails with per-run token tracking and provider attribution.

Access and permissions ​

RoleCan create agentsCan run scenariosCan view runs
Super AdminYesYesYes
Account OwnerYesYesYes
AdminYesYesYes
RangerView onlyNoNo
UserNoNoNo

Navigate to Admin > AI Agent in the sidebar to access the agent dashboard.

Key concepts ​

Personas ​

Every agent has a persona that shapes its behavior:

  • Name and Summary - human-readable identity (e.g. "ComplianceBot - Reviews financial reports for regulatory flags")
  • Tone - communication style (formal, casual, technical)
  • Role - one of the predefined roles:
    • software_developer_integrator - builds and integrates AI features
    • prompt_engineer - designs and optimizes prompts
    • service_reseller - white-labels VeriPrompt for clients
    • autonomous_system - runs without human intervention
    • agentic_entity - multi-step decision-making agent
    • privacy_individual - handles PII-sensitive workflows
    • compliance_security_custodian - enforces regulatory rules
    • approval_officer - reviews and approves outputs

Use cases ​

VeriPrompt provides pre-built use case templates to accelerate agent setup:

Use CaseDescription
Financial Compliance SupportRegulatory report scanning and flag detection
Healthcare Patient IntakeStructured patient data collection
E-commerce Personal ShopperProduct recommendations and comparison
Legal Contract ReviewClause extraction and risk assessment
IT Support TriageIssue classification and routing
Content GenerationMarketing copy and blog post creation

Each template includes suggested persona guidance, required inputs, and success metrics.

Scenario types ​

Scenarios define what happens when an agent runs:

TypeDescriptionUse when...
GATEWAYSends a runtime prompt directly to the AI gatewayYou need ad-hoc, dynamic prompts
STORED_PROMPTExecutes a prompt from your Prompt RepositoryYou have a versioned, tested prompt
PROMPT_VERSIONExecutes a specific version of a stored promptYou need deterministic, pinned behavior
CHAINRuns a multi-step prompt chain sequentiallyYou need complex, multi-step workflows
PROJECT_GATEWAYUses a custom project gateway endpointYou have a specialized provider setup

Execution modes ​

ModeDescription
AUTONOMOUSRuns without human oversight
INTERACTIVEPauses for human input between steps
SUPERVISEDRequires approval before sending output

Trigger types ​

TriggerDescription
MANUALTriggered by clicking "Run" in the dashboard or calling the API
SCHEDULEDRuns on a configurable schedule (frequency set in agent settings)
EXTERNAL_SIGNALTriggered by a webhook or external system

How to create an agent ​

Step 1: Navigate to Agent Setup ​

Go to Admin > Agents in the sidebar (or /admin/agents).

Click Create New Agent.

Step 2: Configure the basics ​

Fill in the required fields:

Name:              ComplianceBot
Description:       Reviews financial reports for regulatory compliance
Use Case:          Financial Compliance Support

Step 3: Define the persona ​

Persona Name:      ComplianceBot
Persona Summary:   Scans documents for regulatory flags and summarizes findings
Persona Tone:      Professional, precise
Persona Role:      compliance_security_custodian
Success Metrics:   Flag detection rate > 95%, false positive rate < 5%

Step 4: Configure routing and access ​

SettingExamplePurpose
Routing Policycompliance-high-accuracyControls which providers and models are used
Provider Groupenterprise-providersRestricts to approved providers
Access Profilecompliance-restrictedEnforces token limits and allowed operations
Protective Promptfinancial-guardrailAdds safety instructions to every request
Default QualityqualityPrefers accuracy over speed/cost

Step 5: Set usage pattern ​

Choose how the agent will interact with VeriPrompt:

  • gateway_anonymization_only - only uses the gateway for anonymous routing
  • full_stack_prompt_to_gateway - uses prompt repository + gateway (recommended)
  • prompt_git_byo_credentials - manages prompts in VeriPrompt, uses own provider keys
  • synthetic_qa_protective_addon - includes synthetic testing and guardrails

Step 6: Save and get the API key ​

After saving, VeriPrompt automatically generates an API key for the agent (prefixed vpak_). Copy it immediately - it cannot be retrieved later.

Agent API Key:  vpak_abc123def456...

You can also create additional gateway API keys for the agent in Admin > API Management and link them via the "Link to Agent" dropdown.

How to create and run scenarios ​

Step 1: Open the Scenario Manager ​

Navigate to Admin > AI Agent > Scenarios (or /admin/ai-agent/scenarios).

Click Create Scenario.

Step 2: Configure the scenario ​

Example: Gateway scenario with a runtime prompt

json
{
  "name": "Daily Compliance Check",
  "type": "GATEWAY",
  "triggerType": "MANUAL",
  "executionMode": "AUTONOMOUS",
  "runtimePrompt": {
    "prompt": "Review the attached document for regulatory compliance issues. List each issue with severity (high/medium/low) and the relevant regulation.",
    "systemPrompt": "You are a financial compliance expert. Return structured JSON.",
    "temperature": 0.2,
    "maxTokens": 2000
  }
}

Example: Stored Prompt scenario

json
{
  "name": "Weekly Report Summary",
  "type": "STORED_PROMPT",
  "storedPromptId": "sp_weekly_summary_v3",
  "triggerType": "SCHEDULED"
}

Step 3: Add file attachments (optional) ​

Scenarios support three attachment types:

TypeFieldExample
Inline textcontent"Focus on sections 3 and 7"
URLurl"https://example.com/report.pdf"
Uploaded filefileId"upl_123" (from /api/v1/files/upload)
json
{
  "attachments": [
    { "type": "text", "content": "Highlight any warnings above medium severity." },
    { "type": "file", "fileId": "upl_123", "fileName": "guardrails.pdf" }
  ]
}

To upload a file first:

bash
curl -X POST https://app.veriprompt.tech/api/v1/files/upload?processContent=true&category=agent-scenario \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@report.pdf"

Step 4: Configure warning thresholds (optional) ​

Monitor for rate limits and usage spikes:

json
{
  "warningThresholds": [
    { "warningType": "SUPABASE_RATE_LIMIT", "threshold": 1, "unit": "COUNT" },
    { "warningType": "SUPABASE_BILLABLE_TIER", "threshold": 80, "unit": "PERCENT" }
  ]
}

Step 5: Run the scenario ​

From the dashboard: Click the Run button on the AI Agent dashboard (/admin/ai-agent).

Via API:

bash
curl -X POST https://app.veriprompt.tech/api/admin/ai-agent/run \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "scenarioId": "scenario_daily_compliance" }'

Step 6: Review results ​

Each run is recorded with:

  • Status: SUCCESS, WARNING, FAILED, or CANCELLED
  • Provider: which AI provider and model was used
  • Tokens: prompt tokens, completion tokens, total
  • Response: full output payload
  • Diff: comparison with the previous run (for detecting output drift)
  • Events: timeline of INFO, WARNING, and ERROR events

View results at Admin > AI Agent or via:

bash
GET /api/admin/ai-agent/results
GET /api/admin/ai-agent/results/{runId}

Agent settings ​

Configure agent behavior in Admin > AI Agent > Settings (/admin/ai-agent/settings):

SettingDescription
Auto-runEnable/disable scheduled execution
Run frequencyHow often scheduled scenarios run
Notification emailEmail address for run alerts
Run retentionMaximum number of runs to keep (older runs are pruned)
Guardrail checklistPre-run safety checks that must pass

API reference ​

Agent CRUD ​

MethodEndpointDescription
POST/api/v1/agentsCreate a new agent
GET/api/v1/agentsList all agents for your company
GET/api/v1/agents/{agentId}Get agent details
PUT/api/v1/agents/{agentId}Update agent configuration
POST/api/v1/agents/{agentId}/cloneClone an agent
POST/api/v1/agents/{agentId}/regenerate-keyRegenerate the agent API key
GET/api/v1/agents/{agentId}/gateway-keysList linked gateway API keys

Scenario management ​

MethodEndpointDescription
POST/api/admin/ai-agent/scenariosCreate a scenario
GET/api/admin/ai-agent/scenariosList all scenarios
GET/api/admin/ai-agent/scenarios/{scenarioId}Get scenario details
PUT/api/admin/ai-agent/scenarios/{scenarioId}Update a scenario
DELETE/api/admin/ai-agent/scenarios/{scenarioId}Archive a scenario

Execution ​

MethodEndpointDescription
POST/api/admin/ai-agent/runTrigger a scenario run
GET/api/admin/ai-agent/statusGet current agent status
GET/api/admin/ai-agent/resultsList recent runs
GET/api/admin/ai-agent/results/{runId}Get run details with diff
GET/api/admin/ai-agent/chainsList available prompt chains

Create agent example ​

bash
curl -X POST https://app.veriprompt.tech/api/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "ComplianceBot",
    "description": "Scans financial reports for regulatory issues",
    "useCaseId": "financial-compliance-support",
    "personaName": "ComplianceBot",
    "personaSummary": "Reviews documents for compliance flags",
    "personaTone": "Professional",
    "personaRole": "compliance_security_custodian",
    "defaultQuality": "quality",
    "mockCompanyName": "Acme Corp",
    "mockCompanyAccount": "acme-corp-001"
  }'

Response:

json
{
  "agent": {
    "id": "clx123...",
    "agentId": "agent_compliancebot_001",
    "name": "ComplianceBot",
    "apiKeyPrefix": "vpak_abc1"
  },
  "apiKey": "vpak_abc123def456..."
}

Troubleshooting ​

ProblemCauseSolution
Scenario run fails with "provider unavailable"Selected provider is down or rate-limitedCheck provider health at /api/gateway/health. Update routing policy to include fallback providers.
Agent API key returns 401Key is inactive, expired, or revokedRegenerate the key via /api/v1/agents/{agentId}/regenerate-key or create a new one in API Management.
"Link to Agent" dropdown is emptyNo agents exist yetCreate an agent first, then the dropdown will populate when creating API keys.
Run shows WARNING statusSupabase rate limit or usage threshold exceededReview warning thresholds in scenario settings. Reduce execution frequency or increase limits.
File attachment not included in runFile ID does not belong to your companyEnsure the file was uploaded under the same company account.
Token usage unexpectedly highLarge file attachments or verbose system promptsFiles are truncated at 5,000 characters. Review prompt length and set maxTokens limits.