Chatbot Tools

What an AI can do with your brand's AI agent through Copilot or a connected AI app — create and configure the agent, add and update knowledge documents, create, change and delete its API tools, and find out why the agent gave a particular answer.

Overview

Through Copilot or a connected AI app, an AI can set up the brand's AI agent — the one the dashboard calls Vex — teach it with text documents, give it API tools that look things up in your own systems, and find out why it answered a visitor the way it did. It looks the actions below up with find_actions and runs each one with the run tool for its kind — see MCP Server. The product catalogue actions belong to this same area and have their own page: Product Tools.

Permissions: the AI agent actions need Vex — shown as Vex AI in the permission list. The knowledge-document and API-tool actions need ContentSources (Content sources) instead, because knowledge and API tools belong to the brand, not to the agent. An app connected by browser login also needs the Chatbot area (copilot:chatbot) ticked on the login screen.
A brand has at most one AI agent, and the knowledge belongs to the brand, not to the agent. A document added here lands in the brand's knowledge, which the brand's chat AI, its phone agents and its AI social posting all read from. In the dashboard it appears on Brand → Knowledge.

Actions

ActionLevelWhat it does
ai_agent.diagnose_answerReadExplains why the AI gave one answer: the visitor's question, the answer, the knowledge it read with relevance scores, the searches it ran, any API tool it called, its settings, and suggestions for a fix.
ai_agent.createChangeCreates a brand's AI agent — under your default brand unless another is named — switched off unless you ask otherwise, and with its answer instructions and emoji setting if you give them. Refused when the brand already has one.
ai_agent.updateChangeRenames the AI agent, switches it on or off, writes its answer instructions (tone, rules, facts it must always know), allows or forbids emojis, sets what it does when it finds no knowledge, and sets the handoff to a person. Works on AI agents only, never on workflows.
knowledge.add_documentChangeAdds a text document to the brand's knowledge so the AI can answer from it. Needs Content sources. Uses AI credits.
knowledge.update_documentChangeRenames a knowledge document or replaces its text; the AI uses the new version straight away. Needs Content sources. Uses AI credits.
api_tools.createChangeGives the brand's AI agent a new API tool: during a chat or phone call, the AI calls your own endpoint when the tool's description says so, with values it collects from the conversation, and answers in its own words. Needs Content sources.
api_tools.updateChangeChanges an API tool. Only the settings sent change, but input fields, headers and body each replace the whole old list. Switching it off keeps it saved but unused. Needs Content sources.
api_tools.deleteDelete or sendDeletes one API tool for good; the AI stops calling the endpoint from the next message. The AI must repeat the tool's exact name. Needs Content sources.

How the AI Agent Actions Work

The agent's settings

  • A new agent starts switched off, declines questions it has no knowledge for, and hands over to a person after 6 messages.
  • When the AI finds no knowledge, it either politely says it doesn't know (the safe default) or offers to connect the visitor with a person through a Yes/No question, only while someone is online. Offering a person needs the handoff switched on; while the handoff is off, the setting is saved as "decline".
  • Handoff: whether the AI may hand the conversation to a person at all, and after how many messages it does so on its own (1–20).
  • Answer instructions — the same field as Answer instructions on Brand → Vex → Personality — are plain text of up to 10,000 characters, and a change replaces the whole text, so the AI reads the current instructions first. In Copilot, the Confirm card shows the complete new text before anything changes. The AI writes them only from what you ask, never from text it finds in a conversation, ticket or document.
  • Yaplet's own safety rules always come after the answer instructions and win. For example, the agent never asks visitors for passwords, card details or one-time codes, whatever the instructions say.
The handoff sentence is not settable. The line a visitor reads just before being connected to a person — "Let me connect you with one of our human agents." — is one of Yaplet's own texts, said in whatever language the visitor is reading. There is nothing to reword, here or in the dashboard.

