Data Models
Prompt and metadata schemas
PromptEnvelope
The core data structure for every prompt in PLP:
json
{
"id": "marketing/welcome-email",
"content": "Hello {{name}}, welcome to {{product}}!",
"meta": {
"version": "1.2.0",
"author": "alice@company.com",
"description": "Welcome email template",
"model_config": { "temperature": 0.7, "max_tokens": 1024 }
}
}id(string, required) — Unique identifier, may include/for namespacingcontent(string | ContentPart[], required) — Prompt text or multimodal arraymeta(object, optional) — Version, author, model_config, plus any custom fields
Multimodal Content
When content includes images, it's an array of content parts:
json
{
"content": [
{ "type": "text", "text": "Analyze this image:" },
{ "type": "image_url", "image_url": { "url": "data:image/png;base64,..." } },
{ "type": "text", "text": "What do you see?" }
]
}Discovery Response
json
{
"plp_version": "1.1.0",
"server": "My PLP Server",
"capabilities": {
"versioning": true,
"list": true,
"contextStore": true,
"deploy": true,
"evaluation": true
}
}DeployResponse
json
{
"promptId": "welcome-email",
"versionNo": 3,
"environment": "production",
"deployedAt": "2024-06-15T10:30:00Z"
}EvalSuiteResult
json
{
"suiteName": "Quality Check",
"status": "pass",
"tests": [{ "name": "...", "status": "pass", "assertions": [...] }],
"summary": { "total": 3, "passed": 3, "failed": 0, "durationMs": 2450 }
}ContextStoreAsset
json
{
"id": 42,
"assetId": "company-logo",
"mimeType": "image/png",
"fileSize": 24576,
"plpReference": "plp://company-logo",
"createdAt": "2024-06-15T10:00:00Z"
}