Playground
The Playground is the test chat for instances. It lives at /playground in the sidebar.
What it does
A simple chat UI:
- Pick an instance from the Instance selector at the top.
- Type a message, send.
- The reply streams in token by token if streaming is enabled.
The Playground reuses the production pipeline. The same prompts, the same tools, the same memory. The only difference is the conversation is tagged so that you can filter it out of analytics if you wish.
Under the hood the Playground calls the standard OpenAI-compatible endpoint POST /v1/chat/completions, passing the selected instance’s slug as the model field — the same contract any external client uses to talk to that instance.
Auth token
When the selected instance has authEnabled = true, the Playground exposes an API key field. Enter the auth API key (the same value configured in the instance’s Settings tab) and the chat works. Without the key, the engine returns 401 and the Playground surfaces a banner explaining why.
The key is held in browser local storage so you do not have to re-enter it. Clear it from the small Forget key link.
Streaming
Streaming is controlled by a per-page toggle. With streaming on, the assistant’s reply appears character-by-character. With streaming off, the reply appears all at once after the LLM finishes (slightly cheaper, observably less responsive).
Multi-turn conversations
The Playground keeps conversation context within a single browser session. Refresh the page and the conversation history clears (but the corresponding conversation row remains in the database). Open a new browser window to start a fresh conversation.
Use cases
- Iterating on prompts. Edit the Identity section, save, swing back to the Playground, ask the same test question, evaluate.
- Debugging tools. Watch the response carefully — many tool calls leave traces (“Searching the web for …”) in the assistant’s reply, and the Conversations page shows the raw tool calls.
- Smoke-testing channels. When a Telegram or Slack channel misbehaves, reproducing the issue in the Playground confirms whether the bug is in the channel adapter or in the underlying pipeline.