Ayra AI
|Docs

Debug Guide

Systematic approaches to diagnosing and resolving issues

This guide provides systematic approaches to diagnosing and resolving issues with Ayra voice agents. When something isn't working as expected, follow these debugging methodologies to identify root causes and implement solutions.

1. Debugging Methodology

The 5-Step Debug Process

Step 1: Reproduce the Issue

  • Can you make it happen consistently?
  • Under what conditions does it occur?
  • Document exact steps

Step 2: Isolate Variables

  • Change one thing at a time
  • Test after each change
  • Track what worked and what didn't

Step 3: Check Logs and Data

  • Review conversation transcripts
  • Check integration logs
  • Examine error messages

Step 4: Test Hypothesis

  • Form theory about cause
  • Design test to confirm/deny
  • Adjust theory based on results

Step 5: Implement and Verify Fix

  • Apply solution
  • Test thoroughly
  • Monitor to ensure issue resolved

2. Voice Agent Debugging

Debug: Agent Not Understanding Callers

Step 1: Reproduce

  1. Call your agent
  2. Try to trigger the misunderstanding
  3. Note exactly what you say and how agent responds

Step 2: Review Transcript

  1. Go to Conversations
  2. Find the problem conversation
  3. Read transcript carefully:
    • What did customer actually say?
    • What did transcription record?
    • What did agent respond with?

Step 3: Identify Issue Type

Issue Type A: Speech Recognition Error

Customer said: "I need to schedule an appointment"
Transcript shows: "I need to shed jewel and appointment"
Problem: Voice platform speech recognition error

Issue Type B: Agent Logic Error

Customer said: "I need to schedule an appointment"
Agent responds: "I can help you check your order status"
Problem: Agent misinterpreting intent

Issue Type C: Knowledge Gap

Customer asked question, Agent responds: "I'm not sure about that..."
Problem: Information not in knowledge base

Debug: Agent Giving Wrong Information

Step 1: Identify Wrong Information

Document what agent said, what correct information should be, and source of correct information.

Step 2: Locate Source in System

Check System Prompt:

Agents → Configuration → System Prompt → Search for topic

Check Knowledge Base:

Knowledge Base → Search for topic → Review all matching entries

Step 3: Check Information Age

When was knowledge base last updated? If >3 months old, review all entries for accuracy.

Step 4: Test Fix

After updating, call agent immediately, ask the same question, verify correct answer.

Debug: Agent Response Delays

Step 1: Measure Latency

Use stopwatch to measure time from your question to agent starts speaking.

  • Normal: 1-2 seconds
  • Acceptable: 2-3 seconds
  • Problematic: >3 seconds

Step 2: Identify Bottleneck

Test System Prompt Length:

<1,500 words: Optimal | 1,500-2,500: Good | >3,500: Likely causing delays

Test Knowledge Base Size:

<50 entries: No impact | 100-200: May cause delays | >200: Likely causing delays

Test Integration Latency:

If delay occurs when agent says "Let me check availability", integration may be bottleneck

3. Integration Debugging

Debug: Calendar Integration Not Working

Step 1: Check Connection Status

Integrations → Calendar: Status should show "Connected" (green). If red, click "Reconnect" and re-authorize.

Step 2: Test Integration

Test 1: Read Access

Integrations → Calendar → Test Connection → "Fetch events" - Should list upcoming events

Test 2: Write Access

Create test appointment through agent - Event should appear in calendar within 1 minute

Test 3: Availability Check

Call agent, request appointment - Agent should check calendar and offer available times

Step 3: Debug Permissions

Check Google Calendar or Outlook permissions. Permission level should be "Make changes to events" or "Full access to calendars".

Step 4: Debug Booking Logic

Create explicit test: Manually create calendar event for tomorrow at 2:00 PM, then try to book same time through agent. Agent should say "not available".

Step 5: Debug Time Zone Issues

Verify Ayra calendar integration time zone, your calendar time zone, and agent business hours time zone all match.

Debug: CRM Integration Not Creating Records

Step 1: Verify Integration Active

Integrations → CRM: Status should be "Connected" (green), Last sync should be recent (within last hour).

Step 2: Check Activity Log

Integrations → CRM → Activity Log: Look for failed attempts (red), click to see error details.

Step 3: Debug Field Mappings

Integrations → CRM → Field Mappings: All required fields must be mapped. Check if Ayra collects data for these fields.

Step 4: Debug Data Collection

Review conversation transcripts: Check Contact Information section for email, phone number, name. If data missing, agent didn't collect it.

Step 5: Debug Permissions

Check CRM API permissions. HubSpot needs crm.objects.contacts.write, Salesforce needs "Access and manage your data (api)".

4. API Debugging

Debug: API Requests Failing

Step 1: Test with cURL

curl https://api.ayra.ai/v1/conversations \

-H "Authorization: Bearer sk_live_your_key_here"

Expected: JSON response with data. Errors: 401 (Invalid key), 403 (Insufficient permissions), 429 (Rate limited), 500 (Server error).

Step 2: Debug Authentication

Verify API key format: Live key (sk_live_...), Test key (sk_test_...). Check key permissions in Settings → API Keys.

Step 3: Debug Request Format

Validate JSON format, check Content-Type header is "application/json" for POST/PUT requests.

Step 4: Debug Rate Limiting

Check response headers: X-RateLimit-Remaining. If 0, wait until X-RateLimit-Reset time. Implement exponential backoff in your code.

Step 5: Debug Timeouts

Set appropriate timeouts (30-60 seconds). Test endpoint response time. If timing out, check network latency or reduce request size.

5. Debugging Checklist

Before Contacting Support

Basic Troubleshooting

  • Restarted/refreshed
  • Cleared cache
  • Tried different browser/device
  • Checked status page

Information Gathered

  • Exact error message
  • Steps to reproduce
  • Conversation ID (if applicable)
  • Screenshots or screen recording

Issue Isolation

  • Occurs consistently or intermittently?
  • Affects all agents or specific agent?
  • Works in test mode but not production?

Documentation Review

  • Checked Common Issues guide
  • Checked Error Messages guide
  • Searched docs.ayra.ai

When Contacting Support

Provide:

  • • Account email
  • • Description of issue
  • • Steps to reproduce
  • • Error messages/codes
  • • What you've already tried
  • • Urgency level (critical/high/normal/low)

Last Updated: January 5, 2025

Ready to transform your agency?

Start building with Ayra today. No credit card required.