Running Langfuse prompt versioning and labels like code releases
Prompts often change outside the code review and release path. An editor tweaks wording in a shared document or a console, the change reaches production within minutes, and nobody can later say which wording a customer saw on a given day. Langfuse closes that gap by treating each saved prompt as a versioned object: every save creates a new version with its own ID, and the application fetches a prompt through a label such as production or staging rather than a hard-coded text. Rolling back is then a label move to the previous version, not a code deployment. Labels are included in the MIT-licensed open source version, so a team can run this model on its own infrastructure without an Enterprise license key.
This matters most when several environments run the same application, when more than one person edits prompts, or when prompt text reaches customers, regulators or internal approvers who expect a record of what changed. Before relying on the pattern, decide who may move the production label, how a staging version is promoted, and how the application behaves if a label cannot be resolved. Label naming is your convention, so agree it across teams. Protected labels, which restrict who can move a label such as production, need an Enterprise license key on self-hosted instances, so confirm with Langfuse whether that control is part of your plan before you design the approval flow around it. The Langfuse self-hosting documentation lists the features that depend on a license key.
Treat the label as the release control and the version ID as the audit record. Write down, for each prompt, which label the application requests in each environment, who may assign it, and where the change was reviewed. Test the rollback path in a non-production project before you need it: move the label back, confirm the application picks up the earlier version, and record how long the change took to reach running services. Those three checks show whether your prompt releases behave like your code releases, and they give your security and compliance reviewers something concrete to inspect.
How prompt versions, labels and rollback fit together
This sequence turns a prompt edit into a controlled release: each change becomes a version, a label decides which version the application serves, and moving that label is both the promotion and the rollback.
Create or edit the prompt
A prompt author creates the prompt in Langfuse or edits an existing one, either in the UI or through the API or SDK. Each saved change is stored as a new version rather than overwriting the previous text. Confirm on your instance that the prior text is still retrievable before you rely on it for rollback, and check how your version identifiers appear in the UI and API.
Confirm the new version was created
Open the prompt's version history and check that the new version exists, carries the expected content and model configuration, and is distinct from the version it replaced. The reviewer should also confirm that the saved change matches the pull request or change ticket that justifies it, so the prompt history and your release records point to the same change.
Assign a staging label
The author or release owner attaches a non-production label, such as staging, to the new version. Only that version carries the label, so the staging environment can fetch it without touching production. Verify in the prompt view that the label now points to the new version and that the production label still points to the version users see.
Test the labeled version
Run the staging application, or an evaluation or experiment, against the staging label and review the traces it produces. The check is that the application fetches the prompt by label and not by a pinned version number, since a pinned reference would bypass the release. Record the test result next to the change so the promotion decision has evidence behind it.
Promote by moving the production label
After approval, the release owner moves the production label to the tested version. Nothing is redeployed: the application picks up the new version on its next fetch, subject to any client-side caching you have configured. Confirm the move in the prompt history, then check that new generations in production reference the expected version.
Record who moved the label
Confirm that the label change is attributed to a named user or service account in the audit trail or prompt activity, and that the approval exists outside Langfuse. Ask your administrators which of these records are available on your edition and deployment, since audit logs are an Enterprise license feature in self-hosted Langfuse. Store the change reference with the label move so the chain from request to production is traceable.
Roll back by moving the label
If the new version misbehaves, move the production label back to the last known good version. This is the same operation as a promotion, so it needs no rebuild and no code change. Check that new production generations reference the earlier version, and that the failed version remains in history so the regression can be analyzed.
Verify the application fetches by label
Finally, confirm in code review and in a live trace that the application requests the prompt by its production label and not by a hard-coded version. Pinned references stop rollbacks from taking effect, so this check should be repeated after any change to the fetch logic. Ask your engineers to document which label each environment uses.
Which label strategy fits which team
This table compares five ways to point applications at Langfuse prompts: production labels, version pinning, separate staging and production labels, per-tenant labels, and one shared prompt with a tenant variable. Read each row for the team it suits, the operational cost it adds, and what to confirm in the Langfuse docs before committing. The main takeaway is that every label you add is one more thing to move, review and keep in sync.
| Strategy | When it fits | Operational cost | Confirm before choosing |
|---|---|---|---|
| Fetch by production label | Small teams shipping one prompt per feature who want prompt edits without redeploying code | One label to move and review; rollback means moving the label back to the prior version | How SDK caching behaves when a label moves and how quickly clients pick up the change |
| Pin to a specific version | Regulated or high-stakes flows where every change must pass a code review and deploy with the application | Prompt changes need a code release; more deployments to coordinate with prompt updates | Whether your SDK version can fetch an exact version ID and how version IDs are assigned |
| Separate staging and production labels | Teams that test prompt changes in a staging app before customers see them | Two labels per prompt; risk that staging and production drift if promotion is manual | Whether staging and production apps use the same Langfuse project or separate instances |
| Per-tenant labels for customer-specific prompts | Vendors whose customers need tailored instructions and separate approval of their version | Labels multiply with tenant count; each tenant needs its own review and rollback history | Whether label names can be generated automatically and how many labels your self-hosted instance handles comfortably |
| Single shared prompt with a tenant variable | Products where tenants differ only in data or a few settings, not in the instructions | Lowest label count, but any change affects every tenant; tenant logic moves into application code | How variables are compiled at fetch time and where tenant configuration is stored |
Who should be allowed to change production prompts
Moving a production prompt label changes what customers see, so it needs the same separation of duties you would apply to a code release. The cards below cover the decisions that set that separation, and which of them rely on Enterprise features versus process controls you run yourself.
Separate authors from promoters
Decide who may create prompt versions and who may move the production label. Authors can iterate freely on versions that carry no label, while promoters decide what customers receive. Keep the two lists short and named, and write them down, because on an open source deployment this split is enforced by your process unless you add the Enterprise controls below. Check that engineers who can deploy the application are not silently the same people who can promote prompts without review.
Project-level RBAC
Project roles in self-hosted Langfuse restrict what each member can do inside a project, which is how you keep staging authors out of production-facing projects. This feature needs an Enterprise license key. Without it, plan to separate environments by project or instance and confirm with the vendor which role actions your version exposes before you rely on them.
License key docsProtected prompt labels
A protected label limits who can assign it, so only designated promoters can move the production label to a new version. This is the most direct technical guard against an accidental or unreviewed prompt change reaching customers. It is an Enterprise feature, so open source teams should document the same rule as a process and check it in release reviews.
Review before promotion
Require a second person to review a new version, its evaluation results and its config before the production label moves. Keep the reviewer independent of the author. Record the review outcome in your change ticket, since Langfuse does not replace your approval workflow. Ask whether a staging label must carry a passing evaluation or experiment result before promotion is allowed.
Audit trails of label moves
Every production label move should be traceable to a person, a time and a version. Audit logs in self-hosted Langfuse need an Enterprise license key. Without them, export the label history you have, keep your change tickets linked to version IDs, and confirm that your application logs record which prompt version served each request.
Emergency rollback ownership
Name who may roll back production in an incident, and who is informed afterward. Rollback means moving the production label back to a known good version, which is fast only if the on-call engineer is allowed to do it without waiting for a full review. Write that exception into your runbook, limit it to rollback, and require a retrospective review of the change that caused it.
How a prompt moves from edit to production label
The path starts with an author editing a prompt in Langfuse, which creates a new immutable version. The version is labeled staging, passes a test or evaluation gate, and then an approved role moves the production label to it. Applications fetch whichever version the production label points to, so rollback means moving that label back to an earlier version. Protected production labels, which need an Enterprise license key, are the control that restricts who can make that final move.
Prompt release flow from edit to production label, with the approval gate and rollback path.
Questions teams ask before adopting prompt labels
Do open source Langfuse labels cover production and staging, or do I need Enterprise?
Basic labels are part of the MIT-licensed open source version, so you can create labels such as production and staging, move them between prompt versions and fetch prompts by label. The Enterprise license key adds protected prompt labels, which restrict who can move a label, along with project-level RBAC roles and audit logs. Langfuse states that all core features and APIs are available without limits in the open source version, while the ee/ directories fall under a separate enterprise license. Confirm the exact edition your team needs against the Langfuse license key documentation before you design approvals around it.
What does setting up prompt labels actually take, and what must my team provide?
The technical setup is small: a working self-hosted instance, an API key per environment and a few prompts. Most of the effort is organizational. Your team must name owners for each prompt, map Langfuse labels to your real environments (for example, which label your staging application reads and which one production reads), and define a test gate that a prompt version must pass before the production label moves. Effort rises with the number of prompts, the number of applications that fetch them and how many teams edit them. A quote should list who writes the test cases, who approves label moves and which environments are in scope.
How do per-tenant labels scale, and what makes them expensive to maintain?
Per-tenant labels let one prompt carry a separate pointer for each customer or tenant, which is useful when a customer needs a tailored instruction set. Maintenance cost grows with the number of tenants multiplied by the number of prompts, because every new prompt version may need a decision for each tenant label. Ask whether tenant differences can be expressed as variables instead of separate versions, and who signs off on a tenant label change. Illustrative example: a team with a few tenants and one shared prompt has very little to review, while a team with hundreds of tenant-specific variants needs a documented owner and automated checks for each.
Does rolling back a prompt require a new application deployment?
No, if your application fetches the prompt by label, a rollback is a label move: point the production label back at the previous version and the next fetch returns it. No code change or container restart is required, although cached copies in running services can keep the old text until their cache refreshes. The rollback procedure should be written down, tested in staging and linked to the same owners who approve forward moves. Keep in mind that a rollback restores the prompt text only. Model parameters, tool definitions or other code that depends on a changed output format still need their own check.
How do label moves interact with SDK caching?
A label move changes what the Langfuse server returns, but applications that cache prompts may keep serving the previous version until the cache expires or revalidates. Check the cache duration in each SDK your services use, decide how long a stale prompt is acceptable, and test the timing during a rollback drill. Teams that need strict consistency should plan revalidation and a fallback prompt rather than assume the label move takes effect everywhere at once. Confirm SDK behavior against the version you run, since cache settings are part of the client configuration.
Can DeployOpen run the prompt release process for us?
Yes, DeployOpen can plan and implement the label model, environment mapping, test gate and rollback runbook as part of a fixed-scope engagement, with scope, deliverables and timelines agreed in writing before work starts. DeployOpen also offers retainers for ongoing support and upgrades. Ownership of the prompt content, approvals and business sign-off usually stays with your team, so the quote should separate what DeployOpen configures and documents from what your staff must review and approve each release.
Security and operational risks of label-based releases
Moving a production label is the fastest way to change what every application serves, so it carries the most risk in a label-based release. The cards below pair each risk with a control, covering who can move labels, how applications authenticate, what the audit trail shows and how the platform stays available.
Unreviewed production label moves
A single user who can move the production label can change the prompt that customers see within seconds. Without a review step, a typo, a removed guardrail or an untested model parameter reaches production with no second pair of eyes. Control: limit production label moves to a named group, require a change record or review before the move, and keep staging as the only label that most editors can set. On Enterprise instances, protected prompt labels can enforce this in the platform itself, so confirm that the feature and your role design match your process.
License key docsOver-permissioned API keys
Applications fetch prompts with Langfuse API keys, and a key that can write prompts or move labels turns a compromised service into a release channel. Keys shared across services make it impossible to tell which workload made a change. Control: issue one key per application and environment, give each key read access to prompts where possible, keep write keys out of runtime configuration, and rotate keys through your secrets store. Confirm which project roles and key scopes your version of Langfuse provides before you design around them.
Audit trail gaps
Without the Enterprise audit logs feature, a self-hosted instance may not record who moved a production label, when, and from which version. Investigators then have to rebuild the timeline from prompt version history and application logs, which may not agree. Control: decide before launch which record is authoritative, export or forward the events you need, and test a rollback drill to confirm the trail answers the question "who changed production and why". Ask your Langfuse contact to confirm exactly what the open source edition records about label changes.
Label drift between environments
Staging and production can point at different versions for the same prompt name, and nobody notices until behavior differs between environments. Drift also appears when a team copies a prompt by hand instead of promoting the same version. Control: promote the same version ID from staging to production, run a scheduled check that compares the labels each environment resolves, and record the version ID alongside each deployment so a mismatch is visible in release notes.
Availability of Langfuse Web and API
Applications that fetch prompts at request time depend on the Langfuse Web and API containers and their data stores. An outage, failed upgrade or overloaded web tier can stop prompt fetches and degrade production traffic. Control: run production on a highly available topology rather than a single VM, size the web tier for fetch load, keep client-side caching and fallback prompts in the application, and test a rollback before every major upgrade. Langfuse documents Docker Compose on a single VM for testing only, so confirm the production layout with your platform team.
- Minimum web resources
- 2 CPU, 4 GiB
Setting up labels and promotion steps on your instance
This sequence takes a self-hosted Langfuse instance from an empty prompt library to a working release path, where production and staging labels point at known versions and every promotion or rollback is tested before it matters. The output is a documented runbook that your team and the application both follow.
Map environments and tenants to labels
Start by listing every environment and customer-facing context that will run prompts, such as development, staging, production and any per-tenant variants. Agree on a label name for each one, and decide which labels are shared and which belong to a single tenant. Write the mapping down in your runbook, since the application code and the review process will both depend on it. The step is done when a teammate can read the mapping and state which label an application in each environment should fetch.
Assign prompt owners and approvers
Name who may create prompt versions, who must approve a move of the production label, and who can perform a rollback. Keep the list short and tie each role to a named team, such as the application owner for product prompts and a security or compliance reviewer for prompts that handle personal data. Confirm which of these controls your plan supports, because role-based access and protected labels are Enterprise license features on self-hosted instances. The step is done when the approver list is written, signed off and linked from the runbook.
Create the first prompt and confirm version IDs
In a non-production project, create one prompt with a representative template and save it. Langfuse assigns a version number automatically with each save, so make two or three edits and note what each version number refers to. Check that the version history in the UI matches your edits and that the same version can be retrieved by its number through the API. The step is done when you can point to each version and say what changed in it.
Set staging and production labels
Assign the staging label to the version you want to test, then assign the production label to the version that is currently approved for customers. Keep the production label on the last version your approvers signed off, and do not leave it on an untested draft. Record the version number behind each label in the runbook so that the label state can be audited later. The step is done when the UI shows each label on the intended version and the recorded numbers match.
Wire the application to fetch by label
Change the application so it requests the prompt by the label for its environment, not by a hard-coded version number, and keep the environment setting in configuration rather than in code. Run the application against your staging instance and log the prompt version it receives on each request. Check the log against the staging label in the UI. The step is done when the fetched version matches the label in every environment you tested.
Test a promotion in staging
Create a new version with a small, visible change, move the staging label to it, and confirm the application picks it up. Then move the label forward through your approval step and check that the change appears in the application's logs and in the traces it produces. Use an illustrative change, such as a changed instruction sentence, so the result is easy to recognize. The step is done when the promoted version appears in fetched prompts and in traces without a redeploy of the application.
Test a rollback by moving the label
Move the staging label back to the previous version and confirm that the application fetches the earlier text within the cache window your SDK configuration allows. Note how long the old version stays in use after the move, since client-side caching can delay the change. Confirm the rollback is recorded in the version history and that the approver list covers who can perform it. The step is done when the rollback is visible in logs and traces and you have measured how quickly it takes effect in your setup.
Document the runbook and review access
Write the runbook with the label map, owner and approver list, the steps for promotion and rollback, and the check that closes each one. Include the Langfuse version you are running and review it again when you upgrade, because label behavior and access controls can change between releases. Confirm with your Langfuse vendor or documentation which access and protection features your license covers. The step is done when the runbook has been walked through by someone who did not write it and their questions are answered.
Official Langfuse sources for labels and self-hosting
Where is the official Langfuse self-hosting documentation?
The official self-hosting documentation is published by Langfuse at its self-hosting section, and it covers the components of a deployment, the supported platforms and the configuration you need before going live. Start there before you commit to an architecture. A self-hosted Langfuse deployment runs Langfuse Web and Langfuse Worker, plus PostgreSQL, ClickHouse, Redis or Valkey and S3-compatible blob storage. Confirm each component version against the current documentation at the time you plan, because the requirements change between releases.
Which Langfuse features need an Enterprise license key?
Prompt labels that are marked as protected need an Enterprise license key, as do project-level RBAC roles, data retention policies, audit logs, server-side data masking and the SCIM-based org management API. The license key documentation lists the full set, so check it before you design who can move production labels. Features that are not on that list are part of the MIT-licensed open source version. Confirm the current list with Langfuse, since it can change between releases.
Where do I find the Langfuse license key documentation?
The license key documentation explains how to obtain and apply an Enterprise license key to a self-hosted instance and which features it unlocks. Read it before you plan role design or protected labels, because those controls depend on the key being active. The key is a configuration value on your deployment, so plan who in your organization holds it and how it is rotated. Ask Langfuse to confirm the commercial terms, since the key is tied to the Self-Hosted Enterprise plan.
Where are the Langfuse upgrade guides for major versions?
Langfuse publishes a general upgrade guide and dedicated migration guides for each major version jump. Updates within a major version are non-disruptive and apply database migrations at startup, while major upgrades change infrastructure and data models. The v3 to v4 guide, for example, lists ClickHouse, PostgreSQL and Redis minimum versions and warns about ClickHouse disk headroom when backfilling data. Read the guide for your current version before any change that affects prompt history or labels.
Which Langfuse upgrade guide applies if I run the Helm chart with bundled data stores?
Helm users with bundled data stores must upgrade the Helm chart from v1 to v2 before upgrading Langfuse to v4, according to the Langfuse v3 to v4 guide. Skipping that step can leave the deployment in a state that is hard to recover. Check your chart version and your bundled database setup before scheduling the upgrade. Also confirm the Python SDK and JS/TS SDK versions your teams use, since the guide notes that newer SDK majors need Langfuse v4.59.0 or later.
Where can I check the Langfuse release history before upgrading?
The Langfuse GitHub releases page lists each published version with its release notes, so use it to confirm which version you are running and what changed since. Pair the release notes with the upgrade guide for your path. Pin the version you deploy in your configuration rather than tracking the latest tag, so that prompt labels and SDK behavior do not change without a planned review. Record the version in your change log for each environment.
Which Langfuse source covers authentication, SSO and enforced sign-in?
The authentication and SSO page in the self-hosting documentation lists the supported Auth.js providers, including Okta, Entra ID, Keycloak and generic OIDC, and explains how to disable password sign-in or enforce SSO for given email domains. Use it to decide who can reach the prompt editor and the production label controls. Confirm whether your chosen provider needs any extra configuration in your environment before you rely on it for access decisions.
Where is the Langfuse license file, and what does it cover?
The license file is in the Langfuse repository on GitHub. Most of the repository is under the MIT Expat license, while content in the ee/, web/src/ee/ and worker/src/ee/ directories falls under a separate enterprise license. Read the file yourself before you copy code, redistribute a build or use enterprise directories in your own tooling, and involve your legal team for that decision. This page does not offer legal advice on license terms.
How DeployOpen scopes and delivers prompt release controls
DeployOpen treats prompt versioning and deployment labels as part of the release process for self-hosted Langfuse, not as a separate content task. We agree the label model, the promotion path and the people allowed to move production labels in writing before the build starts, then deliver it inside your infrastructure with documentation your engineers can run.
How we scope
- Map which prompts reach customers, internal users or test traffic, and which labels each group needs
- Agree the label set, such as production, staging and per-tenant labels, in a written scope
- Confirm which roles may move production labels, and whether Enterprise protected labels are needed
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts
How we build
- Configure the self-hosted Langfuse projects, roles and label conventions that match the agreed model
- Wire application fetches to labels so promotion and rollback happen by moving a label, not redeploying code
- Test rollback to a previous version and confirm the application picks up the moved label
- Document naming rules for labels and version commit notes so reviewers can trace each change
How we hand over
- Deliver a runbook covering promotion, rollback, label ownership and the approval path for production changes
- Walk through the label model with engineers, prompt authors and the people approving changes
- Record access settings and role assignments so compliance and security teams can review them
- Agree what remains with your team and what needs a DeployOpen engagement for future changes
How we support
- Ongoing support, upgrades and continuous testing are available as retainers
- Retainers can cover label model changes as new prompt teams or tenants are added to Langfuse
- Review label and role settings again when Langfuse upgrades change the self-hosted deployment
- Ask any provider to confirm which label features your Langfuse license tier includes before you commit

