Skip to main content

Schema Guide

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.

FieldTypeRequiredDescription
$schemastringNoJSON Schema reference for validation and IDE support. Default: https://promptpack.org/schema/latest/promptpack.schema.json
idstringYesUnique identifier for the pack. Lowercase with hyphens only. Pattern: ^[a-z][a-z0-9-]*$ (1--100 chars).
namestringYesHuman-readable display name for the pack (1--200 chars).
versionstringYesPack version following Semantic Versioning 2.0.0. Optional v prefix. Examples: "1.0.0", "v2.1.3".
descriptionstringNoDetailed description of the pack's purpose. Supports markdown (max 5000 chars).
template_engineTemplateEngineYesTemplate engine configuration shared across all prompts.
promptsobject<string, Prompt>YesMap of task type keys to prompt definitions. Must contain at least one entry.
fragmentsobject<string, string>NoShared template fragments. Keys are fragment names, values are fragment content strings.
toolsobject<string, Tool>NoTool definitions that prompts can reference. Keys are tool names, values are tool specs.
metadataMetadataNoOptional pack-level metadata for categorization and discovery.
compilationCompilationNoInformation about when and how the pack was compiled. Generated by packc.
evalsEval[]NoPack-level eval definitions. Cross-cutting quality checks that apply to all prompts. (v1.2+)
workflowWorkflowConfigNoState-machine workflow over the pack's prompts with event-driven transitions. (v1.3+)
agentsAgentsConfigNoAgent configuration mapping prompts to A2A-compatible agent definitions. (v1.3+)
skillsSkillSource[]NoSkill sources for progressive-disclosure knowledge loading. (v1.3.1+)
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/latest/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.

FieldTypeRequiredDescription
versionstringYesTemplate engine version (e.g., "v1").
syntaxstringYesVariable substitution syntax pattern (e.g., "{{variable}}").
featuresstring[]NoSupported 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.

FieldTypeRequiredDescription
idstringYesUnique identifier, typically matching the map key. Pattern: ^[a-z][a-z0-9_-]*$.
namestringYesHuman-readable name.
versionstringYesPrompt version following Semantic Versioning, independent from the pack version.
system_templatestringYesThe system prompt template. Use template syntax (e.g., {{variable}}) for variable substitution.
descriptionstringNoDetailed description of the prompt's purpose and behavior.
variablesVariable[]NoVariable definitions for template placeholders.
toolsstring[]NoList of tool names this prompt can use. Tools must be defined in the pack-level tools map.
tool_policyToolPolicyNoPolicy governing how tools can be used.
pipelinePipelineConfigNoPipeline configuration defining processing stages and middleware.
parametersParametersNoLLM generation parameters (temperature, max_tokens, etc.).
validatorsValidator[]NoValidation rules (guardrails) applied to LLM responses.
tested_modelsTestedModel[]NoModel testing results documenting performance across different models.
model_overridesobject<string, ModelOverride>NoModel-specific template modifications. Keys are model names (e.g., "claude-3-opus", "gpt-4").
evalsEval[]NoPrompt-level eval definitions. Override pack-level evals by id. (v1.2+)
mediaMediaConfigNoMultimodal 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.

FieldTypeRequiredDescription
namestringYesVariable name used in templates (e.g., {{name}}). Pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$.
typestringYesData type. Schema is open — common values are "string", "number", "boolean", "object", "array".
requiredbooleanYesWhether this variable must be provided at runtime.
defaultanyNoDefault value when the variable is not provided. Should not be set when required: true.
descriptionstringNoHuman-readable description of the variable's purpose.
exampleanyNoExample value showing expected format and content.
validationValidationNoValidation rules applied to the variable value at runtime.
bindingBindingNoDeclares how this variable is automatically populated from runtime context (e.g., session, env, request header) without caller input.

Validation

Rules applied to variable values at runtime.

