Agent prompt versions

An agent's prompt history is the version timeline on its detail screen in Agent Prompts, newest first. Here you publish the next version, schedule it, re-weigh or hand-edit its token weights, and disable a version or bring it back.

Agent Prompts is a DataMind staff area: no company role can be granted it. The panel's other view, the request audit, is covered on Injection audit.

Open the version timeline

  1. Open Agent Prompts and select an agent from the list.
  2. The timeline header states the contract: "Version timeline - newest first. Versions are immutable; publishing appends."

Each card is one version, numbered from v1 (the oldest). A card carries its badges, the line Effective {date} · by {publisher}, the prompt text sections and the two weights:

BadgeWhat it marks
CurrentThe newest enabled version that is effective now: the version a deployment built today would receive.
ScheduledThe version takes effect at a future date; nobody receives it yet.
DisabledThe version does not serve; its era falls through to the next-older enabled version.
UnweighedThe stored weights are the assumed default rather than a measurement.

A card offers Re-weigh, Edit weights and Use as draft, and its Version enabled switch turns serving on or off. Until the first version is published, the list reads "No versions published yet - the proxy serves this agent's built-in fallback prompt until v1 is published.", with the button Publish first version.

Publish a new version

  1. Open the agent's timeline and click Publish new version.
  2. Fill in at least one prompt side. House prompt - kartlos-premium / kartlos-standard serves subscription and preset requests (placeholder: Prompt for subscription / preset requests…); PAYG prompt - pay-as-you-go models serves pay-as-you-go requests (placeholder: Prompt for pay-as-you-go requests…). "Leave one side empty to reuse the other for both buckets - at least one is required."
  3. Optionally schedule it. Takes effect reads Immediately (now).; switch Schedule on to set an instant in Effective from, and the line becomes At the chosen instant. The note below confirms: "Only client deployments built on or after this date receive this version - older deployments keep their era's prompt."
  4. Click Publish version. The toast reads Version published; a failure reads Publish failed.

The dialog states the rule: "Versions are immutable: this never edits existing versions, it appends a new one." The form opens pre-filled from the newest version, or from any version you opened with Use as draft.

Which version a deployment receives

The timeline states the rule: "Each client deployment receives the newest version dated on or before its build date - older deployments keep their era's prompt."

Publish from local files

Publish from local files compares every agent's bundled instruction.md file with its latest published version and appends a new version only where the file differs or has no version yet: it "appends a new one only where the file has no published version or differs from it." Opening the dialog runs a dry run first, so you see the whole plan before anything is written.

  1. Click Publish from local files on the Agent Prompts list. While it reads, the dialog shows "Reading the bundled prompt files…".
  2. Read the report. A summary counts the agents read and how many would get a new version, are already up to date, or were skipped; the table lists one row per agent:
ColumnWhat it shows
AgentThe agent's display name and key.
Local fileThe characters in the local instruction.md, or missing when it cannot be read.
Differs inWhich sides differ from the latest enabled version: House, PAYG or both.
OutcomeOne of the badges below.
BadgeWhat it means
PublishedThe apply pass wrote a new version for this agent.
Will publishThe dry run would publish this agent.
Up to dateThe latest enabled version already matches the file.
No agent rowThe prompt files carry this key, but no agent does; nothing is published for it.
ErrorThe file is missing or empty, or the write failed; the row carries the reason.
  1. Click Publish {n} version(s) to apply. The button reads Nothing to publish when no file differs, and becomes Close after a pass. A dry run changes nothing.

The bundled file fills both sides of the new version: House and PAYG. If the bundled prompt files are not found on the server, the dialog warns "The bundled prompt tree was not found on the server, so nothing could be read." and the apply button stays disabled.

Token weights and re-weigh

A version of the House prompt carries two stored weights, shown on its card:

WeightWhat it is
Premium weightDeducted from kartlos-premium requests.
Standard weightDeducted from kartlos-standard requests.

Both numbers measure the same prompt with a different tokenizer, so they often differ. The pay-as-you-go side carries no weight: pay-as-you-go requests deduct no prompt weight.

Weights are measured when you publish. If a measurement cannot run, the version stores the assumed default for both numbers, is marked Unweighed, and its card shows "Assumed default, not a measurement." with the tooltip "Neither number was measured: both are the assumed default. Re-weigh the version or enter the weights by hand."

Re-measuring or correcting weights never changes the prompt text; it corrects the stored counts and affects only future requests. A tokenizer change on Platform settings: integrations makes every stored weight stale without re-rating it: run Re-weigh all prompt versions there so published versions carry counts from the new basis.

Disable or re-enable a version

The Version enabled switch on a card turns one version's serving on or off. Disabling asks for confirmation first: "Disabling removes it from the proxy cache - the era it covers falls through to the next-older enabled version (or the built-in default prompt). It can be re-enabled anytime." Confirm with Disable. The version and its history are kept, the card dims, and it carries the Disabled badge. Toasts read Version disabled and Version enabled; a failed change reads Update failed.

Questions, answered

Can I edit a published version?

No. Versions are immutable: each publish appends a new version and never edits an existing one's text. To change the prompt, click Use as draft on any version, adjust the text and publish it as a new version. The stored weights are the one correction you can make in place: Edit weights updates the counts without touching the prompt text.

Which version does an older deployment receive?

The newest version dated on or before that deployment's build date: "Each client deployment receives the newest version dated on or before its build date - older deployments keep their era's prompt." A deployment that reports no build date receives the latest enabled version.

What happens if I leave one prompt side empty?

The empty side reuses the other side's text for both buckets; at least one side is required. With both sides empty the dialog refuses with Enter at least one of the House or PAYG prompt.

Can I schedule a version to take effect later?

Yes. Switch Schedule on in the publish dialog and pick the instant in Effective from; the line changes from Immediately (now). to At the chosen instant. Until then the version carries the Scheduled badge and nobody receives it. The dialog notes: "Only client deployments built on or after this date receive this version - older deployments keep their era's prompt." An invalid date is refused with Enter a valid effective date.

Does opening Publish from local files write anything?

No. Opening the dialog always runs a dry run and reports one row per agent; nothing is written until you click Publish {n} version(s). Dry-run rows read Will publish, applied rows Published, and the button reads Nothing to publish when no file differs.

What does "No agent row" mean in the publish report?

The bundled prompt files carry a key that no agent does, so nothing is published for that row. The key on the agent and the directory name in the prompt files must match before a file can be published.

Why is Re-weigh greyed out on a version?

The version has no House prompt, so there is nothing to measure. Its tooltip reads "This version has no House prompt, so there is nothing to measure - enter the weights by hand instead." Use Edit weights to enter the counts by hand instead.

What does Unweighed mean for billing?

The version carries the assumed default for both counts instead of a measurement. It still serves, and the stored weight is what future requests deduct, so replace the assumption when you can: Re-weigh re-measures, or Edit weights records real numbers by hand. Past requests are never re-rated; each one keeps the weight deducted at the time.

Why do the Premium and Standard weights differ?

Both numbers measure the same prompt text, but each bucket is weighed by its own tokenizer, so the two counts can differ. A re-weigh replaces both; an edit can correct either side alone.

Can I put an older version back in service?

Yes. Switch Version enabled back on; the version serves exactly its era again. Disabling a newer version lets the era it covered fall through to the next-older enabled one. To serve older text to new deployments, open that version with Use as draft and publish it as a new version.