Education

Attendance & Absence Check-In

Contact parents or guardians of absent students to verify the reason for absence, update attendance records, and identify students who may need support.

Why this matters

Improve enrollment, retention, and outcomes with voice automation for student engagement, attendance, and fundraising. This example shows you how to automate attendance & absence check-in calls end-to-end with Guava's SDK — no telephony plumbing, no prompt engineering, just Python.

How to set persona & task
Working with Fields and Say items
Handling callbacks
Running the agent
Step 01

Installation

Install from Guava's private PyPI index. A public package is coming soon — the install command will simplify to pip install guava.

terminal
# Step 1: Install Guava
pip install gridspace-guava --extra-index-url https://guava-pypi.gridspace.com

# Public PyPI package coming soon — the install command will simplify to:
# pip install guava

# Step 2: Set your credentials
export GUAVA_API_KEY="..."
export GUAVA_AGENT_NUMBER="..."
Step 02

How it's built

Every Guava agent is a Python class. Walk through the key sections below, then grab the complete file at the end.

01

Imports

Import the Guava SDK and any helpers you need. guava.CallController is the base class for every voice agent.

example.py
# Install: pip install gridspace-guava --extra-index-url https://guava-pypi.gridspace.com
import guava
import os
02

Agent setup

set_persona() defines how the agent presents itself. set_task() gives it its mission in plain English. The checklist drives the conversation — Guava works through it top-to-bottom, collecting Field values and speaking Say items as it goes.

example.py
class AttendanceCheckinBot(guava.CallController):
    def __init__(self, student_name: str, school: str, grade: str, absence_date: str):
        super().__init__()
        self.set_persona(
            organization_name=f"{school} Attendance Office",
            agent_name="Taylor",
        )
        self.set_task(
            objective=f"Contact parent/guardian of {student_name} ({grade}) regarding absence on {absence_date}",
            checklist=[
                f"Introduce yourself from {school} Attendance Office regarding {student_name}'s absence today.",
                guava.Field(
                    key="speaking_with",
                    field_type="choice",
                    description="Who is the caller speaking with?",
                    choices=["parent", "guardian", "student", "other family member"],
                ),
                guava.Field(
                    key="absence_reason",
                    field_type="choice",
                    description=f"Reason for {student_name}'s absence",
                    choices=["illness", "medical appointment", "family emergency",
                             "pre-excused absence", "not sure where student is", "other"],
                ),
                guava.Field(
                    key="expected_return_date",
                    field_type="text",
                    description="When is the student expected to return?",
                ),
                guava.Field(
                    key="needs_coursework",
                    field_type="bool",
                    description="Would they like today's coursework sent home?",
                ),
                guava.Field(
                    key="concerning_circumstances",
                    field_type="bool",
                    description="Are there any concerning circumstances the school should be aware of?",
                ),
                "Thank the contact and note the excused absence if applicable.",
            ],
            on_complete=lambda fields: print(f"Absence recorded for {student_name}: {fields.get('absence_reason')}"),
        )

guava.dial(
    controller=AttendanceCheckinBot,
    controller_args={"student_name": "Tyler Reynolds", "school": "Lincoln Middle School",
                     "grade": "7th grade", "absence_date": "today"},
    to=os.environ["GUARDIAN_PHONE"],
    agent_number=os.environ["GUAVA_AGENT_NUMBER"],
    api_key=os.environ["GUAVA_API_KEY"],
)

Platform performance

<1s

Response time

99.99%

Uptime SLA

13+

Industries served

Step 03

Full example

The complete file — copy it, save it as example.py, and run it.

example.py
# Install: pip install gridspace-guava --extra-index-url https://guava-pypi.gridspace.com
import guava
import os

class AttendanceCheckinBot(guava.CallController):
    def __init__(self, student_name: str, school: str, grade: str, absence_date: str):
        super().__init__()
        self.set_persona(
            organization_name=f"{school} Attendance Office",
            agent_name="Taylor",
        )
        self.set_task(
            objective=f"Contact parent/guardian of {student_name} ({grade}) regarding absence on {absence_date}",
            checklist=[
                f"Introduce yourself from {school} Attendance Office regarding {student_name}'s absence today.",
                guava.Field(
                    key="speaking_with",
                    field_type="choice",
                    description="Who is the caller speaking with?",
                    choices=["parent", "guardian", "student", "other family member"],
                ),
                guava.Field(
                    key="absence_reason",
                    field_type="choice",
                    description=f"Reason for {student_name}'s absence",
                    choices=["illness", "medical appointment", "family emergency",
                             "pre-excused absence", "not sure where student is", "other"],
                ),
                guava.Field(
                    key="expected_return_date",
                    field_type="text",
                    description="When is the student expected to return?",
                ),
                guava.Field(
                    key="needs_coursework",
                    field_type="bool",
                    description="Would they like today's coursework sent home?",
                ),
                guava.Field(
                    key="concerning_circumstances",
                    field_type="bool",
                    description="Are there any concerning circumstances the school should be aware of?",
                ),
                "Thank the contact and note the excused absence if applicable.",
            ],
            on_complete=lambda fields: print(f"Absence recorded for {student_name}: {fields.get('absence_reason')}"),
        )

guava.dial(
    controller=AttendanceCheckinBot,
    controller_args={"student_name": "Tyler Reynolds", "school": "Lincoln Middle School",
                     "grade": "7th grade", "absence_date": "today"},
    to=os.environ["GUARDIAN_PHONE"],
    agent_number=os.environ["GUAVA_AGENT_NUMBER"],
    api_key=os.environ["GUAVA_API_KEY"],
)
Step 04

Run it

Start the agent. It will connect to Guava's infrastructure and begin accepting calls on your assigned number.

terminal
python example.py
Get Started