Build an AI agent
Create an AI agent, write its instructions, give it knowledge, tools and confidence rules, test it, publish it and put it in a flow.
An agent is built as a draft, tested against sample conversations, and then published. Only a published agent can answer customers, and only through a flow's AI agent step.
Note: Owners, Admins, Supervisors and Marketing Managers can create and edit agents and test them. Only Owners, Admins and Marketing Managers can publish or unpublish them.
Create an agent
- Go to Automation › AI agents › Agents.
- Click New agent.
- Enter a Name (under 120 characters) and, optionally, a Description (for your team, not the AI).
- Click Create.
The agent's draft opens. Your organisation can have up to 50 agents.
The Agents list shows each agent's Name, Status (Draft, Version N is live or Unpublished), Used by flows (how many flows use it) and Updated. Use Filter by status to narrow it.
Set up the draft
The draft saves itself a moment after each change; Save is there if you want to save straight away. The top of the page shows "Draft revision N" and whether all changes are saved.
Instructions
What the agent is told: its role, tone, what to help with and what to avoid. Up to 8,000 characters. Your instructions are added after the platform's own rules, which you can't change (for example, answer only from the documents, and the answer and tool format).
Knowledge bases
Tick the knowledge bases the agent reads, up to 10. With none, every answer is in the caveat band or below, so the agent will often hand over. See Knowledge bases.
Tools
A tool is a call to your own system that the agent may make, for example to look up an order. Click Add tool (up to 5 tools) and fill in:
- Name: what the AI calls it, in lower-case letters, digits and underscores (up to 32).
- Description: what the AI reads to decide when to call it (up to 500 characters).
- Method (GET, POST, PUT or PATCH) and URL: a fixed https address. An argument that must reach the URL is a query parameter on GET.
- Sign in with: No credential, or A stored credential from your credentials.
- Headers: literal, stored in clear, never a secret. Up to 10.
- Arguments: click Add argument for each value the AI must supply, with a Name, Type (
string,numberorboolean), Description and whether it is Required. Up to 10.
The agent makes at most one tool call per turn, only to a tool listed here, and only with arguments that fit what you defined. The answer is read as data, never as instructions. If a tool fails, the agent hands over.
Confidence
- Hand over below: answers scored below this hand over to a person.
- Caveat below: answers between the two lines go out with a caveat; above it, the agent answers plainly.
- Caveat wording: the sentence put before a caveat answer, in the customer's language (up to 200 characters). Blank uses a standard sentence.
Both are percentages; a blank field shows Platform default. Use Preview to drag a sample score and see which band it falls in.
Handover
- Give the conversation to: leave it to your routing rules, or choose A department, queue or person.
- Tell the customer: a message sent before the assignment (up to 500 characters). Blank hands over silently.
The reasons an agent hands over are fixed: confidence below the threshold, the customer asked for a person, an intent the agent may not answer, a tool failed, the AI budget ran out, or a policy rule.
Languages
Language tags such as en, hi or pt-BR, up to 10. A message in a listed language is answered in it; any other is answered in the first language listed.
Allowed intents
Leave every box clear to answer any intent. Tick some, and a message read as another intent is handed over. Messages read as "unknown" are always answered. See Intents.
Check and test
Click Check for problems to see what would stop the draft publishing. Each problem has a Go to button for its field.
To try the agent:
- Click Test.
- Under Conversation, write a short exchange, oldest first. Use Add message and choose Customer or Agent for each. The last message must be the customer's.
- Optionally, set the Customer's language.
- Click Run the test.
Nothing is sent, nobody is assigned and no tool is called. The Result shows whether the agent Would answer, Would answer with the caveat or Would hand over (with the Reason), What would be sent, any Tool it asked for, the Sources it used (citations to your knowledge), and the tokens and time it took. Tests never count in analytics.
Publish
- Click Publish and confirm "Publish revision N?".
A new version is made from the draft. Every flow that uses this agent runs the new version from its next step on. Your plan must include AI to publish an agent.
To stop the agent answering, click Unpublish. This is refused while a published flow uses the agent: unpublish those flows (or publish them without the agent) first. The draft is kept.
Put the agent in a flow
- Open a flow's draft and add the AI agent step (in the AI group).
- Under AI agent, choose the agent.
- Connect the answered exit, and optionally handed over, refused and failed.
- Publish the flow.
A flow that uses an agent with no published version can't be published. See AI agents overview.
Versions
The Versions tab lists each published version with its Status (Live, Superseded or Unpublished), when it was Published and Retired, and From revision. Open a version to see exactly how it was configured, who published it and when. A version never changes; to change the agent, edit the draft and publish again. There is no button to restore an older version.
Delete an agent
At the bottom of the draft, click Delete agent and confirm. The draft and every version are removed; the record of past answers is kept for analytics. Deleting is refused while a published flow uses the agent.
Still need help?
Write to us at [email protected] and tell us what you were trying to do. Already a customer? Sign in to IconEngage — the same articles are under Help in the app.