1. Guides
  • Introduction
  • Get started
    • Quickstart
    • Authentication
  • Core concepts
    • Agents
    • Phone numbers
    • Calls
    • Webhooks
    • EU Data Sovereignty
  • Webhooks
    • Overview
    • Assistant request
    • Tool calls
    • Status update
    • End of call report
    • Security
  • Guides
    • Whitelabel Portal
    • Prompt & tools generator
    • Web Calls
    • Campaigns
    • xAI Realtime Integration
    • Voice selection psychology
    • Analysis templates
    • BYOK Setup
    • Call analysis
    • Call Transfers
    • Custom Tools
    • Sip Trunks
    • Tool templates
    • Voicemail detection
    • Autonomous silence detection
    • Billing
    • Error codes
    • Rate limits
    • Troubleshooting
  • Api's
    • Campaigns
    • Agents
    • Voices
    • BYOK
    • Analysis templates
    • Tool templates
    • Organization
    • Phone numbers
    • Sip trunks
    • Calls
    • Call control
    • Usage
    • Domains
Documentation
API Reference
Documentation
API Reference
Book a meeting
Linkedin
Github
  1. Guides

Prompt & tools generator

HMS Sovereign includes AI-powered generation tools that help you configure your voice agents 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 agent 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 agent. There are two main generators:
Prompt Generator
Generate system prompts, tools, and analysis templates from a description of what your agent should do
n8n Workflow Generator
Generate complete, importable n8n workflow JSON for any tool your agent uses

Prompt Generator#

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

How It Works#

1
Open the Prompt Generator
Navigate to the agent editor in the HMS Sovereign dashboard. Click the Generate with AI button in the system prompt section.
2
Describe Your Agent
Write a description of what your agent 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 agent 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 agent
should speak Dutch.
3
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
4
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
5
Accept or Refine
Review the generated output. You can:
Accept everything as-is to apply it to your agent
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.
Pro Tip
Voice input works especially well for this feature -- describe your agent the same way you'd explain it to a colleague. The AI handles the translation into a structured voice agent 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 agent 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 agent.

Generated Analysis Templates#

The generator can also create an analysis template that extracts structured data from calls handled by your agent. 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 agents.

Example#

Input:
A customer support agent 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 agent. 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#

1
Open the Workflow Generator
In the agent editor, navigate to the Tools section. Click the n8n button on any function tool to open the workflow generator.
2
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 agent's system prompt for additional context.
3
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.
4
Generate the Workflow
Click Generate Workflow. The AI analyzes the tool configuration and creates a complete n8n workflow. This typically takes 30-60 seconds.
5
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#

1
Copy or Download the JSON
Use the Copy JSON or Download JSON button in the generator.
2
Open n8n
Navigate to your n8n instance and open the workflow editor.
3
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.
4
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.
5
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 agent configuration.
6
Activate and Test
Activate the workflow in n8n. Make a test call to your agent 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 agent to speak"
    }
  ]
}
Important
The tool_call_id must match the incoming tool_call_list[0].id. The result string is what the agent 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
Appointment Booking via Google Calendar
Order Status via REST API
Support Ticket Creation via Zendesk
Lead Logging via Webhook

Best Practices#

Prompt Generation
Be specific about the agent's purpose, language, and personality
Mention all tools and actions the agent 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
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.
Generation costs are separate from per-call costs. You are only charged when you click Generate, not when reviewing or editing the output.

Related#

Custom Tools Guide
Tool Templates Guide
Call Analysis Guide
Analysis Templates Guide
Tool Calls Webhook
Agents API
Modified at 2026-02-13 10:39:51
Previous
Whitelabel Portal
Next
Web Calls
Built with