Your team’s prompts deserve their own database, not a code repo.
Versioned templates with Jinja2 variables, A/B testing, AI recommendations, and per-key selection. Ship prompt changes without redeploying — and roll back in one click when they regress.
Active templates
- Versioning
- Every save
- Per-key selection
- extra_body
- A/B variants
- Deterministic
- Prompt logs
- Opt-in
Snapshot + diff + author + timestamp
nrouter_prompt_template_id on any request
Sticky by virtual key
Honors org-level data policy
support-agent.jinja2 — every version, one pointer, zero redeploys.
The active-version pointer moves; your code never changes. Roll back from the dashboard in one click when a change regresses.
Initial draft
Authored in the dashboard. Never committed to a repo.
Token-reduction pass
-15% input tokens. Diff reviewed, one-click activated.
Clarity rewrite
activeActive now. Serving every request that references the template.
Draft — A/B candidate
A/B runningRunning 60/40 against v3. Promote or discard from the dashboard.
Test prompts the way you test features
Don’t guess which version is better. Measure it. Split buffered traffic deterministically, capture provider-completed cost, latency, and token outcomes per branch, and promote the winner without a code change.
A/B testing
Deterministic splits, statistical confidence
Create two or more variants with a configurable traffic split. Assignment is hash-deterministic per authenticated virtual key, so retries stay on the same branch. Provider-completed buffered metrics roll up in the analytics dashboard.
- Lifecycle: draft → running → paused → completed
- Per-variant cost, latency, token, and success metrics
- Promote the winner from the dashboard without code change
- Stop the test instantly if a variant regresses
Variant performance (last 24h)
Full prompt reference: Jinja2, recommendations, audit, storage
- Jinja2 templates
- Strict double-brace scalar variables injected per request via nrouter_prompt_variables. Missing variables fail closed; authenticated system variables are applied last.
- Version history + rollback
- Every save creates a snapshot with author, timestamp, and diff. Linear version chain with an active-version pointer; activate any version instantly, no redeploy. Soft-delete preserves audit history.
- AI-powered recommendations
- Clarity rewrites with predicted quality lift, token-reduction passes with a -% estimate, passive-voice and ambiguous-role detection. Generated, never auto-applied. One-click apply creates a new version.
- Per-request selection
- Pass nrouter_prompt_template_id + nrouter_prompt_variables in extra_body on any chat completion — works with the unmodified OpenAI SDK in every language. Stripped from the upstream payload before forwarding.
- Audit trail
- Every save, activation, A/B start, and rollback captured with actor, IP, and full diff. Append-only, filterable, CSV + JSON export for SIEM ingestion — pinned for SOC 2 evidence collection.
- Tenant-isolated storage
- Templates, versions, and variable payloads live in org-scoped rows (nrouter.prompt_templates, nrouter.prompt_versions) with Row-Level Security. Cross-org reads are impossible at the database layer.
Common prompt questions
How do variables work in a prompt template?
Templates use strict double-brace scalar variables, with values injected at request time via nrouter_prompt_variables in extra_body. Missing variables fail closed, and org_name, model, timestamp, and user_id come from authenticated request context and apply last.
Can I version prompts and roll back?
Yes. Every save creates a new version with author, timestamp, and diff. Any version can be activated instantly from the dashboard. No redeploy. If a prompt change regresses output quality, roll back to the previous version in one click.
How does A/B testing compare prompts?
Create two or more model or immutable prompt-version variants and set a traffic split (e.g. 60/40). nRouter keeps each authenticated virtual key on a deterministic variant and logs provider-completed buffered latency, cost, and token outcomes.
Is prompt data logged anywhere outside my org?
No. Prompt templates, versions, and variable payloads are stored in your org-scoped Supabase rows with Row-Level Security. Nothing crosses organization boundaries. You control logging granularity per-org via the data policy setting.
Ship without redeploying
Move every prompt out of the codebase — today
Free to start. Versioning, variants, recommendations, and the audit trail are unlocked on every plan from day one.