docs/read_script()

read_script()

read_script() speaks a verbatim opening statement at the very start of a call, before any LLM involvement. Use it for compliance disclosures, scripted greetings, or anything that must be delivered word-for-word.

signature
def read_script(script: str)
example.py
@agent.on_call_start
def on_call_start(call: guava.Call):
    call.read_script(
        "Hello! This is a courtesy call from Bright Smile Dental. "
        "We're confirming your appointment tomorrow at 2 PM."
    )
    call.set_task(
        "confirm_appointment",
        checklist=[
            guava.Field(key="confirmed", field_type="text",
                        description="Did they confirm the appointment?"),
        ],
    )

@agent.on_task_complete("confirm_appointment")
def on_confirmed(call: guava.Call):
    call.hangup()

Note: Unlike Say in a checklist, read_script() fires before any LLM turn and before any task is set. It's the agent's very first words.

Questions? hi@goguava.ai