Functions

Define workflow actions, HTTP requests, integrations, and built-in functions in YAML.

Functions give the assistant actions it can call during a conversation. Define them as YAML arrays in functions.yaml. Each function needs name, description, args, and execution; use args: [] when it takes no arguments.

Scope and names

FileWhen its functions are availableLimit
reception/functions.yamlThroughout the call, including during workflows.16
reception/workflows/booking/01-details/functions.yamlWhile that step is active, alongside assistant-level functions.17

The assistant-level file is optional and defaults to an empty list. Every step requires its own file, which can contain [].

Names must match [a-z][a-z0-9_]{0,63}: start with a lowercase letter and use lowercase letters, digits, or underscores, up to 64 characters. Names must be unique in each file, and step functions must not reuse an assistant-level name. Different steps can reuse names because their functions are not active together.

Descriptions must be nonempty and at most 2,048 characters. Explain when the assistant should call the function and any information it must collect first.

Execution types

execution.typeexecution.operationPurpose
builtinstart_workflowEnter the first step of a named workflow.
builtintransitionContinue, exit, regress and return, or jump to a specific step in any workflow of this assistant.
builtinsave_variableSave argument values for use later in the call.
builtinhuman_transferTransfer the caller using dashboard transfer settings.
builtinsend_smsSend an SMS using the configured sender.
builtinintegrationRun an action on a connected integration.
customNo operation fieldSend an HTTPS request to your service.

Append the following examples to the appropriate functions.yaml array. Keep the existing start_booking function when extending the receptionist example.

Arguments

Each argument requires a name, type, and nonempty description of at most 500 characters. Argument names use the same format as function names and must be unique among siblings. call_sid is reserved for Neuroline.

TypeValue or additional fields
stringText.
numberA number, including fractions.
integerA whole number.
booleantrue or false.
anyAn unrestricted value.
objectAdd a properties array of argument definitions.
unionAdd an alternatives array with at least two argument definitions.

There can be at most 16 arguments in each list, including object properties and union alternatives. Objects and unions can nest up to three levels. Fields such as required, default, and enum are not supported; ordinary typed arguments must be supplied when the function is called.

Save variables

Save collected values to the current call's context. Later steps can read them from the Variables context. Saving the same name again replaces its value; these values are not stored as a record for future calls.

reception/workflows/booking/01-details/functions.yaml
- name: save_request
  description: Save the caller's confirmed name and preferred appointment time before proceeding.
  args:
    - name: caller_name
      type: string
      description: The caller's full name.
    - name: preferred_time
      type: string
      description: The requested date and time, including the timezone.
  execution:
    type: builtin
    operation: save_variable

Add this alongside proceed and update the step prompt to call save_request before advancing. This operation requires at least one argument.

For structured values, an argument can contain properties and alternatives:

args:
  - name: request
    type: object
    description: Appointment preferences provided by the caller.
    properties:
      - name: party_size
        type: union
        description: The number of attendees, or a description if it is not yet known.
        alternatives:
          - name: exact_count
            type: integer
            description: The confirmed number of attendees.
          - name: estimate
            type: string
            description: The caller's estimate in their own words.

HTTP functions

reception/functions.yaml
- name: lookup_booking
  description: Look up an existing booking after the caller provides its reference.
  args:
    - name: reference
      type: string
      description: The booking reference provided by the caller.
  execution:
    type: custom
    url: https://api.example.com/bookings/lookup
    method: POST
    headers: {}
    timeout: 5000

Replace the example URL with your service's HTTPS endpoint. All execution fields shown above are required. Supported methods are POST, PUT, PATCH, GET, and DELETE. timeout is in milliseconds, from 1,000 to 20,000 in increments of 1,000. Assistant silence timeouts in config.yaml use seconds instead.

POST, PUT, and PATCH send arguments as JSON; GET and DELETE put them in the query string. Neuroline adds call_sid automatically. Objects in query parameters are JSON-encoded. Successful response text is returned to the assistant; non-success responses and timeouts fail the function. Redirects are not followed.

headers is a map of header names to string values, with at most 16 entries. Header values are literal; repository files do not interpolate environment variables or secret references. For supported providers, use an integration to keep credentials in the dashboard.

Integration functions

First sync the assistant without integration functions. Then connect the provider on that assistant's integrations page in the dashboard and configure the resources it may use. Add its functions in a subsequent commit.

For example, this function lists slots from a connected Cal.com account:

reception/workflows/booking/01-details/functions.yaml
- name: list_slots
  description: List available times for an enabled Cal.com event type before offering an appointment.
  args:
    - name: event_type_id
      type: string
      description: Exact enabled Cal.com event type ID.
    - name: start
      type: string
      description: Range start as an ISO 8601 date-time.
    - name: end
      type: string
      description: Range end as an ISO 8601 date-time, no more than 31 days after start.
    - name: time_zone
      type: string
      description: IANA time zone for the returned slots.
  execution:
    type: builtin
    operation: integration
    actionId: calcom.list_slots

actionId selects the provider action. With bindingId omitted, Neuroline resolves the assistant's connected integration for that provider. An explicit bindingId must identify a connection owned by this assistant and match the action's provider. Missing, disconnected, ambiguous, or mismatched connections fail the import.

Argument names, types, and structure must match the action's definition. You can customize descriptions; configured resource hints are retained. Update the step prompt to call the action and offer only returned availability. Listing slots does not create a booking.

Human transfer and SMS

reception/functions.yaml
- name: human_transfer
  description: Transfer the caller to a person when they request one.
  args: []
  execution:
    type: builtin
    operation: human_transfer
- name: send_sms
  description: Send a short SMS to the caller when they ask for or approve it.
  args:
    - name: to
      type: string
      description: Exact caller phone number from the call context.
    - name: message
      type: string
      description: SMS body, up to 1000 characters.
  execution:
    type: builtin
    operation: send_sms

Enable and configure human transfers in the dashboard. The transfer function is available only when transfers are enabled and a transfer is currently available, including any working-hours restrictions.

Configure an SMS sender in the dashboard to make send_sms available. Messages can be sent only to the caller's number from call context, are limited to 1,000 characters, and are capped at three per call. Keep the argument names and types shown above for these built-in operations.

On this page