Skip to content

PromptPack CRD

The PromptPack custom resource defines a versioned collection of prompts for AI agents. The ConfigMap it references must contain a valid PromptPack - a structured JSON/YAML format for packaging multi-prompt conversational systems.

apiVersion: omnia.altairalabs.ai/v1alpha1
kind: PromptPack

Source of the compiled PromptPack content.

FieldTypeRequired
source.configMapRef.namestringYes
source.configMapRef.keystringYes
spec:
source:
configMapRef:
name: my-prompts
key: promptpack.json # Key containing the compiled PromptPack

Rollout strategy for prompt updates.

FieldTypeDefaultRequired
rollout.strategystringimmediateNo
rollout.canary.weightinteger-No
spec:
rollout:
strategy: canary
canary:
weight: 20 # 20% of traffic uses new prompts

Strategies:

  • immediate - Updates apply immediately to all agents
  • canary - Gradual rollout with traffic splitting

Current phase of the PromptPack.

ValueDescription
PendingValidating source
ActivePrompts are valid and in use
CanaryCanary rollout in progress
FailedSource validation failed

The currently active prompt version (content hash).

The canary version during rollout (if applicable).

TypeDescription
SourceValidConfigMap exists and has valid content
AgentsNotifiedReferencing agents have been notified

The referenced ConfigMap must contain a compiled PromptPack following the PromptPack specification:

apiVersion: v1
kind: ConfigMap
metadata:
name: my-prompts
data:
promptpack.json: |
{
"id": "customer-service",
"name": "Customer Service Assistant",
"version": "1.0.0",
"template_engine": {
"version": "v1",
"syntax": "{{variable}}"
},
"prompts": {
"support": {
"id": "support",
"name": "General Support",
"version": "1.0.0",
"system_template": "You are a helpful customer service agent for {{company_name}}. Be professional, empathetic, and solution-oriented.",
"variables": [
{
"name": "company_name",
"type": "string",
"required": true,
"description": "Name of the company"
}
],
"parameters": {
"temperature": 0.7,
"max_tokens": 1024
},
"validators": {
"banned_words": ["competitor", "lawsuit"]
}
}
},
"metadata": {
"domain": "customer-service",
"language": "en",
"tags": ["support", "helpdesk"]
}
}
FieldTypeRequiredDescription
idstringYesUnique identifier (lowercase, hyphens allowed)
namestringYesHuman-readable name
versionstringYesSemantic version (MAJOR.MINOR.PATCH)
template_engineobjectYesTemplate configuration
promptsobjectYesMap of prompt definitions
metadataobjectNoDomain, language, tags
toolsobjectNoTool definitions for function calling
fragmentsobjectNoReusable template fragments

For the complete specification, see promptpack.org.

spec:
rollout:
strategy: canary
canary:
weight: 10 # Start with 10%

Update the weight to increase canary traffic:

spec:
rollout:
canary:
weight: 50 # Increase to 50%

Set weight to 100 to promote canary:

spec:
rollout:
canary:
weight: 100 # Promotes canary to active

The status will transition from Canary to Active.

Complete PromptPack example with canary rollout:

apiVersion: omnia.altairalabs.ai/v1alpha1
kind: PromptPack
metadata:
name: customer-service
namespace: agents
spec:
source:
configMapRef:
name: cs-prompts-v2
key: promptpack.json
rollout:
strategy: canary
canary:
weight: 25

Status after deployment:

status:
phase: Canary
activeVersion: "abc123"
canaryVersion: "def456"
conditions:
- type: SourceValid
status: "True"
- type: AgentsNotified
status: "True"
message: "Notified 3 AgentRuntimes"

PromptPacks can be authored in YAML for readability and compiled to JSON:

id: customer-service
name: Customer Service Assistant
version: 1.0.0
template_engine:
version: v1
syntax: "{{variable}}"
prompts:
support:
id: support
name: General Support
version: 1.0.0
system_template: |
You are a helpful customer service agent for {{company_name}}.
Be professional, empathetic, and solution-oriented.
Guidelines:
- Always greet the customer warmly
- Listen actively and acknowledge concerns
- Provide clear, actionable solutions
variables:
- name: company_name
type: string
required: true
parameters:
temperature: 0.7
max_tokens: 1024
metadata:
domain: customer-service
language: en

Compile with packc:

Terminal window
packc compile customer-service.promptpack.yaml -o promptpack.json