Skip to main content

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 four configuration tabs control what the agent knows, what it can do, and what happens before it responds. This page covers the Mensagens (Messages), Ferramentas (Tools), and Acoes (Actions) tabs.

Messages tab — System messages

The Mensagens (Messages) tab contains the Mensagens de sistema (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 sent to the LLM at the start of every conversation as context. The model reads these instructions and follows them when generating responses. You can add multiple system messages, and they are processed in order.

Adding system messages

  1. Open your LLM agent and go to the Mensagens 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."

Tools tab — Function calling

The Ferramentas (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" and it allows the agent to look up data, perform calculations, check availability, create bookings, and more.

Tool choice

At the top of the Tools tab, you will find the Escolha de ferramenta (Tool choice) section with a Tipo (Type) dropdown. The default setting is "auto", which means the model decides on its own when to call a tool based on the conversation context. Other options may allow you to force tool use or disable it.

Adding tools

  1. Go to the Ferramentas tab on your LLM agent.
  2. In the Ferramentas (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. 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 client recordRetrieves client details from your database
Send notificationSends an alert to a team member
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.

Actions tab — Pre-actions

The Acoes (Actions) tab lets you configure Pre-acoes (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.

Configuring pre-actions

  1. Go to the Acoes tab on your LLM agent.
  2. You will see the Pre-acoes (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 "Depurar tudo" (Debug all) button. Clicking it runs all pre-action steps in debug mode so you can see exactly what each step does, what data it produces, and whether any errors occur. This is invaluable during setup and troubleshooting.

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