Skip to content

Test mode

Open in ChatGPT Open in Claude

Test mode lets you talk to your agent on your real production site while keeping the conversation out of your data. Sessions started in test mode are flagged as test traffic, so they never count toward your analytics, and they stay out of the default Conversations list. Use it to smoke-test a new action, a knowledge update, or a copy change against production without your own messages skewing reports.

Turn it on from the browser console with setTestMode. No redeploy, no separate staging agent.

Open your production site, open the browser console, and run:

foldspace("when", "ready", () => {
foldspace.agent({
apiName: "YOUR-AGENT-KEY",
}).setTestMode(true);
});

Replace YOUR-AGENT-KEY with your Agent API Name from Agent Studio → Setup. Once it’s on, the agent shows a striped banner so you always know the current session is being excluded from your data:

Agent widget in test mode with the "conversations will not be tracked" banner TEST MODE · CONVERSATIONS WILL NOT BE TRACKED Foldspace AI I'm here to help! I want to invite a teammate I want to customize the agent Show me today's conversation insights Share current tab Powered by Foldspace.ai

Every conversation you start while the banner is showing is tagged as a test session.

Test mode is scoped to the current page session. Reload the page to clear it, or turn it off explicitly:

foldspace.agent("YOUR-AGENT-KEY").setTestMode(false);
ParameterTypeRequiredDescription
enabledbooleanYestrue flags all new sessions on this page as test traffic and shows the banner. false returns the agent to normal tracked behavior.

Test sessions are hidden from Agent Studio → Conversations by default so real user activity stays clean. To surface them, filter by source:

  1. In the Conversations filter bar, open the Source filter. If it isn’t showing, add it from + Add filter.
  2. Check SDK Test (test-mode sessions are recorded under this source), then Apply.

The list now shows your test conversations. Open one to check the timeline and View Analysis and confirm the agent behaved as expected. Leave Live Agent unchecked to see test traffic on its own.

  • Conversations: review and filter sessions, including test traffic.
  • Custom events: send your own product events into analytics.
  • Visibility: show, hide, open, or close the agent from code.