FieldTypeDescription
patternstringRegular expression pattern (for string types).
min_lengthintegerMinimum string length. Minimum value: 0.
max_lengthintegerMaximum string length. Minimum value: 1.
minimumnumberMinimum numeric value (for number types).
maximumnumberMaximum numeric value (for number types).
enumany[]List of allowed values.

Binding

Declares how a variable is auto-populated from runtime context, so the caller doesn't have to supply it explicitly.

FieldTypeRequiredDescription
kindstringNoThe binding source kind. Schema is open — common values are "context", "session", "env", "header".
fieldstringNoThe field name within the binding source to extract (e.g., "user_id", "locale").
auto_populatebooleanNoWhether this variable is automatically populated at runtime without caller input. Default: false.
filterstringNoOptional filter expression applied to the bound value (e.g., "lowercase", "trim").
{
"name": "user_id",
"type": "string",
"required": true,
"binding": {
"kind": "session",
"field": "user_id",
"auto_populate": true
}
}
{
"name": "priority",
"type": "string",
"required": true,
"description": "Support ticket priority level",
"validation": {
"enum": ["low", "medium", "high", "urgent"]
}
}

Tool

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.

FieldTypeRequiredDescription
namestringYesTool name. Pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$.
descriptionstringYesWhat the tool does. The LLM uses this to decide when to call it.
parametersobjectNoJSON Schema object defining the tool's input parameters (see below).

Tool Parameters (JSON Schema Format)

Tool parameters use standard JSON Schema format. The parameters object must have type: "object" with a properties map and an optional required array.

FieldTypeRequiredDescription
typestringYesMust be "object".
propertiesobjectYesMap of parameter names to their JSON Schema definitions.
requiredstring[]NoList 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"]
}
}
}

Tool Policy

Governance policy for tool usage. Controls when and how tools can be called by the LLM.

FieldTypeRequiredDescription
tool_choicestringNo"auto" (LLM decides), "required" (must use tools), or "none" (tools disabled). Default: "auto".
max_roundsintegerNoMaximum number of LLM-tool-LLM cycles per turn. Minimum: 1. Default: 5.
max_tool_calls_per_turnintegerNoMaximum tool calls allowed in a single turn. Minimum: 1. Default: 10.
blockliststring[]NoTool names that are not allowed for this prompt (overrides the tools list).

Parameters

LLM generation parameters controlling the model's behavior and output characteristics.

FieldTypeRequiredDescription
temperaturenumberNoSampling temperature (0--2). Higher values increase randomness.
max_tokensintegerNoMaximum number of tokens to generate. Minimum: 1.
top_pnumberNoNucleus sampling parameter (0--1). Alternative to temperature.
top_kinteger or nullNoTop-k sampling. null means no limit. Minimum: 1.
frequency_penaltynumberNoPenalty for token frequency (-2 to 2). Positive values reduce repetition.
presence_penaltynumberNoPenalty 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.

FieldTypeRequiredDescription
typestringYesThe validator type that determines how validation is performed. Not an enum — runtimes define and register their own types. Examples: "banned_words", "max_length", "length", "max_sentences", "regex_match", "sentiment", "custom".
enabledbooleanNoWhether this validator is active. Default: true.
fail_on_violationbooleanNoIf true, violations cause an error. If false, violations are logged but allowed. Default: false.
messagestringNoUser-facing message returned when the validator blocks content (e.g., "Response contains banned words").
paramsobjectNoValidator-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.

FieldTypeRequiredDescription
providerstringYesLLM provider name (e.g., "openai", "anthropic").
modelstringYesSpecific model identifier (e.g., "gpt-4", "claude-3-opus").
datestringYesDate tested in YYYY-MM-DD format.
success_ratenumberNoSuccess rate from test runs (0--1).
avg_tokensnumberNoAverage tokens used per response.
avg_costnumberNoAverage cost per execution in USD.
avg_latency_msnumberNoAverage response latency in milliseconds.
notesstringNoAdditional observations about model performance.

