read script.md
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.
def read_script(script: str)
readScript(script: string): Promise<void>
Example in Python
@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()
Example in TypeScript
agent.onCallStart(async (call: guava.Call) => {
await call.readScript(
"Hello! This is a courtesy call from Bright Smile Dental. "
+ "We're confirming your appointment tomorrow at 2 PM."
);
await call.setTask({
taskId: "confirm_appointment",
checklist: [
guava.Field({
key: "confirmed",
fieldType: "text",
description: "Did they confirm the appointment?",
}),
],
});
});
agent.onTaskComplete("confirm_appointment", async (call) => {
await call.hangup();
})