Prompts

Concepts & versions

Names, immutable versions, movable labels, the editor and its menu, saving with a diff, history and compare, shipping and rolling back, who can edit, and each version's usage.

A prompt is a name with a history. Every save adds an immutable version; a label such as production points at the one your app runs. This page covers those pieces and the editor you manage them in.

Name, versions, labels, tags

NameThe key your code fetches by, unique in the team. Letters, numbers, ., _ and -: a space becomes a dash and anything else is dropped, so a / does not make a folder. It is fixed once saved. The description can change at any time in ⋯ → Settings.
VersionA snapshot of the messages, variables, model config, tools and output format. It never changes. The app names it by its hash, shortened like f25a4d...0b437c; traces show its number, like v3. The SDK accepts either.
LabelA pointer to exactly one version of a prompt. production and staging exist in every team, and you can add your own (canary). Putting a label on a version takes it off the version that had it.
TagA word for grouping prompts, such as support. The app doesn't show tags; set them through MCP and filter with trodo prompts list --tag support. They don't affect which version runs.

With no label or version asked for, the SDK returns the version labelled production, or the newest version if no version has that label yet. See Fetch in production.

The editor

Open a prompt from Develop → Prompts. The editor shows the messages, and under them the buttons that open each part of the version: Add message, Model config, Variables, Tools and Output format.

The editor for deep/plan: Playground and ⋯ in the header, the system message, and the Add message, Model config, Variables, Tools and Output format buttons.

In the header:

PlaygroundOpens the prompt in a new playground, to run it against models side by side.
SaveAppears when the editor holds unsaved changes, with a dot. A new prompt shows Create prompt instead.
⋯Everything about the prompt itself.
The ⋯ menu open: Use in code, Editors, Usage, History, Settings.
⋯What it does
Use in codeThe code to fetch and compile this prompt in Node or Python, with its own variables. Copy as prompt copies it as instructions for a coding agent.
EditorsWho can change the prompt. See Who can edit.
UsageThe traffic of the version you have open. See Usage.
HistoryEvery version, to view, compare and label.
SettingsThe name (copyable) and the description.

Save a version

Click Save. The dialog shows a line diff of your changes since the version you loaded (Changes since its hash), asks What changed, and offers a Label: none, an existing one, or New label….

The Save new version dialog: the diff since f25a4d…0b437c with one added line, What changed filled in, Label, and Save new version.
  • Save new version saves it with no label: your app keeps running the version production points at.
  • With a label chosen, the button reads Save and push to production. If that label is on another version, the dialog says it Moves production off that version and asks you to Confirm and push to production.
  • Saving content identical to the newest version makes no new version, and the editor says No changes. Saving an older version's content again does make one: see Load in editor below.

A version saved by the CLI, MCP or Lucid shows up here the same way.

History and compare

⋯ → History lists every version, newest first, with who saved it, when, and what changed. In production marks the live one.

The History dialog: three versions of deep/plan by hash, the newest marked In production, each with its author, note and age.

Click a version to open it. You see its note, its labels and its full contents, and you can:

  • Compare it with any other version: pick one and see the line diff, older to newer. Identical means the two hold the same content.
  • Load in editor: make it the draft. Saving it then makes a new version with a new hash; the old one stays.
  • Add or remove a label (below).
One version open in Compare mode: compared with an older version, the diff shows five added lines and one changed line.

Ship and roll back

To ship a version, put production on it. Either save with the label, or open the version from History, choose it under Add label, and confirm: Move production from the old version to this version? → Move.

Rolling back is the same move, onto the older version. Nothing is rebuilt: the old version is still there, and running apps pick up the change within their cache window (60 seconds by default). From a terminal: trodo prompts label refund-agent 5 production (see CLI → Prompts).

Any label works the same way, so prod-a and prod-b on two versions let your code split traffic between them. See Fetch in production.

Who can edit

Everyone on the team can open a prompt, read every version and compare them, and your app can always fetch it. Changing it is limited:

Can
Owner (who created it)Everything an editor can, plus invite and remove editors, and delete the prompt.
EditorSave versions, move and remove labels, edit the description.
Everyone else on the teamView. The editor says View-only. The owner and invited editors can save.

The owner manages this in ⋯ → Editors (Who can edit): pick a teammate under Invite, or remove one with the ✕ beside their name. The same rules hold for the CLI and MCP, which act as the person whose key they use.

To delete prompts, tick them in the list and click Delete. Only the owner can.

Usage

⋯ → Usage shows what the version you have open did, from the spans that recorded it: how many model calls ran it (Instances), tokens, cost, average, p50 and p95 latency, error rate, charts over time, and the eval scores on those spans. It covers the last 30 days by default. To compare two versions, open each in turn. How spans record their version is in Traceability.

On this page