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 Schema

PromptPack

The root object of every PromptPack file.

FieldTypeRequiredDescription
apiVersionstringMust be "v1"
kindstringMust be "PromptPack"
metadataMetadataFile metadata
specSpecSpecification content

Metadata

File metadata and identification.

FieldTypeRequiredDescription
namestringUnique identifier (lowercase, hyphens only)
versionstringSemantic version (MAJOR.MINOR.PATCH)
descriptionstringHuman-readable description
authorsstring[]Author names or emails
licensestringLicense identifier (e.g., "MIT", "Apache-2.0")
tagsstring[]Classification tags
createdstringISO 8601 creation timestamp
updatedstringISO 8601 last updated timestamp

Spec

The main specification content.

FieldTypeRequiredDescription
promptsPrompt[]Prompt definitions
toolsTool[]Tool definitions
workflowsWorkflow[]Workflow definitions
personasPersona[]Persona definitions
fragmentsFragment[]Reusable fragments
configConfigRuntime configuration

Entity Schemas

Prompt

Defines a template-based instruction for AI systems.

FieldTypeRequiredDescription
namestringUnique prompt identifier
templatestringTemplate with variable placeholders
descriptionstringPurpose and usage description
variablesVariable[]Input variable definitions
outputsOutput[]Expected output definitions
examplesExample[]Test cases and examples
metadataobjectAdditional key-value metadata

Variable

Defines an input variable for prompts or tools.

FieldTypeRequiredDescription
namestringVariable name (supports dot notation)
typestringData type: "string", "number", "boolean", "array", "object"
requiredbooleanWhether variable is required (default: false)
defaultanyDefault value if not provided
descriptionstringVariable purpose and usage
validationValidationValidation rules

Tool

Defines an external function or API that can be called.

FieldTypeRequiredDescription
namestringUnique tool identifier
descriptionstringWhat the tool does
parametersVariable[]Input parameters
returnsReturnSchemaReturn value schema
endpointstringAPI endpoint URL
methodstringHTTP method (GET, POST, PUT, DELETE)
headersobjectHTTP headers
authenticationAuthAuthentication configuration

Workflow

Defines a multi-step conversational flow.

FieldTypeRequiredDescription
namestringUnique workflow identifier
descriptionstringWorkflow purpose
stepsStep[]Ordered execution steps
variablesVariable[]Workflow-level variables
error_handlingErrorHandlingError handling strategy

Persona

Defines AI personality and behavioral characteristics.

FieldTypeRequiredDescription
namestringUnique persona identifier
descriptionstringPersona description
traitsPersonaTraitsPersonality characteristics
knowledgestring[]Areas of expertise
constraintsstring[]Behavioral limitations
examplesPersonaExample[]Example interactions

Fragment

Defines reusable content that can be included in prompts.

FieldTypeRequiredDescription
namestringUnique fragment identifier
contentstringReusable content template
descriptionstringFragment purpose
variablesVariable[]Fragment-specific variables

Supporting Schemas

Step

A single step in a workflow.

FieldTypeRequiredDescription
promptstringPrompt to execute
toolstringTool to call
conditionstringBoolean condition for branching
thenStep[]Steps if condition is true
elseStep[]Steps if condition is false

PersonaTraits

Personality characteristics for a persona.

FieldTypeRequiredDescription
personalitystringCore personality description
communication_stylestringHow the persona communicates
expertisestringAreas of knowledge
tonestringCommunication tone

Validation

Validation rules for variables.

FieldTypeRequiredDescription
min_lengthnumberMinimum string length
max_lengthnumberMaximum string length
patternstringRegular expression pattern
enumany[]Allowed values
minnumberMinimum numeric value
maxnumberMaximum numeric value

Auth

Authentication configuration for tools.

FieldTypeRequiredDescription
typestring"api_key", "bearer_token", "basic", "oauth2"
key_locationstring"header", "query_parameter"
key_namestringHeader or parameter name

ReturnSchema

Schema for tool return values.

FieldTypeRequiredDescription
typestringReturn data type
schemaobjectJSON schema for validation
descriptionstringReturn value description

Config

Runtime configuration settings.

FieldTypeRequiredDescription
modelstringDefault AI model
temperaturenumberGeneration temperature (0.0-1.0)
max_tokensnumberMaximum output tokens
timeoutnumberRequest timeout in seconds
retriesnumberNumber of retry attempts

Output

Expected output specification for prompts.

FieldTypeRequiredDescription
namestringOutput identifier
typestringExpected data type
descriptionstringOutput description
schemaobjectJSON schema for validation
requiredbooleanWhether output is required

Example

Test cases and usage examples.

FieldTypeRequiredDescription
namestringExample identifier
inputsobjectInput variable values
expected_outputanyExpected result
descriptionstringExample description

ErrorHandling

Error handling configuration for workflows.

FieldTypeRequiredDescription
strategystring"fail_fast", "continue", "retry"
max_retriesnumberMaximum retry attempts
fallbackstringFallback prompt or tool
timeoutnumberStep timeout in seconds

PersonaExample

Example interactions for personas.

FieldTypeRequiredDescription
inputstringUser input
outputstringPersona response
contextobjectInteraction context
descriptionstringExample description

Data Types

Supported 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 double curly braces:

{{variable_name}}

Examples:

  • Dot Notation: {{user.profile.name}}
  • Array Access: {{items[0].title}}
  • Conditionals: {{#if condition}}content{{/if}}