VoiceDock Docs
Features

AI Generation

AI-powered generation tools that help you configure voice assistants faster by turning natural-language descriptions into production-ready configurations.

HMS Sovereign includes AI-powered generation tools that help you configure your voice assistants faster. Instead of writing system prompts, analysis schemas, and workflow integrations from scratch, describe what you need in plain language and let the AI generate production-ready configurations for you.

AI Generation accelerates your setup by turning natural-language descriptions into complete assistant prompts, tool definitions, analysis templates, and importable n8n workflows.


Overview

The AI generation features are available directly in the HMS Sovereign dashboard when creating or editing an assistant. There are two main generators:

  • Prompt Generator - Generate system prompts, tools, and analysis templates from a description of what your assistant should do
  • n8n Workflow Generator - Generate complete, importable n8n workflow JSON for any tool your assistant uses

Prompt Generator

The Prompt Generator creates a complete voice-optimized system prompt for your assistant based on a natural-language description of what the assistant should do. Optionally, it can also generate matching tool definitions and an analysis template in a single step.

How It Works

Open the Prompt Generator

Navigate to the assistant editor in the HMS Sovereign dashboard. Click the Generate with AI button in the system prompt section.

Describe Your Assistant

Write a description of what your assistant should do. You can type or use the built-in voice input to dictate your description. Be as detailed or as brief as you like -- the generator will fill in the gaps with best practices for voice AI.

Example input:

I need an assistant for a dental clinic. It should answer questions about our
services (whitening, implants, cleanings), check appointment availability,
and book appointments. If someone has an urgent issue, transfer them to our
front desk. The clinic is open Monday to Friday, 9am to 5pm. The assistant
should speak Dutch.

Enable Generate Extras (Optional)

Toggle Also generate tools & analysis to have the AI suggest tool definitions and an analysis template alongside the prompt. When enabled, the generator will:

  • Propose custom function tools based on the actions described (e.g., check_availability, book_appointment)
  • Suggest end call and transfer call tools if appropriate
  • Create a matching analysis template with a JSON schema tailored to your use case

Review the Output

The generator returns:

  • System prompt -- A voice-optimized prompt following best practices for rhythm, pacing, phonetic clarity, and conversational flow
  • Explanation note -- A summary of the design decisions made
  • Tools (if extras enabled) -- Ready-to-use tool definitions with names, descriptions, and parameter schemas
  • Analysis template (if extras enabled) -- A complete analysis configuration with schema and prompts

Accept or Refine

Review the generated output. You can:

  • Accept everything as-is to apply it to your assistant
  • Selectively accept -- choose which tools and whether to include the analysis template
  • Retry with feedback -- provide specific feedback and regenerate for a better result
  • Edit manually after accepting to make fine-tuned adjustments

Voice Input

The Prompt Generator supports voice input via the microphone button. Click it to start recording, speak your description naturally, and click again to stop. The transcription is added to the text input in real time, so you can combine voice and typed input.

Tip: Pro Tip Voice input works especially well for this feature -- describe your assistant the same way you'd explain it to a colleague. The AI handles the translation into a structured voice assistant prompt.

What Makes Generated Prompts Special

Generated prompts follow voice AI best practices automatically:

  • Short sentences -- Kept under 15 words for natural phone delivery
  • Pacing markers -- Commas used as breathing pauses for the TTS engine
  • Phonetic clarity -- Acronyms and brand names spelled out for speech
  • Human fillers -- Natural phrases like "Let me check that for you" distributed throughout
  • Signposting -- The assistant narrates what it's doing when using tools or looking things up
  • No visual formatting -- No markdown, URLs, bullets, or special characters that can't be spoken
  • Structured flow -- Identity, context, personality, boundaries, conversation flow, tool instructions, edge cases, and sign-off

Generated Tools

When you enable the extras toggle, the generator analyzes your description and creates tool definitions that match your described use case. Each generated tool includes:

FieldDescription
nameA descriptive function name (e.g., check_availability)
descriptionClear instructions for the LLM on when and how to use the tool
typefunction, end_call, or transfer_call
parametersA JSON Schema defining the expected input parameters
reasoningAn explanation of why this tool was suggested

You can select which tools to keep before accepting. Accepted tools are saved as tool templates in your organization and automatically attached to the assistant.

