Documentation Index
Fetch the complete documentation index at: https://langwatch.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Prompt Tags
Tags let you label specific prompt versions for different deployment stages. Instead of fetching by version number, you can fetch by tag — so your application always gets the right version for its environment.Built-in Tags
LangWatch provides three built-in tags:| Tag | Behavior |
|---|---|
latest | Automatically assigned to the newest version on every save. Cannot be removed. |
production | Assign this to the version you want your production application to use. |
staging | Assign this to the version you want your staging environment to use. |
Assigning Tags via the Deploy Dialog
In the Prompt Playground, click the Deploy button to open the Deploy dialog. From there you can:- Select a version from the version history
- Assign it to
production,staging, or any custom tag - See which versions currently have each tag assigned
Fetching by Tag in Your Application
TypeScript SDK
Python SDK
REST API
MCP Tools
Useplatform_get_prompt with the tag parameter to fetch a specific tagged version:
Shorthand Syntax
LangWatch supports a shorthand syntax for specifying tags in prompt identifiers:pizza-prompt:production→ version pointed to by theproductiontagpizza-prompt:staging→ version pointed to by thestagingtagpizza-prompt:2→ version 2 (numeric values are treated as version numbers)pizza-prompt:latest→ equivalent to the bare slugpizza-prompt
Custom Tags
Beyond the built-in tags, you can create custom tags for your own deployment workflows:Creating Custom Tags
Via the API:platform_create_prompt_tag to create a custom tag, then platform_assign_prompt_tag to assign it to a version.
Managing Custom Tags
| Operation | API Endpoint | MCP Tool |
|---|---|---|
| List all tags | GET /api/prompts/tags | platform_list_prompt_tags |
| Create tag | POST /api/prompts/tags | platform_create_prompt_tag |
| Rename tag | PUT /api/prompts/tags/{tag} | platform_rename_prompt_tag |
| Delete tag | DELETE /api/prompts/tags/{tag} | platform_delete_prompt_tag |
| Assign tag to version | PUT /api/prompts/{id}/tags/{tag} | platform_assign_prompt_tag |
Custom tag names must not be purely numeric and cannot be “latest”. The
latest tag is protected and cannot be renamed or deleted. production and staging are default seeded tags that can be renamed or deleted like any custom tag.Tag Management via SDKs
Both SDKs provide a.tags namespace for managing tags programmatically.
TypeScript SDK
Python SDK
Assigning Tags at Create and Update Time
You can assign tags when creating or updating prompts, so the version is tagged in a single operation.TypeScript SDK
Python SDK
MCP Tools
Tags can also be assigned during prompt creation and updates via MCP:REST API Tag Endpoints
Tag CRUD endpoints are organization-scoped (use an org-level API key). The assign endpoint is project-scoped.| Method | Endpoint | Description |
|---|---|---|
GET | /api/prompts/tags | List all tags for the organization |
POST | /api/prompts/tags | Create a new tag ({ "name": "canary" }) |
PUT | /api/prompts/tags/:tag | Rename a tag ({ "name": "new-name" }) |
DELETE | /api/prompts/tags/:tag | Delete a tag (cascades removal from all versions) |
PUT | /api/prompts/:id/tags/:tag | Assign a tag to a version ({ "versionId": "..." }) |
CLI
CLI tag management is planned — see issue #3090. Once available, you will be able to list, create, rename, delete, and assign tags from the command line.Common Workflows
Blue-Green Deployment
- Create two custom tags:
blueandgreen - Point your application at one tag (e.g.,
blue) - Update the other tag (
green) with the new version - Switch your application to read from
green - If issues arise, switch back to
blue
Canary Releases
- Create a
canarytag - Assign the new version to
canary - Route a small percentage of traffic to the
canaryversion - Monitor performance via LangWatch analytics
- Promote to
productionwhen satisfied