Skip to main content

Prompt Management

MutagenT provides a complete prompt management system with versioning, variables, and lifecycle management. Centralize your prompts, track changes, and optimize performance systematically.

Prompt Lifecycle

Each stage in the lifecycle builds on the previous. Start with a draft, test in the playground, validate with datasets, optimize automatically, and deploy with confidence.

Key Features

Prompt Structure

interface Prompt {
  id: string;                           // Unique identifier
  workspaceId: string;                  // Parent workspace
  promptGroupId: string;                // Links all versions together
  name: string;                         // Display name
  description?: string;                 // Optional description
  content: string;                      // The prompt template
  variables: Record<string, string>;    // Variable definitions
  currentVersion: number;               // Active version number
  status: 'draft' | 'published';        // Publication status
  createdAt: Date;
  updatedAt: Date;
}

Quick Example

import { Mutagent } from '@mutagent/sdk';

const client = new Mutagent({ bearerAuth: 'sk_live_...' });

// Create a new prompt
const prompt = await client.prompts.create({
  name: 'Customer Support',
  content: `You are a support agent for {{company_name}}.

Help the customer with their question:
{{customer_question}}

Be helpful, professional, and concise.`,
  variables: {
    company_name: 'string',
    customer_question: 'string',
  },
  description: 'Main customer support prompt template',
});

console.log('Created prompt:', prompt.id);

Prompt Organization

Organize prompts effectively within your workspace:
Use clear, descriptive names that indicate the prompt’s purpose:
  • customer-support-v1
  • code-review-assistant
  • data-extraction-json
Add descriptions to document:
  • What the prompt does
  • Expected inputs and outputs
  • Any special considerations

What’s Next?