Skip to navigation

What is the Playground?

The Playground lets you test prompts, models, settings, and Tools in the dashboard before you add them to a Flow or Agent. When a configuration works, save it as a Flow or Agent.

How the Playground works

The Playground has a configuration panel and a chat panel. In the configuration panel, select a model, write a system prompt, enter values for variables, and select Tools. In the chat panel, send messages. Each message uses the current configuration and the earlier messages in the conversation.

Each message is a real model call. It uses credits or your provider key, the same as a Flow run. For more information, see Platform keys vs. bring your own key (BYOK). Selected Tools also run for real, so test Tools that change external systems, such as Tools that send email, with test data.

The Playground doesn’t save your work. If you leave or reload the page, the configuration and the conversation are cleared. To keep a configuration, save it as a Flow or Agent. The Playground can’t open an existing Flow or Agent, so each session starts empty.

Use the Playground to:

  • Refine prompts: Change wording, instructions, and output formats.
  • Compare models: Send the same prompt to different models and compare the responses.
  • Tune settings: Adjust temperature, response length, response format, and reasoning.
  • Test Tools: Select Tools and review the tool calls in the conversation. For more information, see What are Tools?.
  • Prepare a Flow or Agent: Test a configuration before you save it.

Example

Dana is building a customer support chatbot for refund requests. Before Dana adds it to a Flow, Dana tests the configuration in the Playground:

  1. Dana selects claude-haiku-4-5 and writes a system prompt that states the refund policy.
  2. Dana tests edge cases such as angry customers, missing order numbers, and requests outside the return window.
  3. Dana selects gemini-3.8-flash and sends the same scenarios.
  4. To reduce variation between replies, Dana clicks the Advanced settings icon next to the Model field, turns off Use model default under Temperature, and sets the slider to 0.3.
  5. After the prompt produces acceptable replies, Dana clicks Save as Flow.

Test a configuration

To test a configuration, follow these steps:

  1. In the sidebar, click Playground. After the model list loads, the Playground selects your account’s default model.
  2. Optional: In the Model field, select a different model. The list shows the models that are enabled for your account. To enable more models, select Manage models at the end of the list. For more information, see Managing AI models.
  3. In the System Prompt field, enter the instructions for the model.
  4. Optional: Add variables in the {{VARIABLE_NAME}} format, such as {{CUSTOMER_NAME}}. For each variable, the Playground adds a field under Variables. Enter a value in each field. The Playground substitutes the values into the prompt. It doesn’t create fields for system variables, which start with _, or for names that contain a period.
  5. Optional: To change the model settings, click the Advanced settings icon next to the Model field. The Advanced Settings panel opens. For more information, see Model settings.
  6. Optional: In the Tools field, select the Tools that you want to test. In the selection dialog, you can also configure each selected Tool. These Tool settings apply only in the Playground.
  7. In the chat panel, enter a message and send it.
  8. Review the response. To test a multi-turn conversation, send more messages. To start over, click Clear.

On desktop, resize the panels with the divider. On mobile, open the chat panel from the header.

The chat panel has three tabs:

Model settings

The Advanced Settings panel has the following options. Response Format, Temperature, and Max output tokens each start with Use model default turned on. To set a value, turn off Use model default.

  • Response Format: Select Markdown, JSON, HTML, or XML.
  • Temperature: Set a value from 0 to 1. Lower values reduce variation, and higher values increase variation. Models that don’t support temperature ignore this setting.
  • Max output tokens: Set a response length from 1 to 128,000.
  • Reasoning: Use the model default, enable reasoning, or disable reasoning. This option appears only for models that support it.

Save your configuration

The Save as Agent and Save as Flow buttons are at the bottom of the configuration panel. They are available after you select a model.

  1. Click a save button:
    • Save as Flow creates a Flow with one Prompt step named Playground Prompt.
    • Save as Agent creates an Agent.
  2. In the dialog, enter a name. Optional: Enter a description.
  3. Click Create flow or Create agent. The new Flow or Agent opens.

The save action copies the Model, System Prompt, Temperature, Max output tokens, and the Tools that you selected. It doesn’t copy the Response Format, the Reasoning selection, the settings that you entered for each Tool, or the variable values.

The saved system prompt keeps its {{VARIABLE_NAME}} placeholders. Replace them in the saved prompt, or supply the values when the Flow runs. For more information, see Flow variables and templates.

Run the configuration from your code

The Payload tab shows the request body that the chat sends to POST /v1/dispatch. Send the same body with an API key to run the configuration from your own code without saving a Flow or Agent.

The Payload tab has two tabs:

  • Flow: A request with an inline Flow that has one Prompt step. The chat sends this request, so the tab label is Flow · active.
  • Agent: The same configuration as an inline Agent. This request carries only the model, the system prompt, the temperature, and the Tools.

The request body updates as you change the configuration and send messages:

  • The system prompt contains the variable values, not the {{VARIABLE_NAME}} placeholders.
  • The messages array holds the current conversation. It is empty until you send a message.
  • The Flow request includes the Response Format, the Reasoning selection, and the settings that you entered for each Tool.
  • options.recordMode is virtual and options.storeResults is false, so the run doesn’t save a Record.
  • options.debugMode follows the execution mode menu in the chat panel. It is true in debug mode, false in user mode, and absent in production mode.

To copy the request, follow these steps:

  1. In the chat panel, click the execution mode menu. The menu shows Debug mode by default.
  2. Select Run as production. The request body no longer contains debugMode, which matches a request from your own code.
  3. Click the Payload tab.
  4. Click the Flow tab.
  5. Click Copy. The request body is copied to your clipboard.

The following cURL command sends a copied Flow request. The messages array contains one user message:

cURL
curl https://api.runtype.com/v1/dispatch \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"record": { "name": "Chat: Playground", "type": "chat" },
"flow": {
"name": "Playground Session",
"description": "Quick testing session",
"steps": [
{
"id": "playground-prompt",
"type": "prompt",
"name": "Response",
"order": 0,
"enabled": true,
"config": {
"mode": "messages",
"model": "claude-haiku-4-5",
"outputVariable": "response",
"systemPrompt": "You handle refund requests for Example Organization.",
"temperature": 0.3
}
}
]
},
"messages": [
{ "role": "user", "content": "I want a refund for order 1042." }
],
"options": {
"streamResponse": true,
"recordMode": "virtual",
"storeResults": false
}
}'

Replace YOUR_API_KEY with a Runtype API key. For more information, see Managing API keys.

To continue a conversation, send the earlier user and assistant messages in the messages array, followed by the new user message. For all request fields, see Execute a flow or agent.

Review the streamed events

The Events tab lists the server-sent events of each response in order. Each event has a label for its type, such as step_start, text_delta, and execution_complete. When options.streamResponse is true, your code receives the same event types, so use this tab to see which events your code must handle.

The execution mode menu controls the detail in the events. In debug mode, the events include tool inputs, prompts, and costs. In user mode, the events leave out prompts, model settings, and costs.

Troubleshooting

  • The Model list shows “No models available”: No model is enabled for your account. Enable a model in Managing AI models.
  • A “Failed to load available models” message appears: The dashboard couldn’t load the model list. Reload the page.
  • The chat panel shows “Select a model to start chatting”: Select a model in the Model field.
  • The Tools field shows “Select a model first”: Select a model before you select Tools.
  • A “Failed to create flow” or “Failed to create agent” message appears: The configuration wasn’t saved. Your Playground configuration stays on the page, so try the save again.

Next steps