Voice Tools

Compliance & Security

Recording consent, hallucination guardrails, topic fencing, and compliance features for voice agents.

Compliance & Security

These features enforce compliance, prevent hallucinations, and protect against misuse during voice calls.


Automatically announce that the call is being recorded, either before or after the greeting.

{
  "complianceConsentEnabled": true,
  "complianceConsentMessage": "This call may be recorded for quality and training purposes.",
  "complianceConsentPosition": "before_greeting"
}
SettingTypeDefaultDescription
complianceConsentEnabledbooleanfalseEnable recording consent announcement
complianceConsentMessagestringConsent announcement text
complianceConsentPositionstringbefore_greetingWhen to play: before_greeting or after_greeting

Hallucination Guardrails

Restrict the agent to specific topics, block sensitive topics, and prevent prohibited statements.

{
  "guardrailsEnabled": true,
  "allowedTopics": ["billing", "account", "products", "shipping"],
  "blockedTopics": ["politics", "religion", "competitors"],
  "prohibitedStatements": [
    "I guarantee that...",
    "You will definitely...",
    "We promise..."
  ],
  "requireKnowledgeBase": true,
  "guardrailAction": "apologize"
}
SettingTypeDefaultDescription
guardrailsEnabledbooleanfalseEnable topic guardrails
allowedTopicsstring[][]Topics the agent CAN discuss (empty = all allowed)
blockedTopicsstring[][]Topics the agent must NEVER discuss
prohibitedStatementsstring[][]Phrases the agent must never say
requireKnowledgeBasebooleanfalseOnly provide info from the knowledge base
guardrailActionstringapologizeOn violation: apologize, redirect, escalate

Guardrail Actions

ActionBehavior
apologize"I'm sorry, I'm not able to help with that topic."
redirectRedirect conversation back to an allowed topic
escalateOffer to transfer the caller to a human agent

Knowledge Gap Detection

Track when the agent doesn't know the answer to a question. Gaps are logged for knowledge base improvement.

{
  "knowledgeGapDetectionEnabled": true,
  "knowledgeGapWebhookUrl": "https://your-app.com/webhooks/knowledge-gaps"
}

When the agent encounters a question it can't answer, it internally marks it with [KNOWLEDGE_GAP: topic]. After the call, gaps are extracted and sent to the configured webhook or saved to the session.


Live Call Monitoring

Allow supervisors to listen to active calls and optionally join (barge-in) or whisper to the agent.

{
  "liveMonitoringEnabled": true,
  "monitoringAllowBargeIn": true,
  "monitoringAllowWhisper": true
}
SettingTypeDefaultDescription
liveMonitoringEnabledbooleanfalseEnable live monitoring
monitoringAllowBargeInbooleanfalseAllow supervisor to speak to the caller
monitoringAllowWhisperbooleanfalseAllow supervisor to coach the agent silently

Speech Emotion Detection

Monitor the caller's emotional state through voice analysis and adjust the agent's behavior accordingly.

{
  "speechEmotionDetectionEnabled": true,
  "emotionDetectionModel": "basic",
  "emotionEscalationThreshold": 0.7
}
ModelBehavior
basicMonitor emotions through word choices. Acknowledge frustration empathetically.
advancedTrack tone, pace, and word choices. Proactively adjust approach for strong negative emotions.

Call Scoring & QA

Automatically score each call against quality criteria after it ends.

{
  "callScoringEnabled": true,
  "scoringCriteria": [
    "greeting_quality",
    "issue_resolution",
    "professionalism",
    "call_efficiency"
  ],
  "scoringModel": "gpt-4o-mini"
}

After the call, the LLM reviews the transcript and assigns scores for each criterion.


Example — Create Agent with Compliance & Security

curl -X POST https://api.thinnest.ai/v1/agents \
  -H "Authorization: Bearer $THINNESTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Compliant Support Agent",
    "model": "gpt-4o",
    "instructions": "You are a customer support agent. Stay on-topic — only discuss billing, accounts, and products. Never make promises or guarantees.",
    "voiceEnabled": true,
    "transcriber": { "provider": "deepgram", "model": "nova-2-conversationalai" },
    "voice": { "provider": "deepgram", "voiceId": "aura-2-thalia-en" },
    "complianceConsentEnabled": true,
    "complianceConsentMessage": "This call may be recorded for quality and training purposes.",
    "complianceConsentPosition": "before_greeting",
    "guardrailsEnabled": true,
    "allowedTopics": ["billing", "account", "products", "shipping"],
    "blockedTopics": ["politics", "religion", "competitors"],
    "prohibitedStatements": ["I guarantee", "You will definitely", "We promise"],
    "guardrailAction": "apologize",
    "knowledgeGapDetectionEnabled": true,
    "callScoringEnabled": true,
    "scoringCriteria": ["greeting_quality", "issue_resolution", "professionalism"],
    "scoringModel": "gpt-4o-mini"
  }'

On this page