What they are
Every prompt version can carry aparameters object: arbitrary JSON that is versioned, tagged, and fetched together with the prompt itself. Use it for application settings that should change in lockstep with the prompt: search iteration limits, confidence thresholds, structured output schemas, metadata field lists, feature switches.
Changing
parameters creates a new prompt version, just like changing the prompt text.Why
The code around a prompt has knobs: how many retrieval rounds to run, what score counts as confident, which fields to extract. When those knobs are hardcoded, a prompt rollback doesn’t roll them back. Storing them inparameters means one versioned unit: deploy, tag, and revert prompt + settings together.
Shape
parameters is an object with arbitrary JSON values (nested objects and arrays included). It defaults to {}. LangWatch does not interpret its contents. Your application owns the schema.
Reading parameters
Python SDK
TypeScript SDK
REST API
Writing parameters
Python SDK
TypeScript SDK
REST API
Versioning behavior
- Updating
parameters(even with no other change) creates a new prompt version with its ownversionId. - Restoring an older version restores that version’s
parameterstoo. - Tags (
production,staging, custom) resolve to a version, so fetching by tag always returns the matchingparameters. - Explicit updates (
PUT, SDKupdate) always create a new version, even if the content is unchanged. - The sync endpoint (
POST /api/prompts/{id}/sync, used by the CLI) compares content key-order independently: re-syncing the same parameters with keys in a different order reportsup_to_dateand does not create a new version.