Testing prompts in the Langfuse playground without code
Prompt authors who need to try a change before it reaches production can use the Langfuse playground to iterate without writing code. The playground lets you open a prompt, edit it, and run it against a model to see the output immediately. According to the Langfuse docs, it supports side-by-side variants so you can compare two or more versions of a prompt on the same input, tool calls and structured outputs so you can check that a model returns the function calls and schemas your application expects, and the ability to open a real generation from a trace and rerun it with changed wording or settings. That last option matters most for debugging, because the input is the one your users actually sent rather than a sample someone invented.
The playground answers a quick question: does this wording or configuration behave better on the cases I can see right now? It is the right tool for early drafts, for reproducing a bad production output, and for checking tool definitions before a release. It is not a replacement for dataset experiments, which run a prompt version across a fixed set of inputs and score the results so you can compare versions consistently. Plan to move a change from the playground into a dataset experiment once you need repeatable evidence for a release decision. The Langfuse self-hosting documentation describes the deployment options that apply to this setup.
The core playground feature sits in the MIT-licensed codebase that Langfuse states is available without limits in the open source version, so it does not require an Enterprise license key. Before your team relies on it, confirm that your self-hosted instance has model provider connections configured for each provider your authors plan to test. The playground calls those providers from the server, so a prompt that works in one environment can fail in another if the connection, credentials or allowed models differ. Ask whether each connection is scoped to the right project, and record which provider keys the playground can use, since those keys carry the cost of every test run.
What the playground covers for each role
Prompt authors use the playground to shape wording, model settings and tool definitions before a change reaches an application. They can start from a saved prompt or from a generation that real traffic produced, so the starting point reflects the inputs users actually send.
- Variant comparison: Build two or three prompt variants and run them against the same input to see where the answers diverge.
- Tool and schema trials: Try tool calls and structured outputs on the prompt, then check whether the output shape holds across several inputs.
- Trace-based starting points: Open a generation from a trace and carry its input into the playground to reproduce a failure or a strong answer.
- Saving versions: Save a tested change as a new prompt version so the team can review it before any production label moves.
The playground does not replace sign-off on production labels, evaluation against a dataset, or testing of the application's own behavior. Confirm in your Langfuse version which of these actions are available to your role and which edits need a separate review step.
Application engineers use the playground to confirm that a prompt behaves with the model, parameters and tools their code will send. Once the configuration is settled, the application fetches the prompt by name and label through the SDK, so the playground informs the code but does not run it.
- Model and parameter checks: Confirm the model name, temperature and response format the application depends on, and keep them with the prompt version they were tested against.
- Reproducing bugs: Open the generation from a failing trace, adjust the input and check whether the prompt change resolves it.
- Tool wiring: Make sure tool definitions in the playground match the function names and argument shapes your code implements.
- Handoff to code: Retrieval, client-side caching, error handling and fallback prompts stay in the application, since the playground does not supply that runtime logic.
The playground does not replace integration tests, load testing or the production fallback path. Check in your SDK version how prompt configuration, including model settings and tools, reaches application code before depending on it.
Platform operators run the self-hosted instance that the playground depends on. They decide which LLM connections exist, who can use them, and whether the data stores behind trace history are healthy enough for generations to open quickly. Their decisions shape what authors and engineers can do.
- LLM connections: Add provider connections for the models authors are allowed to test against, and control how the credentials for those connections are stored and rotated.
- Access roles: Project-level RBAC roles and protected prompt labels are Enterprise license features. Confirm which roles your license covers in the Langfuse license key docs before granting edit rights on production prompts.
- Data store health: Opening a generation from a trace reads trace data from ClickHouse, so slow or unavailable stores appear as slow or failed playground sessions. Watch the web and worker containers alongside the data stores.
- Upgrade testing: Playground behavior can change between versions, so run key prompt workflows in a staging instance before a major upgrade.
- Network reach: Confirm the instance can reach each connected model provider, including through any egress controls your network applies.
The playground does not replace prompt review, evaluation runs or the data handling terms of the model provider. Confirm connection setup and role scope against the documentation for your Langfuse version before you publish guidance to teams.
Playground configuration options and when each fits
This table compares the playground choices that shape how teams test prompts on a self-hosted Langfuse instance, from side-by-side variants and tool or schema testing to trace-based starting points and access controls. Read the license column first if you plan to restrict who can open or change prompts. Langfuse states that core features are available in the MIT-licensed version, while project RBAC, protected labels and data masking need an Enterprise license key.
| Option | When it fits | Trade-off | Enterprise license key |
|---|---|---|---|
| Side-by-side variant testing | Comparing two wordings or model settings on the same input before a change | Judged by eye unless you save results and score them separately | No |
| Tool call and structured output testing | Prompts that must call functions or return a schema the application parses | Tool and schema definitions must match the code, so a playground run does not prove production parsing | No |
| Opening generations from traces | Reproducing a real failing request as a starting point for a fix | Traces can contain personal data, so review masking and retention before sharing screens | Playground is core. Masking and retention need a key |
| Saving a variant as a new prompt version | Turning a tested variant into a managed version the application can fetch | A saved version still needs evaluation and labeling before it reaches production | No |
| Project-level RBAC for playground access | Teams where only some members may open or edit prompts in a project | Roles must be designed before rollout, and broader default access applies without them | Yes |
| Protected prompt labels | Production labels that only named roles may move after a playground review | Adds a change control step, so release owners must be defined and staffed | Yes |
| Server-side data masking | Shared trace data with customer or patient fields opened by wider teams | Confirm which playground views and API responses the masking covers in your version | Yes |
| Experiments and datasets instead of ad hoc runs | Changes that must be measured against a fixed test set before release | Slower to set up, but produces repeatable evidence for reviewers | No |
Setting up LLM connections on a self-hosted instance
The playground sends prompts to model providers, so a self-hosted Langfuse instance cannot run a playground session until an LLM connection exists for the provider and model you plan to test. Each connection holds the provider credentials the instance uses on your behalf, which means those keys are stored and used inside your infrastructure rather than in a vendor-hosted service. Before anyone opens the playground, decide who creates and rotates these connections, which project or organization scope they live in, and who can see the stored keys. Treat the key owner as a named role in your access design, not as whoever happened to set up the instance.
Start with an explicit list of approved providers and models, agreed with your security, legal and data protection teams. The playground will call whatever providers you connect, and every prompt a tester runs can contain production data, so an unapproved provider connection is a data flow you have created. Limit connections to the providers on that list, use separate keys per environment where your policy requires it, and confirm which playground roles can create or edit connections in your Langfuse version. Keep in mind that some access controls on self-hosted instances depend on an Enterprise license key, so check the Langfuse license key documentation before you design role-based restrictions around connections.
Before you write the runbook, confirm the current connection setup steps, the supported provider list and any environment variables that configure connections at deployment time in the Langfuse self-hosting documentation. Test one connection end to end in a non-production instance, including a run from the playground that appears as a trace, and check where the provider key is shown after saving. Record the rotation procedure, the outbound network path from the Langfuse Worker and Web containers to each provider endpoint, and who is notified if a key is revoked. Those checks decide whether playground testing can start safely.
How to set up the playground on a self-hosted Langfuse
This sequence takes a self-hosted Langfuse from a confirmed release to a working playground where prompt authors can create variants, run them against sample inputs and see those generations saved as traces. Each step ends with a check you can run before moving on.
Confirm the deployment and release version
The platform team confirms which Langfuse release the instance runs and compares it with the current release, v4.63.0, listed on the Langfuse releases page. Check the version in the web UI or the deployment configuration, and confirm that the Langfuse Web and Langfuse Worker containers both report the same release. If the instance is behind, plan the upgrade through the official upgrade guide before you add prompt authors, because a major version change alters the data model and infrastructure. Done when the running version is recorded in your change log and both containers match.
Configure access for prompt authors
An administrator creates the organization and project for the playground, then adds prompt authors as project members through the sign-in method your organization uses, such as SSO through an Auth.js provider. Decide who needs to edit prompts and who only needs to read them. Project-level RBAC roles are an Enterprise license feature, so confirm with your license holder what your instance can enforce before relying on it. Done when a test author account can sign in, opens the project and sees the prompts section without seeing other projects.
Add LLM connections with approved keys
In the project settings, an administrator adds one LLM connection per approved model provider or private model endpoint, using API keys issued under your key management policy. Confirm the endpoint, the model names the playground should offer and the key scope with the owner of each provider account. Keys are stored in Langfuse, so restrict who can open project settings and rotate keys on your normal schedule. Done when a short test prompt sent from the playground returns a response from each connection, and the key does not appear in any prompt or trace view.
Open a prompt in the playground
A prompt author opens an existing prompt, or creates a text or chat prompt, and launches it in the playground. Check that the model, parameters and any tool definitions or response schema load as stored in the prompt configuration. If the playground does not show the expected version, confirm which version and label the prompt currently has. Done when the playground displays the prompt content and configuration that match the stored version.
Create variants for side-by-side comparison
The author duplicates the prompt in the playground to create two or three variants, changing one thing at a time, such as an instruction, the temperature or the model. Keep each variant's changes small enough that a difference in output can be traced to a specific edit. Variants stay unsaved until the author decides to keep one as a new prompt version. Done when each variant is visible side by side with its own settings and the author can name the single change that separates them.
Run variants against sample inputs
The author enters the same set of sample inputs into each variant and runs them, including at least one input that represents an edge case from production. Where a prompt uses tool calls or structured outputs, check that the tool call or JSON output parses as expected in every variant. Use inputs that contain no customer personal data unless your data handling rules allow it. Done when every variant returns output for every sample input, and any failed run shows an error the author can act on.
Verify generations are saved to traces
The author opens the trace or observation view for the playground runs and confirms that each generation appears with its model, input, output, prompt link and token usage. Then the platform team checks that the playground traces appear in the project's tracing views, and that the Langfuse Worker is processing events without a backlog. If traces are missing, check worker health and the connection to ClickHouse before retrying. Done when a generation from each variant is visible in the trace view with its prompt linked, and the team has recorded the check in the change log.
How playground requests move from browser to model provider
The request starts in the author's browser, which sends the prompt to Langfuse Web. Web resolves the stored LLM connection, so the provider key stays on the server side and never reaches the browser. The call then goes to an external or private model provider, and the generation is written back as a trace that Langfuse Worker processes into PostgreSQL, ClickHouse and blob storage. Check which hops leave your network, and confirm where each provider key is stored.
Request path from the author's browser through Langfuse to the model provider and trace storage.
Security and data handling for playground traffic
The playground sends prompts, tool definitions and model outputs to providers using keys stored in your Langfuse instance. The cards below cover where those keys live, who can reach them, how personal data appears in saved sessions, and which controls need an Enterprise license key.
Provider key storage
Each LLM connection in the playground holds an API key for a model provider. Confirm with your Langfuse version how connection secrets are encrypted at rest and which environment variable holds the encryption key, and record where that key is stored and who can read it. Treat the encryption key as a secret in your own vault, not in the Compose file or a shared values file. Rotate provider keys on a schedule you set, and check that a rotated key takes effect without restarting every container.
Self-hosting docsWho can edit connections
Anyone who can edit a connection can point it at a different endpoint or read its masked key state. Review project-level roles before onboarding playground users, and decide whether prompt engineers need connection management or only the right to run prompts. Project-level RBAC roles are an Enterprise feature, so on the open source tier, confirm what separation of duties is possible within one project and plan a separate project for production-facing connections.
Personal data in prompts and outputs
Playground sessions are often built from real customer records, support tickets or case files pasted in to test behavior. Those inputs and the model's replies can be saved as traces or sessions, so they fall under your data protection duties. Agree a rule that test inputs use synthetic or redacted data, and check your retention settings before the first team session. Confirm with your privacy team whether the provider's own retention terms also apply to data sent through the playground.
Audit logging
Audit logs record administrative actions such as who changed a connection or a project setting, which supports investigations after a credential change. Audit logs are an Enterprise feature that requires a license key. If your review requires an audit trail for playground changes, ask whether the Enterprise tier is needed before building the process around it, and test that the log records the event types your process depends on.
License key docsServer-side data masking
Masking hides selected fields in stored traces so that sensitive values do not appear in the UI or exports. It is an Enterprise feature, so it does not apply on the open source tier. Where masking is not available, reduce exposure by limiting who can open traces that came from playground runs and by keeping customer data out of test inputs. Test masking rules against a sample of real generations before relying on them for compliance.
SSO and network egress
Sign-in through an identity provider such as Keycloak, Entra ID or Okta limits who reaches the playground, and you can disable password sign-in or enforce SSO for given email domains. Separately, the instance itself calls model providers over the network, so outbound rules from the Langfuse Worker and Web containers to each provider endpoint should be allowlisted and logged. Confirm which endpoints your chosen providers require and whether any traffic must route through a proxy.
SSO docsQuestions teams ask before testing prompts in self-hosted Langfuse
What does it cost to get the playground working on a self-hosted Langfuse?
The cost is driven by the work, not by a list price. DeployOpen does not publish prices; a quote follows from a written scope. The main cost components are the instance setup (the Web and Worker containers, PostgreSQL, ClickHouse, Redis or Valkey and S3-compatible blob storage), the connections to each model provider you want in the playground, and the access design for who can open and run prompts. Ongoing costs include your own cloud or data center resources, which Langfuse sizes at a minimum of 2 CPU and 4 GiB for web, worker and PostgreSQL and 2 CPU and 8 GiB for ClickHouse, according to the Langfuse scaling guide. Ask any provider for a quote that separates one-time setup from recurring support and infrastructure.
What drives the effort for a playground setup?
Three factors drive most of the effort: the readiness of your instance, the number of model providers, and the access design. An instance that already runs on Kubernetes or a cloud account with managed PostgreSQL, ClickHouse and object storage needs less work than a fresh single VM. Each provider connection adds credential handling, network routing and a test run, so a playground that must reach five providers takes more planning than one that reaches two. Access design covers who may open the playground, which projects they see and whether the team uses SSO, which is supported through Auth.js providers such as Okta, Entra ID and Keycloak according to the Langfuse authentication docs.
How long does playground setup take with existing infrastructure?
Duration depends on what already exists, and no fixed figure applies to every environment. If you already operate a Langfuse instance that meets the resource minimums and your providers are approved, the work is mainly provider connections, access roles and test runs with real sample inputs. If you need to build the instance first, the timeline includes deployment, storage sizing, backups and networking reviews before the playground is useful. Ask for a timeline in the written scope, with each milestone tied to the infrastructure you already have.
What must our team provide before the playground work starts?
Your team provides access and decisions, not the engineering. Expect to supply accounts or API keys for each model provider you want to test against, along with the approved list of providers and models. You will also need a decision on identity: which SSO provider signs users in, which email domains must use SSO, and whether password sign-in stays enabled. Finally, provide representative sample inputs, such as anonymized user messages, tool definitions and expected structured outputs, so the team can test prompt variants against realistic cases. Confirm with your security team how these keys and samples may be stored and shared before anything is sent.
Can our internal team set up the playground without an outside partner?
Yes, a capable platform team can set it up alone, and the Langfuse open source version includes the playground without license keys. The questions to answer honestly are capacity and skills: someone must own the Kubernetes or VM host, PostgreSQL, ClickHouse, Redis or Valkey and blob storage, plus the upgrade path. Langfuse's upgrade guides note that major versions change infrastructure and data models, and that the v3 to v4 guide requires ClickHouse 25.12 or later, PostgreSQL 15 or later and Redis 7.0 or later. If that ownership would sit with a team already stretched thin, a fixed-scope engagement can cover the build while your staff keep the knowledge.
Do we need an Enterprise license to use the playground?
No. According to Langfuse, all core features and APIs are available in the MIT-licensed open source version without limits, and the playground is part of that core set. Enterprise features are separate. They include project-level RBAC roles, protected prompt labels, audit logs and server-side data masking, and they require an Enterprise license key. Before you assume the playground works for every team member, check whether your access model depends on RBAC roles or protected labels, since those would need the Enterprise key. Confirm the current feature list on the Langfuse license key documentation.
What does a fixed-scope engagement cover for playground testing?
A fixed-scope engagement covers what is written into the agreed scope before work starts, including the instance setup you request, the provider connections, the access configuration, the SSO settings and the handover documentation. DeployOpen plans, implements, integrates, hardens, backs up and documents self-hosted platforms in your own infrastructure, so the deliverables stay in your environment. Ongoing support, upgrades and testing are available as retainers. Ask for the scope in writing, including which providers, which SSO provider, which sample inputs and which acceptance checks are included, and what is excluded.
How DeployOpen scopes and delivers playground setup
DeployOpen starts playground work with a written scope, agreed before any change is made to your Langfuse instance. For this topic that scope usually settles which LLM connections the playground will use, which projects and roles can open it, whether tool calls and structured outputs are in use, and how the team will check that playground runs produce real generations in traces. Most engagements are fixed-scope, so deliverables and timelines are set out in that document rather than discovered during the build. Ask for the scope to name each LLM provider connection, the model list, the test accounts used for verification, and the exact handover items, so the quote can be compared against your own estimate.
The deployment itself happens inside your infrastructure, in your cloud accounts, data centers or air-gapped network. DeployOpen configures the connections with keys stored in your secrets tooling, checks that the playground can call each model from the network segment your team actually uses, and confirms that generations opened from traces carry the expected metadata. Because self-hosted instances need the same network path for every provider, the setup is tested from the browser and from the API, and the results are documented as a runbook covering key rotation, adding a model, and what to do when a provider changes its API. Confirm with your security team whether any feature in this area needs an Enterprise license key before the build starts, since the Langfuse license key documentation lists the features that require one.
Documentation and testing are delivered together with the configuration, not after it. DeployOpen tests side-by-side variants, tool calls and structured outputs against the scope, records the outcomes, and retests after fixes. Ongoing upgrades, provider changes and new model onboarding are typically handled under a retainer, which DeployOpen offers for continuous support and upgrades. Ask for the retainer terms in writing, including which Langfuse upgrades are covered, how provider API changes are reported, and who your named contact is. DeployOpen does not publish a price list, and a quote follows from the written scope.

