Skip to main content
Truefoundry’s LLM Playground is your interactive environment for developing, testing, and refining AI prompts and building agents. It provides a comprehensive interface to experiment with different models, configurations, and parameters before deploying your prompts in production.

Getting Started with the Playground

Follow these steps to create and test your prompts:
  1. Choose a model - Select from available AI models
  2. Add System message - Define the AI’s role and behavior
  3. Add User message - Provide the input or query
  4. Configure parameters - Adjust creativity, response length, guardrails, and structured output
  5. Run to test - Execute your prompt and review the results
  6. Save the prompt - Store as a reusable template for future use
TrueFoundry AI Gateway Playground interface showing model selection, system message input, user message input, and parameter configuration options
Main Playground interface with model selection, message inputs, and parameter controls.

Managing Prompts

Saving Your Prompt in the Playground

Once you’re satisfied with your prompt’s performance, save it for future use. Click the Save button and provide:
  • ML Repo - Select the repository (see ML Repos)
  • Name - Give your prompt a descriptive name
  • Commit message - Add a brief description of changes
TrueFoundry AI Gateway Playground with highlighted Save button in the top right corner after configuring prompt parameters
Save button highlighted in the top right corner.
Modal dialog for saving prompt template showing ML Repo selection, prompt name field, and commit message field
Save dialog with ML repo selection, name field, and commit message.

Loading Existing Prompts

The Playground allows you to work with previously saved prompts, enabling you to:
  • Build on previous work - Start from existing templates
  • Collaborate with teammates - Share and iterate on prompts
  • Continue where you left off - Resume prompt development
TrueFoundry AI Gateway Playground Load Prompt interface showing dropdown to select existing prompt templates
Load Prompt dropdown showing available saved templates. When you load a prompt in the Playground, all configurations are restored exactly as saved — including model parameters, guardrails, structured output, variables, and routing settings.
TrueFoundry AI Gateway Playground displaying a loaded prompt with all previous configurations restored including system message, parameters, and settings
Loaded prompt with all previous configurations restored. Once the prompt is loaded, you can edit, experiment with the prompt and save it again to create a new version.

Advanced Playground Features

Create reusable prompts in the Playground with variables like {{customer_name}} or {{product_type}}. You can then run these prompts by passing values. Please refer to Using Prompts for more details on running prompts with variables.
TrueFoundry AI Gateway Playground input variables configuration showing variable definition interface with placeholder examples like customer_name and product_type
Input variables configuration with dynamic placeholders.
Configure guardrails in the Playground to ensure model responses stay appropriate and on-topic.Learn more: Guardrails and Security Overview
TrueFoundry AI Gateway Playground showing guardrails configuration panel with available guardrail options to select
Guardrails configuration panel with available guardrail options.
TrueFoundry AI Gateway Playground guardrails configuration interface showing selected guardrail policies applied to the prompt
Selected guardrail policies applied to the prompt.
Use the Playground to configure routing policies (load-balancing, fallback, retries) across models at the gateway.Learn more: Routing Configuration Overview
TrueFoundry AI Gateway Playground routing configuration panel showing model selection and routing policy options
Routing configuration from Playground
TrueFoundry AI Gateway Playground routing configuration interface showing configured routing policies with fallback and load balancing settings
Configured routing policies with fallback and load balancing settings.
Configure the Playground to get responses in specific formats such as JSON.
TrueFoundry AI Gateway Playground structured output configuration showing schema definition interface with agent assistance
Structured output configuration with schema definition interface.
TrueFoundry AI Gateway Playground showing generated JSON schema for structured output with defined properties and data types
Generated JSON schema with defined properties and data types.
Use the Playground to extend AI capabilities with external tools and services.
TrueFoundry AI Gateway Playground MCP Servers configuration panel showing available MCP server options and connection settings
MCP Servers configuration panel with available tools.
TrueFoundry AI Gateway Playground showing configured MCP Servers with connected external tools and services for enhanced AI capabilities
Configured MCP Servers with connected tools.

Comparison View (Coming Soon)

Compare multiple prompt versions and their configurations in the playground side by side.
I