Model Override

Model-specific template modifications. Allows customizing prompts for specific models without changing the base template.

FieldTypeRequiredDescription
system_template_prefixstringNoText prepended to the system template for this model.
system_template_suffixstringNoText appended to the system template for this model.
system_templatestringNoComplete replacement system template (overrides the base template entirely).
parametersParametersNoModel-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.

FieldTypeRequiredDescription
stagesstring[]YesOrdered list of pipeline stages (e.g., ["template", "provider", "validator"]).
middlewareMiddlewareConfig[]NoMiddleware components applied in order.

Middleware Config

FieldTypeRequiredDescription
typestringYesMiddleware type identifier (e.g., "template", "provider", "validator").
configobjectNoType-specific configuration.

Metadata

Optional pack-level metadata for categorization and discovery.

FieldTypeRequiredDescription
domainstringNoDomain or category (e.g., "customer-service", "healthcare").
languagestringNoPrimary language code (ISO 639-1, e.g., "en"). Pattern: ^[a-z]{2}$.
tagsstring[]NoTags for categorization and discovery.
cost_estimateobjectNoCost estimation with min_cost_usd, max_cost_usd, and avg_cost_usd.

Compilation

Compiler-generated information about when and how the pack was built.

FieldTypeRequiredDescription
compiled_withstringYesVersion of the packc compiler (e.g., "packc-v0.1.0").
created_atstringYesISO 8601 timestamp when the pack was compiled.
schemastringYesPack format schema version (e.g., "v1").
sourcestringNoSource 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

FieldTypeRequiredDescription
idstringYesUnique identifier for this eval within its scope.
typestringYesAssertion type determining how the eval runs. Not an enum — runtimes register their own types (e.g., "contains", "regex", "json_valid", "llm_judge", "cosine_similarity").
triggerstringYesWhen this eval fires. Schema is open — common values are "every_turn", "on_session_complete", "on_conversation_complete", "on_workflow_step", "sample_turns", "sample_sessions".
descriptionstringNoHuman-readable description of what this eval measures.
enabledbooleanNoWhether this eval is active. Default: true.
sample_percentagenumberNoPercentage of turns/sessions to sample (0–100). Only used with sample_turns and sample_sessions triggers. Default: 5.
paramsobjectNoType-specific configuration. Structure depends on the eval type.
metricMetricDefNoPrometheus-style metric declaration for exposing eval results.
thresholdThresholdNoPass/fail threshold for the eval score.
messagestringNoHuman-readable message describing the eval result or failure reason.
whenobjectNoConditional expression that determines whether this eval runs for a given turn or session (e.g., { "has_variable": "customer_tier" }, { "turn_count_gte": 3 }). Free-form — runtimes interpret.
groupsstring[]NoEval group tags for organizing and filtering evals (e.g., ["quality", "tone"], ["safety", "compliance"]).

Metric Def

FieldTypeRequiredDescription
namestringYesMetric name following Prometheus conventions (snake_case). Pattern: ^[a-zA-Z_:][a-zA-Z0-9_:]*$.
typestringYesMetric type. One of: "gauge", "counter", "histogram", "boolean".
rangeobjectNoOptional 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).

Threshold

Optional pass/fail threshold attached to an eval. Runtimes compare the eval's numeric score against value using operator.

FieldTypeDescription
operatorstringComparison operator. Common values: "gte", "lte", "gt", "lt", "eq".
valuenumberThe threshold value to compare against (e.g., 0.8, 4, 0.95).
"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 }
}
}
]
Validators vs Evals

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.

Media Config

FieldTypeRequiredDescription
enabledbooleanYesWhether multimodal content is enabled for this prompt.
supported_typesstring[]NoSupported media types (e.g., "image", "audio", "video", "document"). Custom types allowed.
imageImageConfigNoImage-specific constraints.
audioAudioConfigNoAudio-specific constraints.
videoVideoConfigNoVideo-specific constraints.
documentDocumentConfigNoDocument-specific constraints.
examplesMultimodalExample[]NoExample multimodal messages.

