GuidesPrompt management

Prompt management

Prompt management gives your prompts the same first-class lifecycle your code already has: a named entry in a registry, an immutable version history, and movable deploy tags (like production and staging) that point at a specific version. A built-in playground runs any version against your agent’s own LLM connection so you can iterate before you deploy — and a prompt-change remediation can be turned into a new version with one click.

The Prompts page also carries an Optimizer tab, where Neens searches for a better system prompt for a confirmed failure mode instead of you writing one by hand — see Prompt optimization.

Concepts

  • Prompt — a named, agent-scoped entry. Two types: chat (a list of system / user / assistant messages) or text (a single template string).
  • Version — an immutable snapshot of a prompt’s content + model config, numbered from 1. Editing never overwrites: saving creates the next version, so history is a complete audit trail.
  • Variable — a {{name}} placeholder inside message content. Neens auto-detects the variables in each version so the playground can prompt you to fill them in.
  • Deploy tag (label) — a movable pointer like production or staging that names a version. Your agent or an SDK asks for “the production prompt” and gets whatever version the tag points at today — move the tag to roll forward or back without a code change. latest is implicit (it always resolves to the newest version), so it is a reserved name you can’t assign by hand.

Create and version a prompt

Create a prompt

On the Prompts page, click New prompt. Give it a name, pick chat or text, write the message(s), and set the model + temperature. Any {{variable}} you reference is detected automatically. Saving creates version 1.

Add a version

Open a prompt and edit its content, then Save as new version. This appends the next version (v2, v3, …) with an optional commit message — the previous version is untouched and stays in the history, exactly like a judge’s versioned definition.

Deploy a tag

Point a deploy tag at the version you trust. Set production → v2 to promote it; move the tag back to v1 to instantly roll back. Deploying a prompt is also recorded as a what-changed event, so a later regression can be correlated to the rollout.

Playground

The playground runs a prompt against your agent’s default LLM connection (or a connection you pick as an override). Fill in the {{variables}}, choose the model and sampling parameters, and Run — Neens makes a single live model call and shows the output, token counts, and latency. Nothing is persisted: the playground is for iteration, not scoring.

⚠️

The playground makes a real, billable model call, so it is rate-limited per user and the output is token-capped (2048 tokens by default). If your agent has no LLM connection yet, the run returns a clear prompt to configure one under Settings → Connections.

Resolve a prompt by name

The registry is the source of truth an agent or harness can read at runtime. Resolve a prompt by its name and (optionally) a deploy tag or explicit version — with neither, you get the newest version:

GET /prompts/by-name/{name}                 # newest version
GET /prompts/by-name/{name}?label=production # whatever `production` points at
GET /prompts/by-name/{name}?version=2        # a specific version

The response carries the resolved version’s content, its detected variables, and the prompt’s current tags — so your agent can pull “the production system prompt” without hard-coding it.

From a remediation to a new version

When Neens proposes a prompt-change remediation — a corrected system prompt grounded in real failing traces — you don’t have to copy-paste the fix back into your agent. Save it to the prompt registry and Neens lifts the remediation’s corrected prompt into a new version of the target prompt (or a brand-new prompt). This is the “one-click apply” that closes the loop from a diagnosed failure to a shippable, versioned, deploy-tagged fix.

  • Judges — scorers whose prompts follow the same versioned lifecycle.
  • Prompt optimization — the Optimizer tab on this page.
  • Remediations — where prompt-change fixes are generated from failures.
  • What changed — a prompt deploy is recorded here for regression correlation.