AI Agent

Test your AI agent

See how the AI agent handles real requests before your customers do, and after every change.

Testing shows you how the AI agent handles real requests before your customers see it. Test before you launch, and again after every change to knowledge, rules, workflows or actions. A change that fixes one case can affect a similar one, so rerun the scenarios that matter most each time.

What you can do

  • Chat with the AI agent in the playground, exactly as a customer would on web chat.
  • Run whole sets of scenarios through Copilot or your own AI agent, on web chat, email and phone calls.
  • Test each action and piece of code on its own, with inputs you choose.
  • See why it replied the way it did, down to every search and action.
  • Check replies against your rules with Bot QA, before and after launch.
  • Compare versions and roll back when a change makes things worse.

Test conversations still run actions

Test conversations are marked as tests and kept out of your reports, but the AI agent's actions run for real. If a workflow can issue a refund, cancel a subscription or update a record in another system, testing that path does it. Use test accounts or test records for those paths, or test the action on its own first.

Set it up

Ask Copilot or your own AI agent to run your scenarios and report back:

Ask Copilot or your AI agent

Run test conversations for our refund workflow: a customer inside the refund window, one outside it, one we can't identify, and one who asks for a person. Use web chat for the first three and email for the last. Summarize which ones went wrong and why.

After a change, rerun the same set:

Ask Copilot or your AI agent

We changed the cancellation workflow. Rerun the cancellation scenarios from the last test run on email, and tell me which replies changed and whether they got better.

To chat with the AI agent yourself, open the Bot Playground from the navigation bar.

A testing routine that works

Write down the scenarios

List the requests your customers actually send, with what a correct outcome looks like for each: the answer, the action, or a handoff to your team. Include edge cases: missing details, a request your policy refuses, a customer who changes their mind, and someone who asks for a person straight away.

Chat with the agent in the playground

Try the most common scenarios yourself in the playground. Check the answers, and open the conversation in the help desk to see which actions ran.

Run the full set with Copilot

Ask Copilot to run every scenario as a test conversation and summarize what failed. Fix the cause, then run the set again.

Test each action and piece of code

Run every action, condition provider and event handler on its own with realistic inputs, including inputs that should fail. See Test actions and code on their own.

Add Bot QA checks

Write Bot QA checks for the mistakes that would hurt most, test them on known good and bad replies, then turn them on. They keep checking every reply after launch.

Review real conversations after launch

Read a sample of real conversations in the first days, especially handoffs and Bot QA findings. Turn each problem you find into a fix and a new test scenario.

For extra assurance before a launch, Octocom's solution engineers can review your configuration and test plan with you.

Chat with the AI agent in the playground

The Bot Playground lets you chat with the AI agent exactly as a customer would on web chat. Open it from the navigation bar, or from Settings -> Automation -> Bot Playground.

  • Pick the business. If your organization has several businesses, choose one next to Previewing.
  • Always available. The playground ignores your web chat support hours, so you can test at any time.
  • Copy the conversation ID. The ID under the chat identifies the test conversation. Use it to test an action or Bot QA check against this conversation, or give it to Copilot to inspect. The conversation also appears in the help desk with a Playground tag.
  • Share it. Share link copies a link anyone can open to chat with the AI agent, without logging in. Conversations from that link are test conversations too. Use it to let colleagues try the agent before launch.
  • Check the look. Appearance opens the web chat settings, where you change how the widget looks.

See why the AI agent replied the way it did

Open the test conversation in the help desk and select Debug this message (the bug icon) on any AI reply. It shows the system prompt the AI agent received, the actions it could use, each action it called with its arguments and result, and its reasoning when available. This is the fastest way to tell whether a wrong answer came from missing knowledge, the wrong workflow, or an action result.

Run test conversations with Copilot or MCP

Copilot and other AI agents connected through Octocom MCP can hold test conversations with your AI agent, read every reply and the actions it took, and repeat the run after each change. This is how you test many scenarios quickly, and how you test email and phone calls, which the playground doesn't cover. See the example requests in Set it up.

These conversations appear in the help desk as Agent playground, separately from the Human playground conversations people start in the playground. Both carry a Playground tag in the conversation list.

The agent can recreate the customer's situation. In web chat, it sets the page they are on, their device and their country. On email, it sets the subject line and which inbox's signature the reply uses. On a phone test, it picks the line they called or tests an outbound campaign call. On every channel, it can set the customer's name, contact details and language, and add context a channel or integration would normally provide.

What runs and what doesn't

  • Runs as in production: knowledge, bot rules, workflows, actions and their effects on external systems, handoffs (recorded on the test conversation).
  • Doesn't run: delivery to a real customer, tickets in an external help desk, notifications to your team, event handlers and webhooks. Test conversations are also left out of analytics.
  • Not covered: how real emails are received and threaded (test email rules with test_email_rules), and speech on phone calls (use a test call).

Limits: 60 test conversations per hour per organization and 15 messages per conversation. A test conversation can be continued for seven days after its last message.

Test actions and code on their own

Test each piece on its own before you test it inside a conversation. A focused test shows exactly what the code returns, so a failing conversation is easier to trace. Each test runs the code with inputs you choose.

