Feature  ·  Prompt Management

Ship prompt changes without breaking production.

Version history, production promotion, automatic regression detection after every deploy, and AI-powered optimization suggestions.

Every trace linked to its prompt version. Regression caught before users do.

Start free →View docs
Zespan Prompt Management
Works withVersion historyProduction labelsRegression detectionAI optimizationSDK fetchA/B comparison

14 days

regression lookback

10%

regression threshold

SHA-256

content hash

1.0  Prompt Management

Version History & Trace Linkage

What you get

Immutable versions: changes never overwrite, full history always preservedpromptHash on every trace: click through from any trace to its prompt versionLabels: tag versions with production, staging, experiment, or custom labels

Every prompt change creates an immutable version with a SHA-256 content hash. The hash is stored as promptHash on every trace generated by that prompt — creating a bidirectional link between traces and the exact prompt version that produced them.

Zespan prompt management showing version history with labels and content hash

2.0  Prompt Management

Automatic Regression Detection

What you get

Triggers automatically on every production promotion — no manual step14-day lookback window for comparisonquality_regression notification with per-evaluator before/after scores

When you promote a version to production, a background job compares eval scores for the new version against the previous 14 days. If any evaluator drops more than 10 percentage points, ZespanPilot notifies you with before/after scores per evaluator.

Zespan prompt detail showing eval score comparison across versions

3.0  Prompt Management

AI Prompt Optimization

What you get

Model switch suggestions: e.g., GPT-4o → GPT-4o-mini for simple tasksPrompt compression: identifies boilerplate that can be removedbuildDirectPromptSuggestion: immediate improvement for a specific prompt text

The optimizer analyzes your traces and suggests specific improvements: model switch, prompt compression, or rewrite. Each suggestion includes projected cost savings and can run as a background job for large prompt sets.

4.0  Prompt Management

Runtime SDK Fetch

What you get

Fetch by name + label: prompts.get('support-reply', 'production')Redis cache: invalidated on configVersion bump from every promotionNo redeployment needed: SDK picks up new prompts automatically

PromptClient fetches prompt content at runtime by name + label. Content is cached in Redis and invalidated automatically when a new version is promoted — your app always runs the current production prompt without a redeployment.

Setup

Under 5 minutes,
two lines of code.

No forking and no architecture changes. Traces appear within seconds of the first agent run, with cost attribution, eval scores, and anomaly alerts on by default.

typescript
import { PromptClient } from '@zespan/sdk';

// Fetch the current production prompt at runtime — always fresh
const prompts = new PromptClient({ apiKey: process.env.ZESPAN_API_KEY });
const prompt = await prompts.get('support-reply', 'production');

// prompt.content — cached in Redis, invalidated on next version promotion

Common questions

How does regression detection work exactly?

When you promote a prompt version to the production label, Zespan runs a background job that queries eval scores for traces using the new version vs. traces from the previous 14 days. If any evaluator score drops more than 10 percentage points, a quality_regression ZespanPilot notification fires with the before/after breakdown.

Can I compare two prompt versions side by side?

Yes. The prompt version view shows per-version metrics (eval scores, usage count, latency, cost). You can compare any two versions. The Simulations feature lets you run both versions against the same dataset and compare results head-to-head.

What's the protected label feature?

Certain labels — like production — require admin permission to assign. This prevents developers from accidentally promoting experimental prompts to production without review. You configure which labels are protected in project settings.

Does the SDK cache prompts locally?

Yes. PromptClient caches prompt content in Redis. When you promote a new version, the configVersion bumps and is returned in the next SDK ingest response — triggering SDK clients to refetch. Cache invalidation is automatic and doesn't require your app to restart.

Explore more features

All features →
TracingSee exactly what your agents are doing.Every LLM call, agent step, and tool invocation captured as a structured trace — with cost, latency, and tokens per span.Agent MonitoringKnow which agents are healthy, and which aren't.Composite health scores, delegation graphs, and per-agent cost attribution — built for systems with many cooperating AI agents.EvaluationsMeasure output quality on every trace, automatically.12 built-in LLM-as-judge templates run on every new trace with no setup. Track quality trends, catch regressions, and run manual eval campaigns.GuardrailsStop bad outputs before they reach users.7 guardrail types run inline on every LLM request — block, warn, redact, or log. PII, toxicity, topic drift, format, cost ceiling, and custom rules.

Your agents are running.
Do you know what they’re doing?

Observe, evaluate, guard, and control every agent, live in minutes. No credit card required.

Free tier availableUnder 5 min setupNo credit card