pub fn prepend_protocol_instructions(
prompt: &str,
profile: ProtocolRequestProfile,
schema_instruction_mode: ProtocolSchemaInstructionMode,
) -> StringExpand description
Prepends structured response protocol instructions to a prompt.
Tells agents to emit one top-level JSON object that matches Agentty’s structured protocol while selecting the cheapest safe schema guidance for the current provider. Providers without native structured output receive the full JSON Schema in the prompt; providers with native enforcement get policy and field-routing instructions only. If the prompt already contains the protocol marker, this function returns the prompt unchanged to avoid duplicated guidance.