PromptResource

Versioned Prompt Templates

Prompts are text templates with substitution parameters, model selection hints, and optional guardrail references. Version control them like code, deploy changes without redeploying applications.

PromptResource Schema

Define prompts as YAML specs following the Open Agentic Resource Specification

review-summary.yaml
type: prompt
enabled: true
version: "0.1"
metadata:
  display_name: Review Summary Prompt
  description: Summarizes documents for review
  tags:
    category: summarization
    team: content
spec:
  name: review-summary
  model: openai-gpt-4o  # optional default
  content: |
    You are a document reviewer.
    
    Summarize the following document in 
    3-5 bullet points:
    
    Document: ${"input::string::document"}
    
    Focus on: ${"input::string::focus_areas"}
    
    Output format: ${"ref::string::metadata.tags.format"}

Key Fields

  • name — Stable identifier used by agents to reference this prompt
  • content — The prompt template string with variable placeholders
  • model — Optional default LLM identifier (references ModelResource)

Common Fields

Inherited from EVResource base:

enabled
version
tags
parameters
composed_resources
Variable Substitution

Dynamic Templating

Variables follow the format <category>::<type>::<value> — resolved at runtime by the Resource Manager

input

Values supplied at deployment time or through configuration

${"input::string::user_id"}
${"input::number::max_tokens"}
${"input::boolean::verbose"}

secret

Reads from environment variables when not explicitly provided

${"secret::string::api_key"}
${"secret::string::db_password"}

resource

References another EV resource by its UUID

${"resource::memory::550e8400..."}
${"resource::storage::a1b2c3d4..."}

ref — Self-references

Reference another field within the same resource spec

# Copy metadata.description to content
reference_text: ${"ref::string::metadata.description"}

# Useful for DRY configurations

GitOps Ready

Prompts are YAML files that fit naturally into repositories, PR reviews, and promotion pipelines. Track every change with full version history.

  • Automatic Versioning
    Every change tracked with semantic version or revision hash
  • Hot Reload
    Changes apply without redeploying applications
  • Rollback Support
    Instantly revert to any previous version
load_prompt.py
from ev_core import EV
from ev_common.models.resources.enums import EVResourceType

# Load prompt from registry
prompt_store = EV.controller.resource_manager\
    .get_store_by_resource_type(
        EVResourceType.PROMPT.value
    )

# Get by name
prompt = prompt_store.get("review-summary")

# Variables resolved automatically
rendered = prompt.render(
    document="The quarterly report shows...",
    focus_areas="revenue, growth, risks"
)

# Use with any agent
agent = Agent(system_message=rendered)

Prompt Composition

Prompts can reference other resources through composed_resources. Build complex templates from reusable components.

composed-prompt.yaml
type: prompt
metadata:
  display_name: Compliance Review Prompt
spec:
  name: compliance-review
  content: |
    Review this document for compliance issues.
    
    Document: ${"input::string::document"}
    
    Reference the PII handbook and compliance policies.
  
  # Compose with other resources
  composed_resources:
    - type: knowledge
      name: pii-handbook
    - type: guardrail
      name: compliance-check
    - type: prompt
      name: base-review-template

# At load time, the controller:
# 1. Resolves each composed resource
# 2. Injects them via composition runtime
# 3. Validates acyclic dependency graph

Stop Hardcoding Prompts

Version control your prompts, deploy changes instantly, empower non-developers to iterate.

Explore Knowledge