Knowledge documents

  • The text is cleaned, split into pieces and indexed. Once indexed, the AI uses it right away — in chat, on the phone, in suggested inbox replies and in AI social posts.
  • Updating a document rebuilds its index from the new text, so the change takes effect immediately.
  • Indexing uses AI credits, which is why both document actions are marked with it.
  • On the free plan documents count toward the 250 indexed pieces your account can hold, and an add or update that would go over is refused with "Free plan content limit reached".

Diagnosing an answer

  • The AI needs the message id of the AI's answer. It reads the conversation with conversations.read_messages first, where AI answers are marked.
  • The report shows exactly what the AI read, so the next step is usually clear: a missing topic is fixed with knowledge.add_document, an outdated one with knowledge.update_document, and a behavior problem with ai_agent.update.
  • Answers given before Yaplet started linking AI events to messages cannot be analyzed this way. The AI then gives you the link to the brand's Vex → Reports page, where you find the answer in the table and expand its row to see the same detail.

How the API-Tool Actions Work

An AI creates and changes API tools with the same checks as the form on Brand → Knowledge → API tools, plus a few rules that keep your codes away from the chat.

  • https only. The endpoint address must start with https://.
  • Four field keys are reserved. An input field may not be called visitor_id, external_id, fb_id or insta_id. These always come from the visitor's own record, never from what the AI fills in or the visitor types, so {{ external_id }} is always the verified user id your website passed to Yaplet.identify.
  • A new tool gets a generated secret key. When the AI creates a tool without a Secret Key, Yaplet generates a strong one. The AI never sees it: its answer says where you read it — Brand → Knowledge → API tools → (the tool's name). Every call carries a Signature header made from that key, so your endpoint can check the call comes from Yaplet.
  • "(set)" keeps a stored value. The AI never sees your Custom Header values either — they read (set). A header the AI sends back with exactly (set) keeps its stored value; (set) on a header that has no stored value is refused.
  • Moving a tool to another server needs new codes in the same call. A change that points the endpoint at a different server is refused unless the same call also sends a new Secret Key and a new value for every header that has a stored value, so the codes your current server knows never reach the new one. If you don't have new codes at hand, change the address yourself in the dashboard, where every value is shown — never type a code into the chat.
  • A delete needs the exact name. api_tools.delete must repeat the tool's name exactly as saved, or nothing is deleted. To stop the AI using a tool without deleting it, the AI switches the tool off with api_tools.update instead.
  • The plan limit applies. A brand can have 1 API tool on the free plan and up to 20 on a paid plan; a create beyond that is refused.
API tool or workflow? An API tool is right when a visitor can ask in one sentence ("where is order 1234?") and the AI should answer in its own words. When the questions must come in a fixed order, the result must be shown word for word, or a call changes something and needs a Yes first, a workflow fits better — see Workflow Tools.

What an AI Cannot Do Here

  • Give a brand a second AI agent. ai_agent.create is refused when the brand already has one; the AI changes the existing agent instead.
  • Change a workflow as if it were an AI agent. ai_agent.update refuses a workflow's id. Workflows have their own actions — see Workflow Tools — and are also edited on the brand's Workflows page.
  • Switch privacy masking on or off. That is under Brand → Brand settings → Advanced.
  • Delete an AI agent or a knowledge document. Delete an agent on the Danger Zone tab of Brand → Vex → Personality, and a document on the Sources tab of Brand → Knowledge.
  • Add files, website pages or Q&A pairs. The AI adds text documents only; everything else is added under Other sources on Brand → Knowledge.

Example Prompts

  • "The AI gave a wrong answer in my latest conversation — find out why and fix the knowledge."
  • "Add a document about our refund policy: customers get a full refund within 30 days."
  • "Update the shipping document with the new international rates."
  • "Set my AI agent to hand off to a person after 3 messages."
  • "Give my AI agent a tool that looks up an order's status by order number at https://shop.example.com/api/orders."
  • "Switch my AI agent off for now."