Skip to main content
Updated Aug 4, 2026

System Messages and Tools

What you'll learn
  • How to add system messages that instruct your LLM agent
  • How to configure function-calling tools the agent can use
  • How to set up pre-actions that run before the AI processes a message

When you create an LLM-based agent, three of the five configuration tabs control what the agent knows, what it can do, and what happens before it responds. This page covers the Messages, Actions, and Tools tabs.

Messages tab — System messages

The Messages tab contains the System messages section. System messages are the instructions you give the language model before any customer conversation begins. They define the agent's personality, knowledge, boundaries, and behavior.

How system messages work

System messages are evaluated and sent to the LLM with every request, before the conversation history. The model reads these instructions and follows them when generating responses. You can add multiple system messages, and they are processed in order. Because they are re-evaluated on every message, dynamic values in them (see below) always reflect the current conversation turn.

Adding system messages

  1. Open your LLM agent and go to the Messages tab.
  2. You will see a list area for system messages.
  3. Click the "Add item" button to add a new system message.
  4. Type your instruction in the text field that appears.
  5. Repeat to add as many system messages as needed.

Tips for writing effective system messages

  • Identity: Tell the agent who it is. Example: "You are the virtual assistant for Bella Salon, a hair and beauty studio in downtown Lisbon."
  • Knowledge: Provide key facts. Example: "Our services include haircuts (starting at 25 euros), coloring, and styling. We are open Tuesday through Saturday, 9am to 7pm."
  • Tone: Set the communication style. Example: "Be friendly, professional, and concise. Use the customer's first name when possible."
  • Boundaries: Define what the agent should not do. Example: "Never discuss competitor pricing. Do not make medical or legal claims. If unsure, offer to connect the customer with a human attendant."
  • Escalation: Explain when to hand off. Example: "If the customer asks to speak with a person, or if you cannot resolve their question in 3 exchanges, transfer the conversation to a human agent."

Using dynamic variables in system messages

System messages are CEL expressions, so you can insert dynamic information at runtime. This lets you personalize agent behavior based on the contact, the incoming message, or the conversation.

To use a dynamic variable in a system message:

  1. Write a CEL expression using the available variables. The Use simple expressions (sCEL) toggle switches a message between simple-CEL and raw CEL.

Available variables:

VariableDescription
contactContact information (name, tags, custom attributes)
contactMessageThe incoming message (type, text content, media, timestamp)
conversationThe chat session (channel, status, last message)
companyYour company record

Examples:

  • Personalizing greetings: 'The contact name is ' + contact.name
  • Including contact tags: 'Contact tags: ' + contact.tags.join(', ')
  • Conditional behavior based on message type: contactMessage.type == 'text' ? contactMessage.body.text : '(media message)'
tip

Use the Explorer panel to browse all available variables and their properties. Click a variable to see its sub-fields and insert them into your expression.

Tools tab — Function calling

The Tools tab lets you give your agent the ability to call external functions during a conversation. This is known as "function calling" or "tool use": the agent can look up data, perform calculations, check availability, or create bookings.

note

The Tools tab settings only appear when the agent can actually use tools. If you turn on Enable structured outputs (on the Advanced tab), or if the selected model does not support function calling, the Tool choice, Tools, and MCP Servers fields are hidden and the tab appears empty.

Tool choice

At the top of the Tools tab, you will find the Tool choice dropdown with four options:

  • auto (default): The model decides on its own when to call a tool based on the conversation context.
  • required: The model must call a tool before responding.
  • none: The model never calls tools.
  • function: The model is forced to call one specific tool. Selecting this reveals a Function field where you pick the tool by name.

Adding tools

  1. Go to the Tools tab on your LLM agent.
  2. In the Tools list, click the "Add item" button.
  3. Configure the tool by providing its name, description, and parameter schema. The description is critical because the LLM reads it to decide when and how to use the tool.
  4. In the tool's Actions section, add the steps that run when the assistant calls the tool. A tool with no actions does nothing — these workflow/step actions perform the actual work (querying data, calling an API, creating a record, and so on). New tools start with an empty action list, so add at least one action for the tool to have any effect.
  5. In the Output section, configure what the tool returns to the model. The main output is the value handed back to the assistant after the actions run. You can also turn on Execute extra completion to run an additional model completion on the result, and Enable tools in extra completion to allow further tool calls during it. Both are off by default.
  6. Repeat for each tool you want the agent to access.

Example tools

ToolPurpose
Check calendar availabilityLets the agent look up open appointment slots
Create appointmentLets the agent book an appointment for a customer
Look up contact recordRetrieves contact details from your database
Send notificationSends an alert to a team member

MCP servers

Below the Tools list, the MCP Servers list lets you connect external MCP (Model Context Protocol) servers whose tools become available to the agent at runtime, alongside the tools you define locally. For each server you provide:

  • Server URL: The server's public HTTP(S) address.
  • Server label and Description (optional): Help you and the model identify the server.
  • Require approval: Whether tool calls to this server need approval.
  • Allowed tools (optional): Restrict which of the server's tools the agent may use.
  • Headers (optional): HTTP headers sent to the server, typically for authentication.

The server's tools are discovered automatically and offered to the model together with your local tools.

tip

Start with one or two essential tools and test thoroughly before adding more. Each tool increases the agent's capability but also adds complexity. The model needs clear tool descriptions to use them correctly.

Tool-message hygiene

For tools that may be chained in one user request, avoid adding a status-only Compose conversation response as the first tool action. That action runs every time the tool is called, so a search -> fetch -> summarize flow can send several "I'm working..." messages before the useful answer. Prefer returning tool data and letting the final assistant response summarize it once. If a long-running tool needs a progress note, send at most one short note for the whole request.

Actions tab — Pre-actions

The Actions tab lets you configure Pre-actions -- steps that run automatically before the LLM processes each incoming message. Pre-actions can transform data, call APIs, set variables, or perform other logic to prepare context for the AI.

If you need a field-by-field guide to the available action types, see the Actions Reference.

Configuring pre-actions

  1. Go to the Actions tab on your LLM agent.
  2. You will see the Pre-actions section.
  3. Click "Add step" to add a new pre-action step.
  4. Configure the step with the desired logic.
  5. Add additional steps as needed. Steps run in sequence.

Debugging pre-actions

The Actions tab includes a Start Debug button (its tooltip reads "Debug all"). Clicking it runs all pre-action steps in debug mode so you can see what each step does, what data it produces, and whether any errors occur.

tip

Use pre-actions to enrich the conversation context before the AI responds. For example, a pre-action could fetch the customer's recent order history so the agent can reference it in its reply without needing a tool call during the conversation.

Next steps