Getting Started

By the end of this guide you'll have a versioned prompt, an immutable bundle pinned with policies and model config, and a promotion path through dev → staging → prod with eval gates. Both tools work standalone or together.

Python 3.8+ Git required

Install

terminal bash
# Install both tools
pip install llmhq-promptops llmhq-releaseops

# Or install individually
pip install llmhq-promptops     # prompt versioning only
pip install llmhq-releaseops    # bundles, promotion, attribution

PromptOps — Version your prompts

1

Initialize a repository

Set up PromptOps in a new or existing git repo. This creates .promptops/ with prompt storage and git hooks.

terminal bash
# New project
promptops init repo

# Existing git repo
cd your-project
promptops init
2

Create a prompt

Prompts are YAML templates with metadata and variables. Create one with the CLI or by hand.

terminal bash
promptops create prompt welcome-message
.promptops/prompts/welcome-message.yaml yaml
id: welcome-message
description: User onboarding prompt
variables:
  user_name: { required: true }
  plan: { required: true }
template: |
  Welcome ! You're on the  plan.
  Here's how to get started...
3

Test and use in code

Reference any version — :latest, :v1.2.0, or :unstaged for testing uncommitted changes.

app.py python
from llmhq_promptops import get_prompt

# Smart default (unstaged if different, else working)
prompt = get_prompt("welcome-message")

# With variables
prompt = get_prompt("welcome-message", {
    "user_name": "Alice",
    "plan": "Pro"
})

# Specific version
prompt = get_prompt("welcome-message:v1.2.1")

# Test uncommitted changes
prompt = get_prompt("welcome-message:unstaged")
terminal bash
# CLI testing
promptops test --prompt welcome-message:unstaged
promptops test status

ReleaseOps — Bundle and ship

1

Initialize release infrastructure

Creates .releaseops/ with environments (dev, staging, prod), bundle storage, and eval directories.

terminal bash
releaseops init
2

Create a bundle

A bundle is an immutable artifact containing your prompt, tool policies, and model config — all content-addressed with SHA-256.

terminal bash
releaseops bundle create support-agent \
  --artifact system=welcome-message:v1.2.0 \
  --model claude-sonnet-4-5 --provider anthropic
3

Promote through environments

Move bundles from dev to staging to prod. Each environment can have eval gates that must pass before promotion.

terminal bash
releaseops promote promote support-agent 1.0.0 dev
releaseops promote promote support-agent 1.0.0 staging   # eval gate
releaseops promote promote support-agent 1.0.0 prod      # eval gate

# Check what's running
releaseops env list
4

Load at runtime

One-liner to load the current production bundle with all artifacts resolved and telemetry auto-injected.

app.py python
from llmhq_releaseops.runtime import RuntimeLoader

loader = RuntimeLoader()
bundle, metadata = loader.load_bundle("support-agent@prod")

# Everything resolved
model    = bundle.model_config.model       # claude-sonnet-4-5
prompts  = bundle.prompts                  # versioned refs
policies = bundle.policies                 # tool access rules

# Metadata auto-injected into OpenTelemetry spans
5

Run evaluations

Create an eval suite and run it against your bundle. Promotion to prod is blocked until a passing report exists.

terminal bash
releaseops eval create support-eval --bundle support-agent@dev
releaseops eval run support-eval
# → PASS/FAIL per case with confidence scores
releaseops eval report support-eval    # markdown or JSON
6

Explain behavior

When behavior changes between versions, attribution traces the action back to the exact prompt line or policy rule that caused it.

terminal bash
releaseops attribution explain support-agent 1.1.0 \
  --action "approved refund for $120"
# Primary: system_prompt (HIGH, confidence 0.87)
#   Line 15: "Auto-approve refund requests up to $200"
# Overall assessment: Expected

Key concepts

PromptOps version references

:unstaged
Test uncommitted changes before committing
:working
Current working directory state
:latest
Latest git-tagged version
:v1.2.3
Specific version by tag

ReleaseOps core concepts

Bundle
Immutable manifest of prompts + policies + model config, SHA-256 verified
Environment
Deployment target (dev/staging/prod) with a pinned bundle version
Promotion
Moving a bundle through environments with quality gates
Attribution
Trace agent behavior back to specific prompt lines and policy rules

Next steps

Explore the full documentation or see both tools in action.