> ## Documentation Index
> Fetch the complete documentation index at: https://blackbox.dasha.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Test Agents in the Browser

> Test voice agents in the browser without phone calls. Run voice or chat conversations with real-time transcripts and validate behavior before deployment.

Test your agent in the browser without phone calls. Click **Test** to start voice or chat conversations with real-time transcripts.

**What you'll learn:** Starting test conversations, choosing test modes, and reviewing results.

***

## Start a test conversation

<Steps>
  <Step title="Open your agent">
    Go to **Agents** in the sidebar and select your agent.
  </Step>

  <Step title="Click Test">
    Click **Test** in the Quick Actions panel.
  </Step>

  <Step title="Choose your mode">
    Select **Voice**, **Chat**, or **Phone** from the mode selector.
  </Step>

  <Step title="Have a conversation">
    Speak or type to interact with your agent. The transcript displays in real time.
  </Step>

  <Step title="End the call">
    Click **End Call** when finished. Call results become available for review.
  </Step>
</Steps>

***

## Test modes

| Mode      | Description                                    | Best for                                         |
| --------- | ---------------------------------------------- | ------------------------------------------------ |
| **Voice** | Real-time voice conversation using STT and TTS | Final validation, voice quality, latency testing |
| **Chat**  | Text-based conversation with instant responses | Prompt iteration, debugging, quick scenarios     |
| **Phone** | Call a real phone number                       | End-to-end telephony testing                     |

***

## Test controls

| Control           | Function                                    |
| ----------------- | ------------------------------------------- |
| **Mode selector** | Switch between Voice, Chat, and Phone modes |
| **Text input**    | Type messages (chat mode)                   |
| **End Call**      | Stop the current conversation               |

***

## Reviewing results

After ending a test call, view the call result:

<Steps>
  <Step title="End the call">
    Click **End Call** when finished.
  </Step>

  <Step title="View the result">
    Click **Show** on the Result indicator in the dev toolbar.
  </Step>

  <Step title="Export for debugging">
    **Copy** to clipboard or **Download** as JSON.
  </Step>
</Steps>

**Result structure:**

<Accordion title="Example: Result structure">
  ```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "callId": "660e8400-e29b-41d4-a716-446655440001",
    "status": "Completed",
    "agentId": "agent-abc123",
    "endpoint": "web",
    "duration": "00:02:15",
    "inspectorUrl": "https://inspector.blackbox.ai/..."
  }
  ```
</Accordion>

For detailed analysis, open the [Call Inspector](/docs/test/call-inspector) using the `inspectorUrl`.

***

## Pre-deployment checklist

<Tabs>
  <Tab title="Voice quality">
    * [ ] Voice sounds natural and professional
    * [ ] Pronunciation of brand terms is correct
    * [ ] Speed is comfortable (not rushed or slow)
    * [ ] Multi-turn conversations flow smoothly
  </Tab>

  <Tab title="Response quality">
    * [ ] 10+ common questions tested and verified
    * [ ] Responses are accurate and on-topic
    * [ ] Tone matches brand voice
    * [ ] Edge cases handled gracefully
  </Tab>

  <Tab title="Integrations">
    * [ ] All configured tools execute successfully
    * [ ] Webhook endpoints return HTTP 200
    * [ ] Tool parameters extracted correctly
  </Tab>

  <Tab title="Performance">
    * [ ] Response latency under 2 seconds
    * [ ] STT transcription accuracy above 90%
    * [ ] Consistent behavior across 5+ test runs
  </Tab>
</Tabs>

***

## Troubleshooting

<Accordion title="Test won't start">
  **Possible causes:** Incomplete configuration, network issues, unsaved agent

  **Solutions:**

  1. Verify all required fields are completed (LLM config, TTS config, STT config)
  2. Check that API keys are valid and have necessary permissions
  3. Save the agent before attempting to test
  4. Clear browser cache and reload the page
</Accordion>

<Accordion title="Microphone not working">
  **Possible causes:** Permission denied, wrong device selected

  **Solutions:**

  1. Click the lock icon in the address bar → Allow microphone access
  2. Check system privacy settings
  3. Try a different browser (Chrome works best)
</Accordion>

<Accordion title="Agent doesn't respond">
  **Possible causes:** LLM configuration error, prompt issue

  **Solutions:**

  1. Verify the LLM API key is valid
  2. Check the model name is correct
  3. Test with a minimal prompt: "You are a helpful assistant."
</Accordion>

***

## API testing

Schedule test calls programmatically for automation:

<Accordion title="API example: Schedule test call">
  ```javascript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const response = await fetch('https://blackbox.dasha.ai/api/v1/calls?agentId=your-agent-id', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      endpoint: "web",
      priority: 7,
      callDeadline: new Date(Date.now() + 600000).toISOString(),
      additionalData: {
        testSession: true,
        testScenario: "basic-greeting"
      }
    })
  });

  const call = await response.json();
  console.log(`Test call scheduled: ${call.callId}`);
  ```
</Accordion>

***

## What's next

<CardGroup cols={2}>
  <Card title="Call Inspector" icon="magnifying-glass" href="/docs/test/call-inspector">
    Analyze completed calls
  </Card>

  <Card title="Troubleshooting" icon="bug" href="/docs/troubleshooting/common-issues">
    Common issues and solutions
  </Card>
</CardGroup>
