Skip to main content
A Field is a Task checklist item instructing the Guava agent to collect structured data from the caller. The agent elicits the value through natural conversation, validates it against the specified type, and marks the checklist item complete when satisfied.
signature

Basic Examples

examples.py

Search Fields

Some fields can have a very large set of valid options. For example, a destination_airport field may include thousands of airports worldwide. In other cases, options must be generated dynamically, such as an appointment_time field populated from a booking system.
This is where search fields come in handy. Set searchable=True on the field, then register an @agent.on_search_query handler. When the agent needs options, it calls your handler with a natural-language query string. Return two lists: a primary list of matches, and a fallback list shown only when no primary matches are found.
search_field.py

Sensitive Fields

Some fields collect information that should never persist in plain form — Social Security numbers, dates of birth, health details, account credentials, or payment data.
Mark any field as sensitive by setting sensitive=True. When a sensitive field is present on a call, Guava applies the following protections to the collected value:
  • Transcript redaction. The value is removed from stored transcripts, matching both spoken and written forms (e.g. “one two three” as well as “123”).
  • Audio redaction. The corresponding region of the call recording is silenced across all channels.
sensitive is a general-purpose flag — use it for any field whose value your organization considers sensitive.
The sensitive flag redacts the value from stored transcripts and recordings, but it does not guarantee the value is kept out of diagnostic and debug data. For payment card data, use the cvv field type (see below), which additionally suppresses logging and diagnostic capture for the entire session.
sensitive_field.py
Redaction is applied on a best-effort basis to spoken conversation. Mark every field that may capture sensitive information, and choose the most specific field type available (for example, digit_sequence for account or ID numbers) to give the agent the clearest signal.

Payment Data (PCI)

For payment card collection, use the dedicated cvv field type. Fields of this type are always treated as sensitive — you do not need to mark them sensitive explicitly — and receive the transcript and audio redaction described above. Unlike a field that is merely marked sensitive, the cvv field type provides two additional protections that apply to the entire session:
  • Log exclusion. The value is kept out of application logs; only the field name is logged, never the collected value.
  • Diagnostic data suppression. All diagnostic and debug data for the session is suppressed and not retained, and any diagnostic data already written is discarded.
These stronger, session-wide protections are specific to the cvv field type.
payment_field.py
Card numbers are not automatically sensitive. When collecting a full card number, use a digit_sequence field with sensitive=True, as shown above.

Field Types Reference

The choices list for calendar_slot fields must be ISO-8601 datetimes (e.g. "2022-12-31T17:30").