Module: Observ::PromptManagement

Extended by:
ActiveSupport::Concern
Defined in:
app/models/concerns/observ/prompt_management.rb

Overview

Concern for agents that want to use the prompt management system Provides functionality to fetch prompts from the database with fallback support, caching, variable interpolation, and model configuration from prompt metadata.

Usage:

class MyAgent < BaseAgent
include Observ::PromptManagement

FALLBACK_PROMPT = "You are a helpful assistant."

use_prompt_management(
  prompt_name: "my-agent-system-prompt",
  fallback: FALLBACK_PROMPT
)

def self.default_model
  "gpt-4.1-nano"
end
end