Test your AI agent in a sandbox
Preview how your agent will respond without reaching real customers
Every Chatlane agent has a built-in Test agent tab where you can rehearse a conversation, try different send modes, and see exactly what the agent would produce — all without touching a real customer or attaching the agent to an inbox. It's the fastest way to verify that your instructions, knowledge base files, and auto policy actually behave the way you want.
Where to find it
Open any agent (Dashboard → Agents → pick one) and click Test agent in the left sidebar. The sandbox sits next to Overview, Files, Actions, and Logs. Conversations here aren't logged in agent run history, never appear in your inbox, and aren't sent to anyone.
Messages are kept against the agent until you hit Reset, so you can refresh the page and pick up where you left off — useful when you want to come back to a multi-step flow.
Send messages as a customer or teammate
Use the Send as toggle at the top of the sandbox to switch persona:
- Customer — what you type is treated as an incoming customer message and triggers a fresh agent run.
- Teammate — what you type is recorded in the thread as if a human teammate replied. The agent does not run on teammate sends — same as production, where teammate replies don't trigger the AI. Use this to simulate a teammate clarifying or following up before the customer comes back.
Customer messages appear on the right side of the thread; teammate and agent messages appear on the left, mirroring how a real conversation reads in your inbox.
Pick a send mode per message
Next to the persona toggle, the Mode picker controls how the agent responds for the next customer-sent message:
- Draft — the agent writes a reply that a teammate would review before sending. The bubble shows a blue Draft badge.
- Note — the agent writes an internal note (visible only to your team). The bubble shows a purple Internal note badge with a distinct background so it can't be confused with a customer-facing reply.
- Send — the agent writes a reply that would go out directly. The bubble shows a coral Sent badge.
- Auto — the agent decides between draft / note / send based on the auto policy you've configured. See below.
The mode defaults to whatever the agent is set to (Edit → Action), but you can override it per-run to preview alternatives before changing the saved configuration.
Try Auto mode and see why
When the agent runs in Auto mode, it follows your auto policy to choose between sending, drafting, or noting. In the sandbox, the resolved choice appears as a coloured badge above each agent reply (e.g. "Sent · chosen by auto policy"). Hover or focus on chosen by auto policy and a popover shows the agent's one-sentence reasoning — the exact justification the model gave for picking that action.
That reasoning is invaluable when you're tuning the policy. If a complaint gets sent directly when you'd prefer it as a draft, the reasoning tells you whether the model misread the policy, missed a keyword, or made a defensible call.
If you switch to Auto mode on an agent that doesn't yet have an auto policy, the sandbox flags it inline and links you back to the agent's edit screen.
Source citations from your knowledge base
If the agent has files uploaded and File search is enabled, replies that draw on those files show source chips below the bubble — one per cited file, with the original filename. Use the Sources button in the header to hide or show the chips. The chip's tooltip carries the exact quote from the file the agent used, so you can verify the answer is grounded in your documentation.
Edit, delete, or send a draft as a teammate
When the agent produces a Draft or Internal note, action buttons appear below the bubble so you can rehearse what a teammate would do next:
- Edit — swap the bubble for an editable textarea, change the wording, and save. The thread updates in place.
- Send (drafts only) — flip the draft to "Sent". Useful when you want to preview the next customer turn after a draft has been approved.
- Delete — remove the message from the thread.
These actions are sandbox-only — no real customer is reached and nothing is logged in the agent's production run history.
Attach files to your message
The paperclip icon in the composer lets you attach images or documents (up to 10 MB each) to a customer message — exactly the way attachments would arrive on a real conversation. If your agent has the Include attachments capability enabled, files flow into the agent's context the same way they would in production. Otherwise the attachment is shown in the thread but not sent to the model.
What the sandbox does not exercise
A few things behave differently in the sandbox so a test run can't have unintended side effects:
- Custom actions (function calls) are disabled. Webhooks and internal actions like "add a tag" or "update the conversation status" don't fire — agents in test mode focus on producing the right reply, not on real-world side effects.
- Run logs and feedback are not recorded against the agent. Your real Logs and Feedback views stay clean. If you want a piece of test feedback to count, switch back to a real conversation.
- Inbox routing doesn't apply. The agent runs against the message in front of it, regardless of which inboxes (if any) it's attached to.
Reset when you're done
Click Reset in the header to clear the entire sandbox thread (including any uploaded files). It's a clean slate for the next scenario — your agent's instructions, files, actions, and configuration are untouched.
Tips for getting the most out of testing
- Test the unhappy paths. Out-of-scope questions, refund/escalation requests, ambiguous prompts — these are where agents fail in production. Catching them in the sandbox is much cheaper than catching them in front of a customer.
- Walk through a full multi-turn flow. Customer asks → agent drafts → switch to Teammate and tweak → switch back to Customer and continue. The agent will see the teammate's voice as part of the conversation history, which is exactly how it sees handoffs in production.
- Compare modes side by side. Send the same message twice — once in Draft mode, once in Send — to see whether the wording shifts when the model knows the reply is going out directly.
- Use Auto mode reasoning to debug your policy. When the agent picks the "wrong" action, the reasoning popover usually tells you exactly which clause of your policy it relied on. Tighten that clause and re-test.
The sandbox is meant to be used early and often — every change to instructions, files, or auto policy is a good excuse to spend two minutes in the Test agent tab.