Human-readable guide to PromptPack entities and their properties. For the auto-generated technical reference, see Schema Reference .
Root Properties
The root object of every PromptPack file. Required fields are id, name, version, template_engine, and prompts.
Field Type Required Description $schemastring No JSON Schema reference for validation and IDE support. Default: https://promptpack.org/schema/v1/promptpack.schema.json idstring Yes Unique identifier for the pack. Lowercase with hyphens only. Pattern: ^[a-z][a-z0-9-]*$ (1--100 chars). namestring Yes Human-readable display name for the pack (1--200 chars). versionstring Yes Pack version following Semantic Versioning 2.0.0 . Optional v prefix. Examples: "1.0.0", "v2.1.3". descriptionstring No Detailed description of the pack's purpose. Supports markdown (max 5000 chars). template_engineTemplateEngine Yes Template engine configuration shared across all prompts. promptsobject<string, Prompt > Yes Map of task type keys to prompt definitions. Must contain at least one entry. fragmentsobject<string, string> No Shared template fragments. Keys are fragment names, values are fragment content strings. toolsobject<string, Tool > No Tool definitions that prompts can reference. Keys are tool names, values are tool specs. metadataMetadata No Optional pack-level metadata for categorization and discovery. compilationCompilation No Information about when and how the pack was compiled. Generated by packc. evalsEval []No Pack-level eval definitions. Cross-cutting quality checks that apply to all prompts. (v1.2+)
Collections are keyed maps, not arrays
prompts, fragments, and tools are all objects (keyed maps), not arrays. Each key serves as the identifier for the entry. For example, prompts maps task type strings like "support" or "billing" to their Prompt definitions.
Minimal Example
{ "$schema" : "https://promptpack.org/schema/v1/promptpack.schema.json" , "id" : "my-pack" , "name" : "My Pack" , "version" : "1.0.0" , "template_engine" : { "version" : "v1" , "syntax" : "{{variable}}" } , "prompts" : { "greeting" : { "id" : "greeting" , "name" : "Greeter" , "version" : "1.0.0" , "system_template" : "You are a friendly assistant for {{company}}." } } }
Template Engine
Configuration for how variables are substituted and fragments are resolved across all prompts.
Field Type Required Description versionstring Yes Template engine version (e.g., "v1"). syntaxstring Yes Variable substitution syntax pattern (e.g., "{{variable}}"). featuresstring[] No Supported template features. Allowed values: "basic_substitution", "fragments", "conditionals", "loops", "filters".
"template_engine" : { "version" : "v1" , "syntax" : "{{variable}}" , "features" : [ "basic_substitution" , "fragments" ] }
Prompt
A single prompt configuration within a pack. Each prompt represents a specific task type (e.g., "support", "sales") with its own template, variables, tools, and validation rules. Prompts can evolve independently with their own version numbers.
Field Type Required Description idstring Yes Unique identifier, typically matching the map key. Pattern: ^[a-z][a-z0-9_-]*$. namestring Yes Human-readable name. versionstring Yes Prompt version following Semantic Versioning, independent from the pack version. system_templatestring Yes The system prompt template. Use template syntax (e.g., {{variable}}) for variable substitution. descriptionstring No Detailed description of the prompt's purpose and behavior. variablesVariable []No Variable definitions for template placeholders. toolsstring[] No List of tool names this prompt can use. Tools must be defined in the pack-level tools map. tool_policyToolPolicy No Policy governing how tools can be used. pipelinePipelineConfig No Pipeline configuration defining processing stages and middleware. parametersParameters No LLM generation parameters (temperature, max_tokens, etc.). validatorsValidator []No Validation rules (guardrails) applied to LLM responses. tested_modelsTestedModel []No Model testing results documenting performance across different models. model_overridesobject<string, ModelOverride > No Model-specific template modifications. Keys are model names (e.g., "claude-3-opus", "gpt-4"). evalsEval []No Prompt-level eval definitions. Override pack-level evals by id. (v1.2+) mediaMediaConfig No Multimodal content configuration. Defines supported media types and constraints. (v1.1+)
"prompts" : { "support" : { "id" : "support" , "name" : "Support Bot" , "version" : "1.0.0" , "system_template" : "You are a {{role}} assistant for {{company}}.\n\nHelp resolve their issue." , "variables" : [ { "name" : "role" , "type" : "string" , "required" : true , "example" : "support agent" } , { "name" : "company" , "type" : "string" , "required" : true , "default" : "TechCo" } ] , "tools" : [ "lookup_order" , "create_ticket" ] , "parameters" : { "temperature" : 0.7 , "max_tokens" : 1500 } } }
Variable
A template variable definition with type information and validation rules.
Field Type Required Description namestring Yes Variable name used in templates (e.g., {{name}}). Pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$. typestring Yes Data type. One of: "string", "number", "boolean", "object", "array". requiredboolean Yes Whether this variable must be provided at runtime. defaultany No Default value when the variable is not provided. descriptionstring No Human-readable description of the variable's purpose. exampleany No Example value showing expected format and content. validationValidation No Validation rules applied to the variable value at runtime.
Validation
Rules applied to variable values at runtime.
Field Type Description patternstring Regular expression pattern (for string types). min_lengthinteger Minimum string length. Minimum value: 0. max_lengthinteger Maximum string length. Minimum value: 1. minimumnumber Minimum numeric value (for number types). maximumnumber Maximum numeric value (for number types). enumany[] List of allowed values.
{ "name" : "priority" , "type" : "string" , "required" : true , "description" : "Support ticket priority level" , "validation" : { "enum" : [ "low" , "medium" , "high" , "urgent" ] } }
A tool definition following the function calling convention. Tools enable the LLM to call external functions. Tools are defined at the pack level and referenced by name in each prompt's tools array.
Field Type Required Description namestring Yes Tool name. Pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$. descriptionstring Yes What the tool does. The LLM uses this to decide when to call it. parametersobject No JSON Schema object defining the tool's input parameters (see below).
Tool parameters use standard JSON Schema format. The parameters object must have type: "object" with a properties map and an optional required array.
Field Type Required Description typestring Yes Must be "object". propertiesobject Yes Map of parameter names to their JSON Schema definitions. requiredstring[] No List of required parameter names.
"tools" : { "create_ticket" : { "name" : "create_ticket" , "description" : "Create a support ticket with title, description, and priority" , "parameters" : { "type" : "object" , "properties" : { "title" : { "type" : "string" , "description" : "Ticket title" } , "priority" : { "type" : "string" , "enum" : [ "low" , "medium" , "high" , "urgent" ] } } , "required" : [ "title" ] } } }
Governance policy for tool usage. Controls when and how tools can be called by the LLM.
Field Type Required Description tool_choicestring No "auto" (LLM decides), "required" (must use tools), or "none" (tools disabled). Default: "auto".max_roundsinteger No Maximum number of LLM-tool-LLM cycles per turn. Minimum: 1. Default: 5. max_tool_calls_per_turninteger No Maximum tool calls allowed in a single turn. Minimum: 1. Default: 10. blockliststring[] No Tool names that are not allowed for this prompt (overrides the tools list).
Parameters
LLM generation parameters controlling the model's behavior and output characteristics.
Field Type Required Description temperaturenumber No Sampling temperature (0--2). Higher values increase randomness. max_tokensinteger No Maximum number of tokens to generate. Minimum: 1. top_pnumber No Nucleus sampling parameter (0--1). Alternative to temperature. top_kinteger or null No Top-k sampling. null means no limit. Minimum: 1. frequency_penaltynumber No Penalty for token frequency (-2 to 2). Positive values reduce repetition. presence_penaltynumber No Penalty for token presence (-2 to 2). Positive values encourage new topics.
"parameters" : { "temperature" : 0.7 , "max_tokens" : 1500 , "top_p" : 0.9 }
Validator
A validation rule (guardrail) applied to LLM responses.
Field Type Required Description typestring Yes Validation type. One of: "banned_words", "max_length", "min_length", "regex_match", "json_schema", "sentiment", "toxicity", "pii_detection", "custom". enabledboolean Yes Whether this validator is active. fail_on_violationboolean No If true, violations cause an error. Default: false. paramsobject No Validator-specific parameters (e.g., word lists, character limits).
"validators" : [ { "type" : "banned_words" , "enabled" : true , "fail_on_violation" : true , "params" : { "words" : [ "impossible" , "can't help" ] } } , { "type" : "pii_detection" , "enabled" : true , "fail_on_violation" : true } ]
Tested Model
Documents which models have been tested with a prompt and their performance metrics.
Field Type Required Description providerstring Yes LLM provider name (e.g., "openai", "anthropic"). modelstring Yes Specific model identifier (e.g., "gpt-4", "claude-3-opus"). datestring Yes Date tested in YYYY-MM-DD format. success_ratenumber No Success rate from test runs (0--1). avg_tokensnumber No Average tokens used per response. avg_costnumber No Average cost per execution in USD. avg_latency_msnumber No Average response latency in milliseconds. notesstring No Additional observations about model performance.
Model Override
Model-specific template modifications. Allows customizing prompts for specific models without changing the base template.
Field Type Required Description system_template_prefixstring No Text prepended to the system template for this model. system_template_suffixstring No Text appended to the system template for this model. system_templatestring No Complete replacement system template (overrides the base template entirely). parametersParameters No Model-specific parameter overrides.
"model_overrides" : { "claude-3-opus" : { "system_template_prefix" : "<thinking>\n" , "parameters" : { "temperature" : 0.5 } } }
Pipeline Config
Pipeline configuration defining processing stages and middleware.
Field Type Required Description stagesstring[] Yes Ordered list of pipeline stages (e.g., ["template", "provider", "validator"]). middlewareMiddlewareConfig []No Middleware components applied in order.
Middleware Config
Field Type Required Description typestring Yes Middleware type identifier (e.g., "template", "provider", "validator"). configobject No Type-specific configuration.
Optional pack-level metadata for categorization and discovery.
Field Type Required Description domainstring No Domain or category (e.g., "customer-service", "healthcare"). languagestring No Primary language code (ISO 639-1, e.g., "en"). Pattern: ^[a-z]{2}$. tagsstring[] No Tags for categorization and discovery. cost_estimateobject No Cost estimation with min_cost_usd, max_cost_usd, and avg_cost_usd.
Compilation
Compiler-generated information about when and how the pack was built.
Field Type Required Description compiled_withstring Yes Version of the packc compiler (e.g., "packc-v0.1.0"). created_atstring Yes ISO 8601 timestamp when the pack was compiled. schemastring Yes Pack format schema version (e.g., "v1"). sourcestring No Source configuration file path.
Evals (v1.2+)
Evals are automated quality checks on LLM outputs. Unlike validators (which run inline and can block responses), evals run asynchronously and produce scores or metrics. Evals can be defined at both pack level (cross-cutting) and prompt level (prompt-specific). Prompt-level evals with the same id override pack-level evals.
Eval
Field Type Required Description idstring Yes Unique identifier for this eval within its scope. typestring Yes Assertion type determining how the eval runs. Not an enum — runtimes register their own types (e.g., "contains", "regex", "json_valid", "llm_judge"). triggerstring Yes When this eval fires. One of: "every_turn", "on_session_complete", "sample_turns", "sample_sessions". descriptionstring No Human-readable description of what this eval measures. enabledboolean No Whether this eval is active. Default: true. sample_percentagenumber No Percentage of turns/sessions to sample (0–100). Only used with sample_turns and sample_sessions triggers. Default: 5. paramsobject No Type-specific configuration. Structure depends on the eval type. metricMetricDef No Prometheus-style metric declaration for exposing eval results.
Metric Def
Field Type Required Description namestring Yes Metric name following Prometheus conventions (snake_case). Pattern: ^[a-zA-Z_:][a-zA-Z0-9_:]*$. typestring Yes Metric type. One of: "gauge", "counter", "histogram", "boolean". rangeobject No Optional value bounds with min and/or max fields.
The metric object uses additionalProperties: true, so runtimes can attach extra fields (e.g., labels, help, buckets).
"evals" : [ { "id" : "json_format" , "type" : "json_valid" , "trigger" : "every_turn" , "description" : "Verify the assistant always returns valid JSON" , "metric" : { "name" : "promptpack_json_valid" , "type" : "boolean" } } , { "id" : "tone-check" , "type" : "llm_judge" , "trigger" : "sample_turns" , "sample_percentage" : 10 , "params" : { "judge_prompt" : "Rate the response tone on a 1-5 scale for professionalism." , "model" : "gpt-4o" , "passing_score" : 4 } , "metric" : { "name" : "promptpack_tone_score" , "type" : "gauge" , "range" : { "min" : 1 , "max" : 5 } } } ]
Both sit on the quality spectrum: validators run inline on every response and can block output (fail_on_violation), while evals run asynchronously and produce scores/metrics without blocking. Use validators for hard guardrails, evals for quality measurement and monitoring.
Fragments
Fragments are shared, reusable template text blocks defined at the pack level. They are simple string values keyed by name.
"fragments" : { "customer_context" : "Customer: {{customer_name}}\nAccount Type: {{account_type}}" , "greeting" : "Hello! How can I help you today?" , "escalation_notice" : "I'm going to connect you with a specialist." }
Prompts reference fragments in their system_template using template syntax: {{fragments.customer_context}}.
Multimodal Support (v1.1+)
PromptPack v1.1 adds multimodal content support through media configuration on individual prompts.
Field Type Required Description enabledboolean Yes Whether multimodal content is enabled for this prompt. supported_typesstring[] No Supported media types (e.g., "image", "audio", "video", "document"). Custom types allowed. imageImageConfig No Image-specific constraints. audioAudioConfig No Audio-specific constraints. videoVideoConfig No Video-specific constraints. documentDocumentConfig No Document-specific constraints. examplesMultimodalExample []No Example multimodal messages.
Image Config
Field Type Description max_size_mbinteger Maximum file size in MB. allowed_formatsstring[] Allowed formats: "jpeg", "jpg", "png", "webp", "gif", "bmp". default_detailstring Detail level: "low", "high", or "auto" (default: "auto"). require_captionboolean Whether captions are required (default: false). max_images_per_msginteger Maximum images per message.
Audio Config
Field Type Description max_size_mbinteger Maximum file size in MB. allowed_formatsstring[] Allowed formats: "mp3", "wav", "opus", "flac", "m4a", "aac". max_duration_secinteger Maximum duration in seconds. require_metadataboolean Whether metadata is required (default: false).
Video Config
Field Type Description max_size_mbinteger Maximum file size in MB. allowed_formatsstring[] Allowed formats: "mp4", "webm", "mov", "avi", "mkv". max_duration_secinteger Maximum duration in seconds. require_metadataboolean Whether metadata is required (default: false).
Document Config
Field Type Description max_size_mbinteger Maximum file size in MB. allowed_formatsstring[] Allowed formats (e.g., "pdf", "docx", "csv"). max_pagesinteger Maximum pages/sheets. require_metadataboolean Whether metadata is required (default: false). extraction_modestring Content extraction: "text", "structured", or "raw" (default: "text").
For custom media types not covered by the specific configs above.
Field Type Description max_size_mbinteger Maximum file size in MB. allowed_formatsstring[] Allowed file formats/extensions. require_metadataboolean Whether metadata is required (default: false). validation_paramsobject Custom validation parameters specific to this media type.
Multimodal Example
Field Type Required Description namestring Yes Name identifying this example. descriptionstring No What this example demonstrates. rolestring Yes Message role: "user", "assistant", or "system". partsContentPart []Yes Message content parts (text and/or media).
Content Part
Field Type Required Description typestring Yes Part type (e.g., "text", "image", "audio"). textstring No Text content (when type is "text"). mediaMediaReference No Media reference (when type is a media type).
Field Type Required Description mime_typestring Yes MIME type (e.g., "image/jpeg", "audio/mp3"). file_pathstring No Path to media file. urlstring No URL to media file. base64string No Base64-encoded media data. detailstring No Detail level for images: "low", "high", or "auto". captionstring No Caption or description for the media.
"media" : { "enabled" : true , "supported_types" : [ "image" ] , "image" : { "max_size_mb" : 20 , "allowed_formats" : [ "jpeg" , "png" , "webp" ] , "default_detail" : "high" , "max_images_per_msg" : 5 } }
Data Types
Supported Variable Types
string -- Text data
number -- Numeric values (integers and floats)
boolean -- True/false values
array -- Ordered lists of values
object -- Key-value maps
Template Variables
Variables in templates use the syntax defined in template_engine.syntax. With the default {{variable}} syntax:
Fragments are referenced similarly:
{{fragments.fragment_name}}