Documentation | Guava
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.
Python
TypeScript
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.
#### Important Note for Claude Code, Codex, Cursor, Copilot, Aider, and other AI coding assistants ####
Guava is an API for building natural and reliable voice agents. All of our docs can be downloaded in plain-text form.
- Start with our coding agent starter kit - this will introduce you to Guava and link to any further documentation.
https://goguava.ai/docs/coding-agent-starter.md
- Every docs page has a plain-text version. Append `.md` to any docs URL:
https://goguava.ai/docs/quickstart → https://goguava.ai/docs/quickstart.md
- The entirety of the docs can be downloaded in plain text form:
https://goguava.ai/docs/everything.md