Prerequisites: API key, an existing voice agent, and a Google Cloud OAuth app configured with the Voice.ai callback URL.
Overview
Managed tools are configured on the agent underconfig.managed_tools.
Supported managed tool configs:
google_calendargoogle_sheetsgoogle_gmail
- Calendar:
google_calendar_check_availability,google_calendar_list_upcoming_events,google_calendar_create_event,google_calendar_update_event,google_calendar_cancel_event - Sheets:
google_sheets_append_row,google_sheets_list_sheets,google_sheets_read_rows - Gmail:
google_gmail_search_messages,google_gmail_get_message,google_gmail_send_email
- provider OAuth connection state
- scope calculation and reconnect checks
- generated callable tool definitions for the runtime
- provider API execution on behalf of the connected user
- Connection routes are provider-scoped and use
/api/v1/{provider}/.... - If you enable additional operations later, status can report
reconnect_requireduntil you reconnect and grant the additional access. DELETE /api/v1/{provider}/{agent_id}/disconnectremoves that provider’s managed-tools access for the agent.
Configure an Agent
Setconfig.managed_tools on the agent with the managed tool configs you want to enable.
| Managed tool config | Field | Type | Description |
|---|---|---|---|
google_calendar | enabled | boolean | Enable Calendar managed tools for the agent |
google_calendar | default_calendar_id | string | Optional default calendar ID. Falls back to primary when omitted |
google_calendar | timezone | string | Optional IANA timezone like America/Los_Angeles |
google_calendar | selected_operations | string[] | Optional subset of Calendar operations. Omit for all supported Calendar operations |
google_sheets | enabled | boolean | Enable Sheets managed tools for the agent |
google_sheets | spreadsheet_id | string | Optional default spreadsheet ID |
google_sheets | sheet_name | string | Optional default worksheet tab name |
google_sheets | selected_operations | string[] | Optional subset of Sheets operations. Omit for all supported Sheets operations |
google_gmail | enabled | boolean | Enable Gmail managed tools for the agent |
google_gmail | selected_operations | string[] | Optional subset of Gmail operations. Omit for all supported Gmail operations |
If
selected_operations is omitted, Voice.ai treats that managed tool config as “all supported operations selected.” If selected_operations is an empty array, the config stays present but requests no provider-specific scopes.Connect a Provider
Connection routes use the provider segment for the managed integration you are connecting, so the examples below use{provider} as a placeholder.
The OAuth flow is:
- Call
POST /api/v1/{provider}/{agent_id}/oauth/start - Open the returned
auth_urlin a popup or browser - The OAuth provider redirects back to the Voice.ai callback URL
- Voice.ai stores the connection and returns a popup completion page
- Poll
GET /api/v1/{provider}/{agent_id}/status
return_pathis the app URL Voice.ai sends the user back to after the backend callback completes.- The OAuth provider still redirects to the Voice.ai backend callback URL configured in your OAuth app.
return_pathonly controls the final app destination after that callback finishes. - The Google connection is shared across Calendar, Sheets, and Gmail for the agent.
- Pass the currently enabled Google managed tool config in
managed_toolsso OAuth requests access for the Google tools that are enabled on the agent. - If you enable more Google capabilities later, start OAuth again with the updated Google managed tool config for the agent.
- Disconnect remains provider-wide. Disconnecting Google removes Calendar, Sheets, and Gmail access for that agent.
Check Connection Status
Use provider status to confirm the account is connected and whether a reconnect is required.Disconnect a Provider
Remove the linked provider account from the agent:Tool Behavior
Managed tools are exposed to the runtime as generated callable tools. The exact tool set depends on:- which providers are enabled
- which operations are selected
- which scopes are currently granted
Timezones and Defaults
- Calendar
timezonemust be an IANA timezone likeAmerica/Los_Angeles - Calendar operations can fall back to the configured
default_calendar_idandtimezone - Sheets operations can fall back to the configured
spreadsheet_idandsheet_name