Image Config

FieldTypeDescription
max_size_mbintegerMaximum file size in MB.
allowed_formatsstring[]Allowed formats: "jpeg", "jpg", "png", "webp", "gif", "bmp".
default_detailstringDetail level: "low", "high", or "auto" (default: "auto").
require_captionbooleanWhether captions are required (default: false).
max_images_per_msgintegerMaximum images per message.

Audio Config

FieldTypeDescription
max_size_mbintegerMaximum file size in MB.
allowed_formatsstring[]List of allowed audio format strings (open list, e.g. "mp3", "wav", "ogg", "webm").
max_duration_secintegerMaximum duration in seconds.
require_metadatabooleanWhether metadata is required (default: false).

Video Config

FieldTypeDescription
max_size_mbintegerMaximum file size in MB.
allowed_formatsstring[]Allowed formats: "mp4", "webm", "mov", "avi", "mkv".
max_duration_secintegerMaximum duration in seconds.
require_metadatabooleanWhether metadata is required (default: false).

Document Config

FieldTypeDescription
max_size_mbintegerMaximum file size in MB.
allowed_formatsstring[]Allowed formats (e.g., "pdf", "docx", "csv").
max_pagesintegerMaximum pages/sheets.
require_metadatabooleanWhether metadata is required (default: false).
extraction_modestringContent extraction: "text", "structured", or "raw" (default: "text").

Generic Media Type Config

For custom media types not covered by the specific configs above.

FieldTypeDescription
max_size_mbintegerMaximum file size in MB.
allowed_formatsstring[]Allowed file formats/extensions.
require_metadatabooleanWhether metadata is required (default: false).
validation_paramsobjectCustom validation parameters specific to this media type.

Multimodal Example

FieldTypeRequiredDescription
namestringYesName identifying this example.
descriptionstringNoWhat this example demonstrates.
rolestringYesMessage role: "user", "assistant", or "system".
partsContentPart[]YesMessage content parts (text and/or media).

Content Part

FieldTypeRequiredDescription
typestringYesPart type (e.g., "text", "image", "audio").
textstringNoText content (when type is "text").
mediaMediaReferenceNoMedia reference (when type is a media type).

Media Reference

FieldTypeRequiredDescription
mime_typestringYesMIME type (e.g., "image/jpeg", "audio/mp3").
file_pathstringNoPath to media file.
urlstringNoURL to media file.
base64stringNoBase64-encoded media data.
detailstringNoDetail level for images: "low", "high", or "auto".
captionstringNoCaption 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
}
}

Workflow (v1.3+)

PromptPack v1.3 adds a state-machine workflow over the pack's prompts. Each state references a prompt key and declares event-driven transitions to other states.

WorkflowConfig

FieldTypeRequiredDescription
versionintegerYesWorkflow schema version. Use 1 for the current stable format.
entrystringYesName of the initial state. Must match a key in the states object.
statesobject<string, WorkflowState>YesMap of state name to state definition. Must contain at least one entry.
engineobjectNoOptional runtime engine configuration. Hosts the standardized budget field (v1.4+) alongside runtime-specific hints (timeout, concurrency, etc.).

WorkflowState

