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

# Testing a Chat Agent

The **Test Chat** pane on the right of the builder runs a real conversation with the agent as currently configured — before a customer does.

## What it runs

The Test Chat uses the version **open in the builder**, not the published one. That is what makes it useful: you are testing the edit, not the live agent.

Each reply shows the **model** that produced it underneath, so you can see when the secondary model took over.

## Test as a contact

<Note>
  WhatsApp agents. Optional.
</Note>

Enter a phone number (e.g. `919876543210`) in the box above the chat, and the agent loads that contact's **CRM record** — so the agent and your functions see the real name, lead stage and attributes instead of an empty contact.

**Nothing is sent and nothing is saved.** No message goes to that number, and the conversation is not written to the Inbox.

<Tip>
  Test with a contact that has a filled-in record *and* one that does not. A brand-new contact has empty strings, not missing fields, and prompts that assume a name produce "Hi ," for them.
</Tip>

## What to test

<AccordionGroup>
  <Accordion title="The happy path" icon="check">
    The main thing the agent exists for, start to finish. Does it reach the outcome without being led there by you?
  </Accordion>

  <Accordion title="Every function trigger" icon="code">
    For each function, say the thing a customer would say and confirm the right function fires. A function that never fires in testing will never fire in production either.
  </Accordion>

  <Accordion title="Missing information" icon="circle-question">
    Ask for an order status without giving an order id. The agent should ask for it, not invent one or call the function with a guess.
  </Accordion>

  <Accordion title="Out of scope" icon="ban">
    Ask something the agent is not meant to handle. It should decline and route, not improvise.
  </Accordion>

  <Accordion title="Hostile and confused input" icon="triangle-exclamation">
    An angry message, a one-word reply, a message in another language, an attempt to talk it into a discount. You are checking that the boundaries in your prompt hold.
  </Accordion>

  <Accordion title="Media and voice notes" icon="microphone">
    If Audio Transcription or Image Context is on, test that the agent handles those inputs. If they are off, check what it says when someone sends one anyway.
  </Accordion>
</AccordionGroup>

## Testing the individual pieces

The Test Chat exercises the agent as a whole. Each function also has its own test path, which is faster for checking one thing:

| Function type                         | Test path                                                                 |
| ------------------------------------- | ------------------------------------------------------------------------- |
| Custom function                       | **Test Run** tab — input fields built from your signature, real execution |
| Send Template                         | **Test Send** — sends the template to a phone number                      |
| Send Image / Document / Video / Audio | **Test Send** — sends the file to a phone number                          |

## Before publishing

<Steps>
  <Step title="Run the happy path once more on the final version" />

  <Step title="Test Send every media and template function" />

  <Step title="Check the follow-up settings">
    Especially the stop condition — an unattended message that ignores "not interested" is the one customers complain about.
  </Step>

  <Step title="Save, then publish">
    Publish ships the last saved version. Save first.
  </Step>
</Steps>

## Related

<CardGroup cols={2}>
  <Card title="Versions and publishing" icon="code-branch" href="/chat-agents/versions-and-publishing">
    Test on a version, publish when it is right
  </Card>

  <Card title="Monitoring" icon="chart-line" href="/chat-agents/monitoring">
    Watching it once it is live
  </Card>
</CardGroup>
