Skip to content
Everything Agents

Lesson 11 of 14 · 4 min

The free-roam variant: when to relax

Same Apex and same gates, prompt-only orchestration. Safe because the deterministic surfaces stay intact.

The defense layers in the previous lesson all live in deterministic surfaces. That leaves the prompt itself as the part you can dial in either direction. Sometimes the deterministic if branches inside instructions: feel heavy. We built a second variant of the same agent, refund_support_agent_free_roam, where identity_verification has no if branches in its prompt. Just one paragraph of plain English.

Guided variant

reasoning:
    instructions: ->
        if @variables.customer_verified == True:
            | Customer {!@variables.customer_id} is verified.
            | Call go_refund now to move to refund processing.
        if @variables.customer_verified == False:
            | Goal: verify the customer by calling the verify action with their email.
            | If the user has provided an email, call verify with that email immediately.
            | If no email yet, ask for one.

Free-roam variant

reasoning:
    instructions: ->
        | You are responsible for verifying the customer's identity before any
        | refund work happens. Your goal: end this turn with the customer
        | verified. To do that, you must call the verify action with the
        | customer's email address. Valid emails end with @salesforce.com.
        | When you do not yet have an email from the customer, ask them for one.
        | When the customer has provided an email, call the verify action.
        | After verification succeeds, hand control to refund processing
        | using the go_refund transition.

What we observed

MetricGuidedFree-roam
Single-turn "refund. alice@salesforce.com"verifiesverifies
Two-turn (split utterances)asks then verifiesasks then verifies
Bad email like bob@example.comdeclinesdeclines
Cost per turnlower (smaller prompt)higher (longer instructions)
Adversarial prompt-injection in this topicpredictablevaries more
Adding a 4th branch latercode changeprompt change

Relax prompts. Never relax gates.