FieldTypeRequiredDescription
prompt_taskstringYesReference to a prompt key defined in the pack's prompts object.
descriptionstringNoHuman-readable description of this state's purpose.
on_eventobject<string, string>NoMap of event name to target state name. When the named event fires, the workflow transitions to the target state. Terminal states should omit it (or set it to {}).
persistencestringNoWhether conversation context is kept (persistent) or reset (transient) on entry.
orchestrationstringNoHow this state is orchestrated: internal (runtime manages), external (caller manages), or hybrid.
skillsstringNoSkill filter for this state. A path scoping which skills are available, or "none" to disable skills. (v1.3.1+)
terminalbooleanNoIf true, this state is a terminal state — the workflow completes after its prompt executes. Terminal states should not declare on_event transitions. Default: false. (v1.4+)
max_visitsintegerNoMaximum number of times this state may be entered during a single workflow execution. Minimum: 1. When the limit is reached the workflow transitions to on_max_visits, or terminates with a budget-exhausted status if on_max_visits is not set. (v1.4+)
on_max_visitsstringNoTarget state to transition to when max_visits is reached. Must reference a key in the states object. (v1.4+)
artifactsobject<string, ArtifactDef>NoNamed artifact slots for lightweight, structured metadata that flows across state visits. Values are exposed to the prompt as {{artifacts.<name>}}. (v1.4+)
"workflow": {
"version": 1,
"entry": "triage",
"states": {
"triage": {
"prompt_task": "triage",
"description": "Route incoming requests to the appropriate specialist",
"on_event": {
"billing": "billing_support",
"technical": "tech_support",
"resolved": "closing"
}
},
"billing_support": {
"prompt_task": "billing",
"on_event": { "resolved": "closing", "escalate": "human_handoff" },
"persistence": "persistent"
},
"tech_support": {
"prompt_task": "technical",
"on_event": { "resolved": "closing", "escalate": "human_handoff" },
"persistence": "persistent"
},
"closing": {
"prompt_task": "closing",
"on_event": {},
"orchestration": "internal"
},
"human_handoff": {
"prompt_task": "handoff",
"on_event": {},
"orchestration": "external"
}
}
}

ArtifactDef (v1.4+)

Declares one named slot in a state's artifacts map. Artifacts carry lightweight, structured metadata across state visits — pointers (commit SHAs, file paths, URIs), compact representations (schemas, summaries, diffs), or small structured results. They are not bulk data. Values persist across loop iterations and are accessible to prompts as {{artifacts.<name>}}.

FieldTypeRequiredDescription
typestringYesMIME type indicating the artifact's content type (e.g., "text/plain", "application/json", "text/markdown", "text/x-python"). Used by runtimes to determine serialization and presentation.
descriptionstringNoHuman-readable description of what this artifact contains and how it's used.
modestringNoHow the artifact is updated across visits. "replace" (default) overwrites the previous value on each visit; "append" accumulates content across visits (e.g., a log).
"artifacts": {
"commit_sha": { "type": "text/plain", "description": "Latest generated commit" },
"test_report": { "type": "application/json", "description": "Test runner summary" },
"iteration_log": {
"type": "text/plain",
"mode": "append",
"description": "Per-visit log accumulated across the loop"
}
}

WorkflowBudget (v1.4+)

Resource budget for an entire workflow execution. Provides a global safety net independent of per-state max_visits — when any limit is reached the workflow terminates with a budget-exhausted status. All fields are optional; omitting a field means no limit for that resource. The budget lives at workflow.engine.budget.

FieldTypeRequiredDescription
max_total_visitsintegerNoMaximum total state visits across all states in the workflow. Minimum: 1.
max_tool_callsintegerNoMaximum total tool calls across all states. Minimum: 1.
max_wall_time_secintegerNoMaximum wall-clock time in seconds for the entire workflow execution. Minimum: 1.
"workflow": {
"version": 1,
"entry": "plan",
"states": {
"plan": { "prompt_task": "plan", "on_event": { "PlanReady": "implement" } },
"implement": {
"prompt_task": "implement",
"max_visits": 5,
"on_max_visits": "review",
"artifacts": {
"commit_sha": { "type": "text/plain", "description": "Latest commit" },
"test_report": { "type": "application/json", "description": "Test runner output" }
},
"on_event": { "CodeReady": "test" }
},
"test": { "prompt_task": "run_tests", "on_event": { "TestsFailed": "implement", "TestsPassed": "done" } },
"review": { "prompt_task": "review", "terminal": true },
"done": { "prompt_task": "summarize", "terminal": true }
},
"engine": {
"budget": {
"max_total_visits": 50,
"max_tool_calls": 200,
"max_wall_time_sec": 600
}
}
}
Loop guards vs. budgets