Generated Analysis Templates

The generator can also create an analysis template that extracts structured data from calls handled by your assistant. The generated template includes:

FieldDescription
nameA descriptive template name
descriptionWhat this analysis extracts
schemaA JSON Schema defining the structured output format
system_promptInstructions for the AI analyzer
user_promptThe user-facing prompt with {{schema}}, {{transcript}}, and {{ended_reason}} placeholders
reasoningAn explanation of why this schema was designed this way

The generated analysis template is saved to your organization's analysis templates and can be reused across multiple assistants.

Example

Input:

A customer support assistant for an e-commerce store. It should look up order
status, process return requests, and escalate complex issues to a human.
Speak English. Track whether the customer's issue was resolved.

Generated prompt (excerpt):

You are a customer support assistant for [Company Name]. You help callers
with order inquiries, returns, and general questions.

Your tone is warm and professional. You speak clearly and at a comfortable pace.

When a caller asks about an order, use the check order status tool. Read the
status back to them and ask if there's anything else you can help with.

For return requests, use the process return tool. Confirm the order number
and reason before submitting...

Generated tools:

[
  {
    "name": "check_order_status",
    "type": "function",
    "description": "Look up the current status of a customer order by order ID. Use when the caller asks about their order, delivery, or shipment.",
    "parameters": {
      "type": "object",
      "properties": {
        "order_id": {
          "type": "string",
          "description": "The order ID provided by the customer"
        }
      },
      "required": ["order_id"]
    }
  },
  {
    "name": "process_return",
    "type": "function",
    "description": "Submit a return request for a customer order. Confirm the order ID and return reason with the customer before calling this tool.",
    "parameters": {
      "type": "object",
      "properties": {
        "order_id": { "type": "string" },
        "reason": { "type": "string", "description": "Reason for the return" }
      },
      "required": ["order_id", "reason"]
    }
  },
  {
    "type": "transfer_call",
    "destinations": [
      {
        "type": "number",
        "number": "+1234567890",
        "description": "Human support for complex issues that cannot be resolved by the AI"
      }
    ]
  },
  {
    "type": "end_call"
  }
]

Generated analysis template:

{
  "name": "E-Commerce Support Analysis",
  "schema": {
    "type": "object",
    "properties": {
      "issue_resolved": { "type": "boolean" },
      "issue_category": {
        "type": "string",
        "enum": ["order_status", "return", "complaint", "general_inquiry", "other"]
      },
      "customer_sentiment": { "type": "integer", "minimum": 1, "maximum": 10 },
      "escalated": { "type": "boolean" },
      "summary": { "type": "string" }
    }
  }
}

n8n Workflow Generator

The n8n Workflow Generator creates complete, importable n8n workflow JSON for any tool configured on your assistant. Instead of building webhook-based workflows from scratch, the generator produces a ready-to-import workflow with all the nodes, connections, and documentation you need.

How It Works

Open the Workflow Generator

In the assistant editor, navigate to the Tools section. Click the n8n button on any function tool to open the workflow generator.

Review the Tool Configuration

The generator shows a summary of the selected tool, including its name, description, parameter count, and URL configuration. It also has access to the assistant's system prompt for additional context.

Add Custom Instructions (Optional)

Provide additional context for the workflow, such as:

  • Which external APIs or services the workflow should connect to
  • Specific data transformations or business logic
  • Error handling preferences
  • Any credentials or authentication requirements
Connect to our Airtable CRM base to look up customer records.
The base ID is appXXXXXX and the table is called "Customers".
Match on the phone number field.

Generate the Workflow

Click Generate Workflow. The AI analyzes the tool configuration and creates a complete n8n workflow. This typically takes 30-60 seconds.

Review and Export

The generator returns:

  • Workflow notes -- Documentation explaining what the workflow does, what credentials are needed, and setup steps
  • Workflow JSON -- The complete n8n workflow ready to import

You can copy the JSON to your clipboard or download it as a .json file.

Generated Workflow Structure

Every generated workflow follows the HMS Sovereign webhook contract and includes:

ComponentDescription
Webhook nodeA POST webhook that receives tool call payloads from HMS Sovereign
Processing nodesLogic nodes (HTTP Request, Code, IF, Switch, etc.) tailored to what the tool needs to do
Respond to Webhook nodeReturns the result in the format HMS Sovereign expects
Sticky NoteDocumentation describing the workflow, required credentials, and setup instructions
Pin dataRealistic sample data on the Webhook node for testing

Importing into n8n

Copy or Download the JSON

Use the Copy JSON or Download JSON button in the generator.

Open n8n

Navigate to your n8n instance and open the workflow editor.

Import the Workflow

In n8n, press Ctrl+V (or Cmd+V on Mac) to paste the workflow, or use Import from File if you downloaded the JSON.

Configure Credentials

The workflow's Sticky Note documents which credentials are needed. Add your credentials in n8n's Credentials section and connect them to the relevant nodes.

Update the Webhook URL

After importing, n8n assigns a unique webhook URL to the Webhook node. Copy this URL and set it as the tool's url in your HMS Sovereign assistant configuration.

Activate and Test

Activate the workflow in n8n. Make a test call to your assistant and trigger the tool to verify everything works end-to-end.

Webhook Payload Format

All tool call webhooks from HMS Sovereign follow this format:

{
  "message": {
    "type": "tool-calls",
    "call": {
      "id": "call-uuid",
      "type": "inbound_phone_call",
      "status": "in-progress"
    },
    "phone_number": {
      "number": "+31850046559",
      "name": "Company Name"
    },
    "customer": {
      "number": "+31623731537"
    },
    "tool_call_list": [
      {
        "id": "tool_a1b2c3d4e5f6",
        "type": "function",
        "function": {
          "name": "tool_name",
          "arguments": {
            "param1": "value1"
          }
        }
      }
    ]
  }
}

Key paths for use in n8n expressions:

PathDescription
body.message.tool_call_list[0].function.argumentsThe tool's input parameters
body.message.tool_call_list[0].idThe tool call ID (must be returned in the response)
body.message.customer.numberThe caller's phone number
body.message.call.idThe unique call ID

Required Response Format

Your n8n workflow must return this JSON structure via the Respond to Webhook node:

{
  "results": [
    {
      "tool_call_id": "tool_a1b2c3d4e5f6",
      "result": "Human-readable result for the voice assistant to speak"
    }
  ]
}

WarningImportant: The tool_call_id must match the incoming tool_call_list[0].id. The result string is what the assistant reads aloud to the caller.

For async tools (where async is set to true in the tool configuration), the response content is ignored -- just return HTTP 200.

Example Use Cases

CRM Lookup via Airtable

Generate a workflow for a lookup_customer tool that queries an Airtable base by phone number and returns customer details for the assistant to reference during the call.

Appointment Booking via Google Calendar

Generate a workflow for a book_appointment tool that checks Google Calendar availability, creates an event, and confirms the booking back to the caller.

Order Status via REST API

Generate a workflow for a check_order_status tool that calls your e-commerce API with an order ID and returns the current shipping status.

Support Ticket Creation via Zendesk

Generate a workflow for a create_ticket tool that creates a Zendesk ticket with the call summary and customer details after the caller describes their issue.

Lead Logging via Webhook

Generate a workflow for an async log_lead tool that sends lead data to your CRM or marketing platform without blocking the conversation.


Best Practices

  • Prompt Generation - - Be specific about the assistant's purpose, language, and personality

    • Mention all tools and actions the assistant should be able to perform

    • Include business rules and constraints (hours, policies, limits)

    • Use the retry-with-feedback feature to iteratively refine the output

    • Always review and edit the generated prompt before going live

  • n8n Workflow Generation - - Provide clear custom instructions about which external services to connect

    • Always test the imported workflow with the included pin data before activating

    • Review the Sticky Note for required credentials and setup steps

    • Update placeholder URLs and credentials with your actual values

    • Test end-to-end by making a real call after activating the workflow

**Tip: ** The AI generators are a starting point, not a finished product. Always review and customize the output to match your exact requirements before deploying to production.


Costs

Both generators use AI processing to create their output. Each generation counts toward your organization's AI usage. The cost is displayed in the generator dialog before you confirm.

Note: Generation costs are separate from per-call costs. You are only charged when you click Generate, not when reviewing or editing the output.


On this page