Glozr docs

Build your agent

Playground

The Playground is a sandbox at /app/agents/{id}/playground for testing an agent before publication. Conversations are flagged is_playground and excluded from billing, analytics, and the inbox — so you can iterate freely without polluting production data.

Overview

The Playground gives you the same runtime as production with three extras: per-turn overrides for site type, language, and page context; a diagnostics pane showing retrieval and tool internals; and a compare mode to run identical queries against two configurations side-by-side.

Testing capabilities

  • Site type switching — test across the seven verticals (ecommerce, saas, documentation, help_center, marketing, internal_kb, generic) without altering the saved agent.
  • Page context — provide a URL plus metadata (title, description, OG tags, JSON-LD, headers, body text) to simulate the visitor's page. Six templates cover Shopify products, SaaS pricing, Docusaurus docs, help articles, marketing pages, and a blank slate.
  • Language testing — pick any of the 132 supported locales and verify reply language plus script orientation (RTL).
  • Sample prompts — five or six vertical-specific test questions per site type, modeled on real buyer inquiries.
  • Compare mode — split-screen running the same query against two different site types in parallel.

Right-pane tabs

  • Scenario — site-type selector with capability badges showing which rich blocks (product_card, pricing_card, case_study_card, escalation_button) are allowed.
  • Page context — form-based editor for the visitor's page_context with template shortcuts.
  • Diagnostics — read-only inspection: latency metrics, confidence scores, retrieved sources with rankings, tool calls, inline blocks, and the full system prompt.

Note. The live widget renderer only whitelists ticket_escalation blocks today. Other blocks render in the Playground for design preview but may not show in production until their renderer is on the allowlist — see Tools & rich messages.

API endpoints

Three session-authenticated endpoints back the Playground, all gated by AgentPolicy::update:

  • GET /app/agents/{agent}/playground — page render including the verticals map.
  • POST /app/agents/{agent}/playground/stream — SSE stream. Parameters: message, conversation_id, site_type_override, language_override, page_context.
  • POST /app/agents/{agent}/playground/reset — clear conversation history.

Notes

  • Playground conversations share Redis history with production. Hit Reset explicitly to start clean.
  • Configuration overrides made in the Playground do not persist to agent settings.
  • Page-context payloads follow the same sanitization, allowlisting, 8 KB caps, and canonical URL handling as production.