max_visits bounds a single state — useful for "give the implementer up to 5 attempts before forcing review". engine.budget bounds the entire workflow — the runaway-loop safety net that catches cycles max_visits couldn't predict. Use both together: per-state caps for normal flow control, the budget as a backstop.


Agents (v1.3+)

PromptPack v1.3 adds agent definitions that map prompts to A2A (Agent-to-Agent) compatible agent cards. This enables multi-agent orchestration via the A2A protocol.

AgentsConfig

FieldTypeRequiredDescription
entrystringYesPrompt key of the entry agent — the default agent that receives incoming requests.
membersobject<string, AgentDef>YesMap of prompt key to agent definition. Each key must match a prompt defined in the pack's prompts object. Must contain at least one entry.

AgentDef

FieldTypeRequiredDescription
descriptionstringNoAgent description published in the A2A Agent Card. Overrides the prompt's description if set.
tagsstring[]NoDiscovery tags for the agent, used by A2A registries and routers.
input_modesstring[]NoMIME types the agent accepts as input. Defaults to ["text/plain"].
output_modesstring[]NoMIME types the agent can produce as output. Defaults to ["text/plain"].
"agents": {
"entry": "triage",
"members": {
"triage": {
"description": "Routes customer requests to the right specialist",
"tags": ["router", "customer-service"],
"input_modes": ["text/plain"],
"output_modes": ["text/plain"]
},
"billing": {
"description": "Handles billing inquiries and payment issues",
"tags": ["billing", "payments"],
"input_modes": ["text/plain"],
"output_modes": ["text/plain", "application/json"]
},
"technical": {
"description": "Provides technical troubleshooting assistance",
"tags": ["support", "technical"]
}
}
}
Workflow + Agents

workflow and agents are independent features — you can use either or both. When used together, the workflow drives state transitions while agent definitions provide A2A discoverability metadata for each prompt.


Skills (v1.3.1+)

PromptPack v1.3.1 adds skills for progressive-disclosure knowledge loading. Skills are modular knowledge sources that agents load on demand, keeping system templates lean while providing access to deep domain expertise.

SkillSource

Each entry in the top-level skills array is one of three forms:

FormTypeDescription
StringstringPath to a skill directory/file or a package reference (e.g., "./skills/billing", "@acme/support-skills").
SkillPathSourceSkillPathSourcePath object with optional preload flag.
InlineSkillInlineSkillSkill defined directly in the pack.

SkillPathSource

FieldTypeRequiredDescription
pathstringYesPath to a skill directory, file, or package reference.
preloadbooleanNoIf true, load eagerly at pack initialization. Default: false.

InlineSkill

FieldTypeRequiredDescription
namestringYesHuman-readable name for this skill.
descriptionstringYesBrief description of what this skill provides.
instructionsstringYesThe skill's instructions or knowledge content. Loaded into the agent's context when activated.
"skills": [
"./skills/billing",
{ "path": "./skills/compliance", "preload": true },
{
"name": "escalation-protocol",
"description": "Steps for escalating unresolved customer issues",
"instructions": "When a customer issue cannot be resolved within 3 exchanges:\n1. Acknowledge the complexity\n2. Collect case details\n3. Create an escalation ticket\n4. Provide the ticket reference to the customer"
}
]
Skills + Workflow

When a WorkflowState declares a skills field, it scopes which skills are available in that state. Use "none" to disable skills for a state. Without a skills field, all pack-level skills are available.


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:

{{variable_name}}

Fragments are referenced similarly:

{{fragments.fragment_name}}