A handle to a live call, passed to your Guava.Agent handlers.
Use it to steer the conversation: assign tasks, set the persona, send instructions, transfer, read collected fields, and more. Every mutating function enqueues a command on the call's WebSocket connection.
Summary
Functions
Provide the agent contextual information about a topic.
The call's Guava.CallInfo.
The default set of reach_person outcomes.
Read a collected field value by key.
Read a call-scoped variable.
Instruct the agent to naturally end the conversation and hang up.
Whether a field has been collected.
The call's session id.
Reach a specific contact on an outbound call and record their availability
in the contact_availability field. React to the outcome in
Guava.Agent.handle_task_complete/3 (task id "reach_person"), reading the
contact_availability field with get_field/2.
Have the agent read a script verbatim.
Ask the agent to retry the current task.
Send an arbitrary command struct on this call.
Send a free-form instruction to steer the agent.
Enable or disable the agent pressing DTMF digits.
Set primary and secondary spoken languages.
Set the agent's persona.
Assign a task: an objective and/or a checklist of items.
Store a JSON-serializable, call-scoped variable.
Transfer the call to a destination (phone number or SIP address).
Types
@type t() :: %Guava.Call{ call_info: Guava.CallInfo.t(), id: String.t(), server: pid(), table: :ets.tid() }
Functions
Provide the agent contextual information about a topic.
@spec call_info(t()) :: Guava.CallInfo.t()
The call's Guava.CallInfo.
The default set of reach_person outcomes.
Read a collected field value by key.
Read a call-scoped variable.
Instruct the agent to naturally end the conversation and hang up.
Whether a field has been collected.
The call's session id.
Reach a specific contact on an outbound call and record their availability
in the contact_availability field. React to the outcome in
Guava.Agent.handle_task_complete/3 (task id "reach_person"), reading the
contact_availability field with get_field/2.
Options
:greeting— verbatim opening line.:voicemail_message— leave this message on voicemail, then hang up.:voicemail_hangup— hang up immediately on voicemail (no message).:outcomes— override the availability outcomes (list of maps with:key, optional:description, optional:next_action_preview).
Have the agent read a script verbatim.
Ask the agent to retry the current task.
Send an arbitrary command struct on this call.
Send a free-form instruction to steer the agent.
Enable or disable the agent pressing DTMF digits.
Set primary and secondary spoken languages.
Set the agent's persona.
Options
:organization_name, :agent_name, :agent_purpose, :voice.
Assign a task: an objective and/or a checklist of items.
Checklist items may be Guava.Field structs, Guava.Say, Guava.Todo, or
plain strings (converted to todos).
Store a JSON-serializable, call-scoped variable.
Transfer the call to a destination (phone number or SIP address).
instructions (optional) tells the agent what to say; when omitted the
agent announces a transfer before connecting. This is always a soft transfer.