Insurance

Underwriting Information Collection

Collect the detailed risk information needed for underwriting new policies or endorsements, reducing back-and-forth between agents and applicants.

Why this matters

Automate claims intake, policy renewals, and customer outreach with voice agents built for regulated insurance workflows. This example shows you how to automate underwriting information collection 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 UnderwritingBot(guava.CallController):
    def __init__(self, applicant: str, policy_type: str, application_id: str):
        super().__init__()
        self.set_persona(
            organization_name="Atlas Underwriters",
            agent_name="Quinn",
        )
        self.set_task(
            objective=f"Collect underwriting information from {applicant} for {policy_type} application {application_id}",
            checklist=[
                "Introduce yourself and explain this call is to complete the underwriting questionnaire.",
                guava.Field(
                    key="property_age",
                    field_type="number",
                    description="Year the property was built",
                ),
                guava.Field(
                    key="roof_age",
                    field_type="number",
                    description="Year the roof was last replaced",
                ),
                guava.Field(
                    key="heating_type",
                    field_type="choice",
                    description="Primary heating system type",
                    choices=["gas forced air", "electric", "heat pump", "oil", "wood/pellet"],
                ),
                guava.Field(
                    key="security_system",
                    field_type="bool",
                    description="Is there a monitored security system?",
                ),
                guava.Field(
                    key="prior_claims_5yr",
                    field_type="number",
                    description="Number of insurance claims in the past 5 years",
                ),
                guava.Field(
                    key="trampoline_or_pool",
                    field_type="bool",
                    description="Is there a trampoline or pool on the property?",
                ),
                "Confirm the information will be reviewed and provide expected decision timeline.",
            ],
            on_complete=lambda fields: print(f"Underwriting data collected: {fields}"),
        )

guava.dial(
    controller=UnderwritingBot,
    controller_args={"applicant": "Wendy Okafor", "policy_type": "homeowners",
                     "application_id": "APP-20241102"},
    to=os.environ["APPLICANT_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 UnderwritingBot(guava.CallController):
    def __init__(self, applicant: str, policy_type: str, application_id: str):
        super().__init__()
        self.set_persona(
            organization_name="Atlas Underwriters",
            agent_name="Quinn",
        )
        self.set_task(
            objective=f"Collect underwriting information from {applicant} for {policy_type} application {application_id}",
            checklist=[
                "Introduce yourself and explain this call is to complete the underwriting questionnaire.",
                guava.Field(
                    key="property_age",
                    field_type="number",
                    description="Year the property was built",
                ),
                guava.Field(
                    key="roof_age",
                    field_type="number",
                    description="Year the roof was last replaced",
                ),
                guava.Field(
                    key="heating_type",
                    field_type="choice",
                    description="Primary heating system type",
                    choices=["gas forced air", "electric", "heat pump", "oil", "wood/pellet"],
                ),
                guava.Field(
                    key="security_system",
                    field_type="bool",
                    description="Is there a monitored security system?",
                ),
                guava.Field(
                    key="prior_claims_5yr",
                    field_type="number",
                    description="Number of insurance claims in the past 5 years",
                ),
                guava.Field(
                    key="trampoline_or_pool",
                    field_type="bool",
                    description="Is there a trampoline or pool on the property?",
                ),
                "Confirm the information will be reviewed and provide expected decision timeline.",
            ],
            on_complete=lambda fields: print(f"Underwriting data collected: {fields}"),
        )

guava.dial(
    controller=UnderwritingBot,
    controller_args={"applicant": "Wendy Okafor", "policy_type": "homeowners",
                     "application_id": "APP-20241102"},
    to=os.environ["APPLICANT_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