Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.voxworks.ai/llms.txt

Use this file to discover all available pages before exploring further.

What is a Function Step?

A Function Step runs backend logic without voice interaction:
  1. Prepare inputs — Gather values from variables
  2. Execute logic — Run the function’s defined operations
  3. Produce outputs — Generate results and a boolean outcome
  4. Navigate — Move to the next step based on success/failure

Why Use Functions?

Functions handle operations that LLMs struggle with:
OperationWhy Functions Are Better
Email validationRegex patterns are precise; LLMs guess
Phone number formattingExact format checking required
Date calculationsMath must be exact
Data lookupsDatabase queries need precision
Price calculationsFinancial math can’t be approximate
This is a core part of AI Safety by Design — functions ensure critical operations are handled reliably.

Function Step Structure

PropertyDescriptionRequired
function_idWhich function to executeYes
scriptOptional message while processingNo
input_mapValues to pass to the functionDepends
conditionsNavigation based on resultYes

Available Operations

Functions support a range of operations. If you need a function, reach out to the Voxworks team. We are still working on opening up custom functions to users.

Interrupts

Function steps cannot be interrupted. Functions typically execute very quickly, so this is rarely noticeable to users. Use the Script to provide a “thinking” message like “Let me check that for you…” which will happen whilst the tool executes, so it is OK to keep it brief.

Best Practices

  1. Validate before tool calls — Check data formats before sending to external services
  2. Keep functions focused — Each function should do one thing
  3. Inform the user — Use the script property to set expectations (“Let me check that for you…”, “Let me see…” or “Ok…”)
  4. Handle edge cases — Consider empty values, unusual formats
  5. Test integrations — Verify functions work with your specific configuration

Functions vs Tools

AspectFunctionTool
PurposeLocal logic/validationExternal service calls
SpeedVery fastMay have latency
ReliabilityDeterministicDepends on external service
Use CaseValidation, calculationIntegration, booking
Use functions to validate data before passing it to tools.

Next Steps