---
title: "Configure agent prompt"
description: "Visual, Raw, and Monaco modes in Instructions; Markdown + XML + JSON hybrid format; Ask AI; Publish."
---

# Configure Agent Prompt

Agent instructions define how the AI assistant forms replies: role, style, escalation rules, and output format. In Fast Line Pro you edit them in the **Instructions** block on the agent card, choosing an editor mode for simple or structured prompts.

---

## When Needed

- You need to set the agent's response style (formal, informal, technical).
- You want to describe role, behavior rules, and escalation for customers.
- You need JSON output schemas, XML sections, or tool definitions in the prompt.
- You want to personalize replies with variables in the `{{variable_name}}` format.

---

## What's Important to Know

- **Agent instructions** — the system prompt that defines AI assistant behavior.
- The editor has three modes: **Visual**, **Raw**, and **Monaco**.
- For prompts with XML tags, JSON blocks, or output schemas, use **Monaco** or **Raw** — **Visual** is disabled for such text because the visual editor can corrupt markup on save.
- Changes apply to live dialogs only after you click **Publish** on the agent card.

---

## Prerequisites

- [x] You are logged in with integrator permissions.
- [x] You opened **Fast Line Pro** via `Menu → Fast Line Pro`.
- [x] There is an agent whose instructions you need to configure.

---

## Instructions Editor Modes

In the **Instructions** block header, switch editor modes:

| Mode | When to use |
|---|---|
| **Visual** | Simple prompts with headings, lists, and emphasis — no XML tags or JSON blocks. Markdown editing in visual mode. |
| **Raw** | The same text as Visual mode, in a plain textarea with monospace font. Handy for precise copy-paste or edits without syntax highlighting. |
| **Monaco** | Structured prompts: XML sections (`<role>`, `<tools>`), `` ```json `` blocks, Markdown tables, `{{name}}` variables. Syntax highlighting and comfortable editing of long text. |

### Automatic Mode Selection

If the prompt contains:

- XML tags (for example, `<role>`),
- code blocks `` ```json `` or `` ```xml `` ,
- a raw JSON object,

the system **disables Visual** and opens **Monaco**. You can switch to **Raw** manually at any time.

---

## Recommended Prompt Format

For complex agents (tools, routers, response contracts), combine **Markdown + XML + JSON**:

| Element | Purpose | Example |
|---|---|---|
| Markdown headings | Section structure | `# Role`, `## Rules` |
| Lists and **bold** | Rules and limits | `- Do not invent facts` |
| Markdown tables | Parameters, comparisons | `\| Channel \| SLA \|` |
| XML sections | Logical prompt blocks | `<role>`, `<primary_objective>`, `<tools>`, `<escalation_policy>`, `<language_rules>` |
| `` ```json `` blocks | Output schema, routing | JSON response fields |
| Variables | Data from scenarios | `{{client_name}}`, `{{company_name}}` |

Use variables in instructions only as **`{{variable_name}}`** (double curly braces). Names must match agent variables and action parameters in your scenario. See [Configure agent variables](/en/fastlinepro/how-to/configure-agent-variables.md).

### Short Structure Example

````
# Support consultant

<role>
You are an AI support assistant for {{company_name}}.
</role>

<primary_objective>
Answer from the knowledge base. If there is no answer — escalate to an operator.
</primary_objective>

<language_rules>
- Language: English
- Tone: friendly, professional
</language_rules>

```json
{
  "reply": "string",
  "needs_escalation": "boolean"
}
```
````

For simple FAQ prompts, **Visual** mode without XML and JSON is enough.

---

## Step-by-Step Instructions

1. In **Fast Line Pro**, open the **Agents** tab and click the agent name.
2. Find the **Instructions** block.
3. Choose an editor mode:
   - simple text → **Visual** or **Raw**;
   - XML, JSON, tables, long structured prompt → **Monaco** (or wait for Monaco to open automatically if the text already contains structure).
4. Enter or edit instructions. Add variables as `{{variable_name}}` when needed.
5. If AI assistant is enabled in your system, click **Ask AI** in the block header. The assistant opens with a prefill about Markdown, JSON/XML, and Monaco mode.
6. Review the text in the chosen mode (for structured prompts — in **Monaco** or **Raw**).
7. Click **Publish** at the top of the agent card — instructions are saved and applied to future dialogs.

---

## Monaco: What You See in the UI

- Syntax highlighting for headings, XML tags, inline code, `` ```json `` / `` ```xml `` blocks, **bold** text, and tables.
- Code and tables use a monospace font; inline code is colored without a pink background.
- The editor grows with content up to a maximum height, then scrolls internally; the page scrolls for sections below.

---

## What Happens After

Instructions are saved on the agent card. After **Publish**, the agent uses the new prompt in dialogs. Until you publish, live conversations keep the previous version.

---

## How to Verify It Worked

- Instruction text displays correctly in the chosen mode (especially XML and JSON in **Monaco**).
- After **Publish**, the card shows no unsaved changes.
- A test dialog in your scenario follows the prompt rules (tone, escalation, format).

---

## Related Materials

- [Create agent](/en/fastlinepro/how-to/create-agent.md)
- [Configure agent variables](/en/fastlinepro/how-to/configure-agent-variables.md)
- [Connect and configure agent tools](/en/fastlinepro/how-to/configure-agent-tools.md)
- [Bind a Scenario MCP Tool section to an agent](/en/fastlinepro/how-to/bind-scenario-mcp-tool-to-agent.md)
