Skip to main content
ALTAIRA LABS
DocsBlog

Schema Reference

Complete field-by-field reference for all PromptPack entities and their properties.

Root Schema

PromptPack

The root object of every PromptPack file.

FieldTypeRequiredDescription
apiVersionstringYesMust be "v1"
kindstringYesMust be "PromptPack"
metadataMetadataYesFile metadata
specSpecYesSpecification content

Metadata

File metadata and identification.

FieldTypeRequiredDescription
namestringYesUnique identifier (lowercase, hyphens only)
versionstringYesSemantic version (MAJOR.MINOR.PATCH)
descriptionstringNoHuman-readable description
authorsstring[]NoAuthor names or emails
licensestringNoLicense identifier (e.g., "MIT", "Apache-2.0")
tagsstring[]NoClassification tags
createdstringNoISO 8601 creation timestamp
updatedstringNoISO 8601 last updated timestamp

Spec

The main specification content.

FieldTypeRequiredDescription
promptsPrompt[]NoPrompt definitions
toolsTool[]NoTool definitions
workflowsWorkflow[]NoWorkflow definitions
personasPersona[]NoPersona definitions
fragmentsFragment[]NoReusable fragments
configConfigNoRuntime configuration

Entity Schemas

Prompt

Defines a template-based instruction for AI systems.

FieldTypeRequiredDescription
namestringYesUnique prompt identifier
templatestringYesTemplate with variable placeholders
descriptionstringNoPurpose and usage description
variablesVariable[]NoInput variable definitions
outputsOutput[]NoExpected output definitions
examplesExample[]NoTest cases and examples
metadataobjectNoAdditional key-value metadata

Variable

Defines an input variable for prompts or tools.

FieldTypeRequiredDescription
namestringYesVariable name (supports dot notation)
typestringYesData type: "string", "number", "boolean", "array", "object"
requiredbooleanNoWhether variable is required (default: false)
defaultanyNoDefault value if not provided
descriptionstringNoVariable purpose and usage
validationValidationNoValidation rules

Tool

Defines an external function or API that can be called.

FieldTypeRequiredDescription
namestringYesUnique tool identifier
descriptionstringYesWhat the tool does
parametersVariable[]NoInput parameters
returnsReturnSchemaNoReturn value schema
endpointstringNoAPI endpoint URL
methodstringNoHTTP method (GET, POST, PUT, DELETE)
headersobjectNoHTTP headers
authenticationAuthNoAuthentication configuration

Workflow

Defines a multi-step conversational flow.

FieldTypeRequiredDescription
namestringYesUnique workflow identifier
descriptionstringNoWorkflow purpose
stepsStep[]YesOrdered execution steps
variablesVariable[]NoWorkflow-level variables
error_handlingErrorHandlingNoError handling strategy

Persona

Defines AI personality and behavioral characteristics.

FieldTypeRequiredDescription
namestringYesUnique persona identifier
descriptionstringNoPersona description
traitsPersonaTraitsYesPersonality characteristics
knowledgestring[]NoAreas of expertise
constraintsstring[]NoBehavioral limitations
examplesPersonaExample[]NoExample interactions

Fragment

Defines reusable content that can be included in prompts.

FieldTypeRequiredDescription
namestringYesUnique fragment identifier
contentstringYesReusable content template
descriptionstringNoFragment purpose
variablesVariable[]NoFragment-specific variables

Supporting Schemas

Step

A single step in a workflow.

FieldTypeRequiredDescription
promptstringNoPrompt to execute
toolstringNoTool to call
conditionstringNoBoolean condition for branching
thenStep[]NoSteps if condition is true
elseStep[]NoSteps if condition is false

PersonaTraits

Personality characteristics for a persona.

FieldTypeRequiredDescription
personalitystringNoCore personality description
communication_stylestringNoHow the persona communicates
expertisestringNoAreas of knowledge
tonestringNoCommunication tone

Validation

Validation rules for variables.

FieldTypeRequiredDescription
min_lengthnumberNoMinimum string length
max_lengthnumberNoMaximum string length
patternstringNoRegular expression pattern
enumany[]NoAllowed values
minnumberNoMinimum numeric value
maxnumberNoMaximum numeric value

Auth

Authentication configuration for tools.

FieldTypeRequiredDescription
typestringYes"api_key", "bearer_token", "basic", "oauth2"
key_locationstringNo"header", "query_parameter"
key_namestringNoHeader or parameter name

ReturnSchema

Schema for tool return values.

FieldTypeRequiredDescription
typestringYesReturn data type
schemaobjectNoJSON schema for validation
descriptionstringNoReturn value description

Config

Runtime configuration settings.

FieldTypeRequiredDescription
modelstringNoDefault AI model
temperaturenumberNoGeneration temperature (0.0-1.0)
max_tokensnumberNoMaximum output tokens
timeoutnumberNoRequest timeout in seconds
retriesnumberNoNumber of retry attempts

Output

Expected output specification for prompts.

FieldTypeRequiredDescription
namestringYesOutput identifier
typestringYesExpected data type
descriptionstringNoOutput description
schemaobjectNoJSON schema for validation
requiredbooleanNoWhether output is required

Example

Test cases and usage examples.

FieldTypeRequiredDescription
namestringYesExample identifier
inputsobjectYesInput variable values
expected_outputanyNoExpected result
descriptionstringNoExample description

ErrorHandling

Error handling configuration for workflows.

FieldTypeRequiredDescription
strategystringYes"fail_fast", "continue", "retry"
max_retriesnumberNoMaximum retry attempts
fallbackstringNoFallback prompt or tool
timeoutnumberNoStep timeout in seconds

PersonaExample

Example interactions for personas.

FieldTypeRequiredDescription
inputstringYesUser input
outputstringYesPersona response
contextobjectNoInteraction context
descriptionstringNoExample 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}}