Home Automation & AI AI Agents: let AI work on your tickets

AI Agents: let AI work on your tickets

Last updated on Nov 11, 2026

AI Agents let an AI model work on your records, for example tickets, leads, deals or invoices. The agent reads the record, its emails and comments, can use tools you give it, and writes an internal note and a reply draft. A person always decides what is sent.

Turn on AI agents for a module

An administrator chooses which modules AI agents can work on:

  1. Activate the AI Agents module in Module Manager (once).
  2. Open Settings > AI agents and add the modules under AI agents on, for example Tickets, Leads, Deals, Invoices or Events. Click Save.

Each chosen module gets an AI block with the fields AI agent, AI status and AI reply, and the agent can be started there with @ai in a comment or AI status Start (see "Run the agent"). No workflows need to be built. Removing a module hides the AI block again; the data is kept.

Tickets have AI agents on from the start. A module that already has its own AI agent workflows keeps them, and no extra workflow is added there.

Set up an agent

Open AI Agents (Tools menu) and create an agent:

  • Name and Chat name: the chat name is what the agent is called in comments, for example "Claude support".
  • Instructions: what the agent should do and how it should write. Tip: ask for informal, short replies and for "only state what you have checked". You can also tell it how to sort requests (e.g. bug, wish, question) and what to do with each kind.
  • Description: what the agent does and how other agents hand work to it (see "Hand work to another agent").
  • Provider and model: Anthropic, OpenAI or any OpenAI-compatible service. Empty uses the CRM's default AI settings. You use your own API key.
  • Tools (optional): a JSON list of MCP servers the agent may use, for example [{"mcp": "gitlab", "tools": ["search"]}, {"mcp": "simply"}]. tools is an optional allowlist. The address and key of each server are stored as global variables global_mcp_<n>_url and global_mcp_<n>_token, never on the agent.
  • Active: only active agents run.

On the record (e.g. a ticket or a lead) choose the agent in the AI agent field. If you have only one active agent, @ai uses it when the field is empty.

Run the agent

  • Write a comment that starts with @ai followed by what you want, for example "@ai check the error log". Or set AI status to Start.
  • A workflow can also start it with the action AI workflow action > Run AI agent. To run it on every new customer email, see Set up automatic support with AI.
  • The agent runs in the background and usually answers within a minute or two.
  • Steer it by writing new comments: it always follows your latest instructions.

AI status

Status Meaning
Start The agent will run.
Running The agent is working.
Waiting for user The agent needs an answer from you, or has handed the next step to someone else (see its note).
Waiting for approval A tool needs a person's approval first, e.g. temporary access to a system. The agent starts again by itself after the decision.
Done The agent has finished.
Error Something went wrong; the reason is in the agent's comment.

What the agent writes

  • Internal note: short, at most a few lines. The first line always says who acts next (see below). Shown in the comments with the agent's chat name, a robot icon and an "AI" label. Comments addressed to the agent show "to AI".
  • Reply draft: in the Email tab you see "Agent has a reply draft ready". Click Show to read it, or Insert in email to put it in the email, edit and send as usual. When you send an email while a draft waits, the draft is used up and disappears. Nothing is added to the record.

Example agents

Copy an example into Instructions and adjust it to your company.

1. Support (Tickets)

You answer customer tickets. Read the ticket, its emails and comments. Check the customer's other tickets for an ongoing matter. Write a short, friendly reply in the customer's language. Only state what you have checked; if you are unsure, ask a colleague in the note.

2. Lead qualification (Leads)

You qualify new leads. Find out need, budget, timing and who decides. In the note: qualified yes/no and why, and the next step. Write a short first reply that asks only for what is missing. Never promise prices or delivery dates.

3. Payment reminders (Invoices)

You write payment reminders for overdue invoices. Read the invoice, its due date and earlier emails. If the customer has already answered (e.g. disputed the invoice or promised to pay), do not remind: say so in the note with Next: the account owner. Otherwise write a polite reminder with invoice number, amount and due date.

4. Meeting follow-up (Events or Deals)

After a meeting you write the follow-up. Read the event or deal, its comments and the latest emails with the customer. Write a short thank-you email that sums up what was agreed and the next step with a date. In the note, list open questions.

5. Product and quote help (Deals or Quotes)

You help sales with products and quotes. Read the deal or quote and the customer's history. Suggest the products or services that fit, and explain why in the note. Write a reply the salesperson can send. Never change prices or discounts yourself.

Tip: give an agent the built-in CRM tools (below) so it can look up the customer's other records.

How good are the drafts?

When an email is sent while a draft waits, the CRM notes in the background what happened to the draft: sent unchanged, edited (and how much, in % of the words), translated, or not used. A draft that a new run replaced before anyone acted on it is noted too. Users see nothing of this on the record.

The agent's Results block shows:

  • Runs: how many times the agent has run
  • Approved unchanged: drafts sent without changes
  • Approval rate: share of drafts that were used (unchanged, edited or translated)
  • Average edit %: how much the used drafts were changed on average

Use it to improve the agent's Instructions: a high edit % or many unused drafts mean the instructions should be adjusted.

Who acts next

The note starts with Next: <who> - <what to do>. Who is one of:

  • a CRM group, e.g. DevOps or Support. The agent sees your groups that have active users, and the group's description tells it what the group handles. Tip: describe your groups under Settings > Groups.
  • another AI agent (see below)
  • a named colleague
  • Customer: only the customer or their supplier can act
  • None: the reply is ready to send

When someone other than Customer or None is named, the status becomes Waiting for user.

Hand work to another agent

Other active agents that have a Description are part of the agent's team. Write in the description what the agent does and how to hand work to it, for example "Fixes code bugs. Hand over by creating a GitLab issue with the steps to reproduce." The agent first does what its own tools can do, then hands the work over the way the description says and names that agent as Next.

Built-in CRM tools

Agents can look up the customer's other tickets, emails and comments in the CRM themselves, read-only, to see if a request belongs to an ongoing matter:

  • customer_overview: the record's organization and contact, and their latest tickets and emails. Works from any record linked to an organization or contact.
  • search_records: search records in the allowed modules
  • get_record: read one record, an email's text or a record's comments

They only return records the agent's assigned user may see. They are on by default for agents on every module with AI agents turned on, and the record's own module (e.g. Leads) can be read too. In Tools you can choose them with {"crm": ["customer_overview", "search_records", "get_record"]}, add "modules": [...] to change which modules can be read, or turn them off with {"crm": false}.

Translate comments

Every comment has Translate at the right end of its header line. It translates into your language on demand only, and Show original switches back.

Tools and screenshots

With tools, the agent can look things up itself (code, records, logs). Tools that return pictures, such as screenshots, are shown to the agent as images, so it can see what a page looks like.