Skip to main content
The Prompt Registry lets you manage prompts centrally, separate from your code. Update prompts without redeploying your application.

Why Use Prompt Registry?

  • Iterate faster - Update prompts without code changes
  • Version control - Track prompt history and rollback
  • A/B testing - Test different prompts in production
  • Collaboration - Non-engineers can edit prompts

Creating a Prompt

  1. Go to Prompt Registry in your project
  2. Click New Prompt
  3. Enter a name (e.g., summarization-system-prompt)
  4. Write your prompt content
  5. Click Save

Prompt Structure

Each prompt has:
  • Name - Unique identifier (slug format)
  • Content - The prompt text
  • Variables - Placeholders like {{user_name}}
  • Version - Auto-incremented on each save
  • Tags - For organization

Using Variables

Include variables in your prompts:
You are a helpful assistant for {{company_name}}.
The user's name is {{user_name}}.
Pass variables when fetching:
from muxx import Muxx

muxx = Muxx()

prompt = muxx.get_prompt(
    "welcome-message",
    variables={
        "company_name": "Acme Corp",
        "user_name": "Alice"
    }
)
# Returns: "You are a helpful assistant for Acme Corp.\nThe user's name is Alice."

Fetching Prompts

Python

from muxx import Muxx

muxx = Muxx()

# Get latest version
prompt = muxx.get_prompt("summarization-system-prompt")

# Get specific version
prompt = muxx.get_prompt("summarization-system-prompt", version=3)

# Use in LLM call
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[
        {"role": "system", "content": prompt},
        {"role": "user", "content": user_input}
    ]
)

TypeScript

const muxx = new Muxx();

const prompt = await muxx.getPrompt('summarization-system-prompt');

const response = await client.chat.completions.create({
  model: 'gpt-4o',
  messages: [
    { role: 'system', content: prompt },
    { role: 'user', content: userInput },
  ],
});

Versioning

Every save creates a new version:
VersionDateAuthorNote
v3TodayAliceAdded tone guidance
v2YesterdayBobFixed typo
v1Last weekAliceInitial version

Rollback

To rollback to a previous version:
  1. Click the version in history
  2. Click Restore
  3. This creates a new version with the old content

Environments

Use different prompts per environment:
# Production uses v3 (stable)
prompt = muxx.get_prompt("system-prompt", environment="production")

# Staging uses latest
prompt = muxx.get_prompt("system-prompt", environment="staging")

Caching

Prompts are cached locally to minimize latency:
  • Default TTL: 60 seconds
  • Force refresh: muxx.get_prompt("name", cache=False)

Best Practices

customer-support-system-v2 is better than prompt1.
Use tags like production, experimental, deprecated.
Test new versions in staging before production.
One prompt per purpose. Don’t combine unrelated instructions.