> ## Documentation Index
> Fetch the complete documentation index at: https://dialnexa.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Prompts And Welcome Messages In DialNexa

> Understand DialNexa prompts, system prompts, welcome messages, conversation start modes, first sentence behavior, and prompt review.

Prompts and welcome messages tell a DialNexa agent what to do and how the call begins. The prompt controls the conversation goal, the system prompt adds higher-level rules, and the welcome message controls the first spoken turn when the agent starts the conversation.

![DialNexa prompt editor showing the Welcome Message field above detailed Agent Prompt instructions.](https://mintcdn.com/dialnexa/0efoAN-6So4r-6NC/images/documentation/screenshots/agent-prompt-editor.png?fit=max\&auto=format\&n=0efoAN-6So4r-6NC\&q=85\&s=60f45f90e53a644a08e11e20c0fd3346)

> [!NOTE]
>
> The first sentence has a job: make the caller stay on the line long enough for the second sentence to matter.

## Before You Begin

Write down the agent's single objective, required facts, prohibited behavior, escalation rules, and a clear definition of success. Collect approved wording for sensitive or regulated statements.

## Prompt Fields And Meaning

Write each field for a different purpose.

| Field | Use it for |
| - | - |
| Prompt text | The main instructions: goal, script, objections, eligibility rules, tone, and call ending behavior. |
| System prompt | Static higher-level behavior constraints and persistent rules. Do not use dynamic variables here. |
| Agent identity | Who the agent is in a conversational flow setup. |
| Agent background | Context the agent should remember while handling flow nodes. |
| Welcome message | The first message when the agent is configured to start. |

## Expand The Agent Prompt For Editing

Choose **Expand prompt** to read or edit a long agent prompt in a larger dialog. The dialog uses the same draft text as the main editor, so closing it preserves unsaved edits. Use **Save** to persist the change or **Revert** to restore the saved text.

Published prompts remain read-only. When an AI proposal is waiting for review, resolve it through **Accept** or **Reject** in the assistant before saving prompt text.

On a narrow screen, use **Agent editor** to return to the prompt or flow canvas, and **Global settings** to open the configuration panel. Selecting a flow node opens **Node settings**; choose **Back to global settings** to leave that node's settings.

## Variable Syntax Validation

The agent builder validates dynamic variable placeholders before saving, testing, or publishing prompt-related text. Use simple double-brace syntax such as `{{first_name}}`. Prompt text, welcome messages, and voicemail messages must be valid Handlebars template text.

| Problem | Example | Fix |
| - | - | - |
| Unclosed variable | `{{first_name` | End every opening `{{` with `}}`. |
| Empty variable | `{{}}` | Add a variable key. |
| Extra brace or spacing before close | `{{amount} }` | Use `{{amount}}`. |
| Invalid variable name | `{{first name}}` | Use letters, numbers, underscores, or dots, such as `{{first_name}}`. |

The validation message points to the first affected line and can report additional errors after that. Fix malformed variables before changing the prompt content itself.

System prompt text is static. Put dynamic caller data in the main prompt, welcome message, voicemail message, default variables, batch CSV, workflow lead data, or API launch payload instead.

## Conversation Start Modes

> [tab] User starts
>
> The caller speaks first. Good for inbound calls where the caller has a reason to call.

> [tab] Agent defined
>
> The agent uses a fixed welcome message. Good for outbound reminders or introductions.

> [tab] Agent dynamic
>
> The first turn can use dynamic values. Good when the greeting needs caller-specific context.

## Write Prompt Instructions That Survive Real Calls

**1. Name the caller goal**

Tell the agent the single most important outcome.

**2. Define what not to do**

Add boundaries for speculation, pricing, escalation, or unsupported requests.

**3. Use examples**

Include phrasing for short answers, objections, wrong number, busy caller, and language switch.

**4. Connect tools to intent**

Tell the agent when to use functions, not just that functions exist.

**5. Make the ending explicit**

Tell the agent when to end, transfer, schedule, or summarize.

## Prompt Size Limits

Single Prompt and Speech to Speech agents show an estimated token count beneath the prompt. A token is a unit of text processed by the model. DialNexa estimates size from the text and its script; this is not an exact provider token count. Conversational Flow and IVR graphs do not use this prompt-area limit.

| Meter state | What to do |
| - | - |
| Green | Continue reviewing the prompt and test it. |
| Yellow or red | Reduce repeated instructions and large reference lists, then test response timing. These states are advisory below an enforced ceiling. |
| Over the publish limit | You can save the draft and continue editing. Publishing is blocked until you shorten the prompt or choose a compatible model with enough capacity. |
| Checking model limits | You can save the draft. Wait for model details to load before judging whether it can be published. |

![DialNexa prompt editor with the token size meter below the prompt showing the estimated token count against the model limit.](https://mintcdn.com/dialnexa/bWDU08GxZKxX_XVj/images/documentation/screenshots/prompt-size-meter.png?fit=max\&auto=format\&n=bWDU08GxZKxX_XVj\&q=85\&s=5227d2e96aa9cb4557e781799a439b18)

The limit depends on the selected model, and every model you can select has one. With an enabled fallback, the tighter of the two ceilings applies, so switching the fallback off can change the limit you see. DialNexa reserves space for system instructions and expands known default dynamic variables before estimating the editable prompt. A short placeholder can therefore represent a large amount of text.

These platform limits are separate from a model's full context window. Keep long reference material in a [knowledge base](https://dialnexa.com/docs/knowledge-base/overview.md), and retain only the instructions needed to use it in the prompt. Speech to Speech agents have a conservative prompt budget to leave room for the conversation.

After shortening a prompt or changing a model, review the meter for the version you are editing, save, reopen the draft, and test the behavior. REST create and update responses also report [prompt health](https://dialnexa.com/docs/api-reference/v1/agents/create.md#check-prompt-health).

## Prompt Review Questions

> [accordion] Does the agent know success?
>
> If success is vague, post-call fields and summaries will be vague too.

> [accordion] Are variables wrapped correctly?
>
> Use placeholders such as `{{first_name}}` and define defaults where needed.

> [accordion] Does the welcome message match the route?
>
> Inbound and outbound openings usually need different wording.

> [accordion] Can the prompt be shorter?
>
> Long prompts are sometimes necessary, but repeated rules and unclear sections make behavior harder to debug.

Before publishing, the optional [Verify and Publish prompt checks](https://dialnexa.com/docs/agents/agent-versions-and-publishing.md#verify-and-publish-an-agent-version) can review instructions, speech quality, contradictions, and hallucination risks. Treat the findings as review assistance, then confirm behavior with a real test call.

## Verify The Prompt And Welcome Message

Test the normal path, an interruption, silence, an out-of-scope question, a correction, and a request for a human. Confirm the agent stays within scope and the transcript reflects the intended behavior.

## Related Reading

> [card] [Dynamic Variables](https://dialnexa.com/docs/agents/dynamic-variables.md)
>
> Add caller-specific values.

> [card] [Single Prompt Agents](https://dialnexa.com/docs/agents/single-prompt-agents.md)
>
> Use one instruction set.

> [card] [Testing Agents](https://dialnexa.com/docs/agents/testing-agents.md)
>
> Test the first turn and edge cases.

> [card] [Agent Prompts Video](https://dialnexa.com/docs/tutorials/platform-videos/write-agent-prompts.md)
>
> Watch how to write focused agent instructions.

> [card] [Welcome And System Prompt Video](https://dialnexa.com/docs/tutorials/platform-videos/welcome-message-and-system-prompt.md)
>
> Watch how the opening and core instructions work together.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.