What you testIn the dashboardCopilot and MCP
Python actionSettings -> Automation -> Custom Actions, open the action, Test Actiontest_python_action
API actionSame page, Test Actiontest_api_action
Condition providerSettings -> Automation -> Custom Conditions, open the provider, Test Providertest_condition_provider
Event handlerSettings -> Automation -> Event Handlers, open the handler, Test Handlertest_event_handler
WebhookSettings -> Automation -> Event Handlers, open the webhook, Send test eventtest_webhook
Recurring jobSettings -> Automation -> Recurring Jobs, Test Job (runs once now, not recorded in run history)test_recurring_job
Custom HTTP endpointSettings -> Advanced -> HTTP Endpoints, Test requesttest_http_endpoint
Sidebar widgetSettings -> Help Desk -> Sidebar Widgets, Test Widgettest_sidebar_widget
Phone line routerSettings -> Voice & SMS -> Phone line routers, Run testtest_phone_line_router
Email rulesSettings -> Help Desk -> Email Rules, Run testtest_email_rules
Spam filterSettings -> Help Desk -> Spam Filter, Run testtest_spam_filter
Comment workflowsSettings -> Channels -> Comments, Test Commenttest_comment_workflow
Review workflowsSettings -> Channels -> Reviews, Test a reviewtest_review_workflow
Data collectionAsk Copilottest_data_collection

A few things to know:

  • Add a conversation ID to an action, condition provider, event handler or sidebar widget test to give the code a real conversation in context["conversation"]. A playground conversation works well.
  • Code tests run for real. Testing an action, event handler, webhook, recurring job, HTTP endpoint or phone line router calls your external systems exactly as a live run would, so any writes happen. The email rules, spam filter, data collection, comment workflow and review workflow tests only preview the result: they send nothing and change no conversations.
  • A handoff has no effect in an action test. hand_off_conversation only hands off when the AI agent runs the action in a conversation.
  • Test every path. For a condition provider, use inputs that produce each condition, for example a customer who exists, one who doesn't, and one whose request was already handled. Check that each comes back as expected.

Check replies with Bot QA

Bot QA checks the AI agent's replies against your quality rules, such as "never confirm a refund the actions didn't complete". During testing, use it two ways:

  • Test a check on a known reply. In Settings -> Automation -> Bot QA, select Test checks, enter a conversation ID and pick a reply. Use replies that should fail and replies that should pass. Copilot and MCP use test_bot_message_qa and test_bot_conversation_qa. Tests store nothing and trigger no alerts.
  • Keep checking after launch. Turn on reply checks with the Record and continue reaction first, review the findings, then switch the checks you trust to Hand off to a person.

Compare versions and roll back

Octocom saves a version every time you change a workflow, action, condition provider, bot rule, article or other code, so you can see what changed between two test runs and go back if a change made things worse.

  • See what changed. Select View history on a workflow, custom action, condition provider, bot rule or article to see each version and what it changed. Copilot and MCP use list_workflow_versions and diff_workflow_versions for a line-by-line diff of a workflow, and list_configuration_changes for every change made across your configuration, with who made it and any note on why. See Change history and restore.
  • Rerun the same scenarios. After a change, run the same test conversations as before and compare the replies. Keep your scenario list so you can ask Copilot to rerun it after every change.
  • Roll back. If the new version is worse, restore the previous one from View history, or with the matching restore tool, such as restore_workflow_version or restore_action_version.
  • Compare on live traffic. To measure which version performs better with real customers, run an A/B test.

Other ways to stay safe while you test

  • Approve email replies first. With AI reply approval, every AI email reply waits for an agent to approve it. Turn it on for your first days live if you want a person to read every reply. Test and playground conversations are never held for approval.
  • Keep test traffic out of your systems. Webhooks skip playground conversations unless you turn on Include playground conversations in the webhook's filters. With an external help desk, playground handoffs create no ticket unless Create Ticket for Playground Handoffs is on in Settings -> Help Desk -> Ticket Routing. Event handlers don't run for Copilot and MCP tests, but they do run for conversations started in the playground. A handler that writes to another system can check whether the conversation is a test (see isPlayground and testOrigin in Python context).
  • Talk to the voice AI. Use Test call in Settings -> Voice & SMS -> Voice agents to talk to the voice AI from your browser, as a caller would. See Voice AI best practices.

For developers and AI agents

Test conversation tools

ToolWhat it does
start_conversationStarts a test conversation with a first customer message, on web chat (web, the default), email or phone-call. Returns conversationId and messageId.
send_messageSends the next customer message. Returns a messageId.
get_responseWaits for the AI agent's complete turn after a message and returns it. Call it before sending the next message.
send_conversation_eventPhone tests only. Sends something other than speech: customer-silent (the caller says nothing) or max-call-time (the call reaches its time limit).
close_conversationCloses the test conversation. On a phone test, this is the caller hanging up.

get_response returns the AI agent's messages in order (including product cards, quick replies and charts), the actions it called, and how the turn ended: reply, silent, handed-off or closed. Email replies include the rendered email (from, to, subject, text and HTML) with your signature. On phone tests it also reports how long the voice AI took to start answering.

To dig into a single reply, read the conversation with get_conversation, then pass a reply's message ID to get_response_tool_calls (actions, arguments, results and reasoning) or get_response_system_prompt (the full prompt the AI agent received).

Simulate the customer's situation

ChannelOptions
Web chatbrowserSession sets the current page, recently visited pages, browser, device and country, so you can test page-aware answers. webChatConfigId picks a web chat configuration.
EmailcustomerEmail is required. subject sets the subject line. emailConfigId picks which inbox's signature the preview uses. Test emails go through a hidden test inbox and are never sent.
PhonecustomerPhone (the caller's number) is required. phoneLineId or timeSlotId choose which voice AI answers. campaignId tests an outbound campaign call, with you as the recipient. See voice AI testing.
AllcustomerName, customerEmail and customerPhone attach a customer. language sets the language. metadata (up to 20 keys) simulates context a channel or integration would normally provide.

Required scopes

Starting and continuing test conversations needs the conversations:write scope, and reading replies needs conversations:read. Testing code needs automations:write: actions, condition providers, event handlers, webhooks, recurring jobs, HTTP endpoints, sidebar widgets and phone line routers.

On this page