> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chatsyncs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Create Your First AI Agent in ChatSyncs

> Step-by-step: turn on ChatSyncs' AI Agents, create your first named agent with a Name, Description, and System Prompt, add Knowledge Sources, then switch it on for your bot.

This page walks through the whole path from a blank bot to a working AI agent: turning the
system on, creating a named agent with its own instructions and knowledge, and switching it on
so it can actually reply to customers.

## Turn on AI Agents

<Frame>
  <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-agent/step-01-ai-configuration-overview.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=154e0b38bbb2ab1ec48d12cbe88c74d6" alt="Chatbot Manager tab bar with AI selected, the AI Configuration sub-tab active, the AI Agent toggle enabled with Create Agent and Refresh buttons, and an Agent Routing table with an Add Rule button" width="1072" height="625" data-path="images/learn/whatsapp-ai-agent/step-01-ai-configuration-overview.png" />
</Frame>

<Steps>
  <Step title="Open Chatbot Manager">
    Select **Chatbot Manager**.
  </Step>

  <Step title="Open the AI tab">
    Select **AI**, then the **AI Configuration** sub-tab.
  </Step>

  <Step title="Turn it on">
    Turn on the **AI Agent** toggle — *"AI agents are active and ready to assist."*
  </Step>
</Steps>

The **AI Assistant Overview** card on the right summarizes the setup at a glance: **Active
Agents**, **Agent Routing** rule count, **Response Mode**, **Contextual Memory**, **Restricted
Topics** count, and **AI Reasoning Level**.

<Tip>
  Turning the toggle on doesn't make anything reply yet — you still need to create an agent
  (next section) and then activate it. Think of this toggle as the master power switch, and the
  steps below as building and plugging in the actual worker.
</Tip>

## Create your first AI agent

<Frame>
  <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-agent/step-04-agents-list.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=6d9e76220949e2cfedf7f7d74c139c3c" alt="Agents tab with the AI Agents list — columns for Agent, Knowledge Sources, Status, and Actions — and a Create Agent button; shown here with no agents created yet" width="1434" height="445" data-path="images/learn/whatsapp-ai-agent/step-04-agents-list.png" />
</Frame>

<Steps>
  <Step title="Open the Agents tab">
    In **Chatbot Manager → AI**, select the **Agents** sub-tab. Every agent you've built appears
    here with its knowledge source count and status.
  </Step>

  <Step title="Click Create Agent">
    Opens the **Create AI Agent** form.

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-agent/step-05-create-agent-name-slug.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=a9e486e6156eb9fb66f97db22b9fcb12" alt="Create AI Agent form with Name, Slug (placeholder sales-agent, auto-generated from name if empty), and Status set to Active" width="1417" height="260" data-path="images/learn/whatsapp-ai-agent/step-05-create-agent-name-slug.png" />
    </Frame>
  </Step>

  <Step title="Name it">
    Give it a clear **Name**, e.g. `Sales Advisor Agent`. The **Slug** auto-generates from the
    name if you leave it empty (e.g. `sales-agent`) — this is the internal identifier used when
    referencing the agent elsewhere (like [transferring a conversation to
    it](/learn/chatsyncs-ai-agents/ai-agent-actions-in-chatsyncs)).
  </Step>

  <Step title="Describe what it does (optional)">
    <Frame>
      <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-agent/step-05b-description-field.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=430a5168d256a4d5e1c05d4140f95ee0" alt="Description field with placeholder text: e.g., Helps customers with product information and purchases" width="1384" height="211" data-path="images/learn/whatsapp-ai-agent/step-05b-description-field.png" />
    </Frame>

    A short internal note, e.g. *"Helps customers with product information and purchases."* —
    this doesn't affect behavior, it's just for your own reference in the Agents list.
  </Step>

  <Step title="Write the System Prompt">
    <Frame>
      <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-agent/step-06-create-agent-system-prompt.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=8add5ee7f8e26b4b11c3f4792f0e0f7a" alt="System Prompt field with placeholder text: You are the Sales AI Agent. Help customers purchase products, and a note that typing ## autocompletes actions" width="1405" height="246" data-path="images/learn/whatsapp-ai-agent/step-06-create-agent-system-prompt.png" />
    </Frame>

    The **System Prompt** is the agent's core instructions — its role, tone, and boundaries. A
    vague prompt like *"You are a sales agent, help customers buy things"* produces a mediocre
    agent. A strong one is specific about the role, what information to collect, the conversation
    rules, and exactly which actions to run and when.

    **Full example**, for the `Sales Advisor Agent` created above:

    ```text theme={null}
    You are the Senior Sales Agent for [Your Business].

    ROLE
    Understand the customer's needs, recommend the right plan, and qualify them as a lead.
    Be professional, persuasive, and helpful.

    REQUIRED INFORMATION
    Before recommending a plan, naturally collect:
    1. Business type
    2. Primary communication channel
    3. Main requirement
    4. Expected monthly volume
    5. Approximate budget

    CONVERSATION RULES
    - Ask only one or two questions at a time.
    - Don't repeat questions already answered.
    - Never invent pricing or features not in your training data.

    SAVE INFORMATION
    When the customer mentions their budget, save it:
    ##save_custom_field##: Budget

    QUALIFICATION & ACTIONS
    Once you've collected the required info and the customer shows clear intent to buy:
    ##add_label##: Qualified Lead

    If they're interested but need more time:
    ##assign_sequence##: Sales Follow-Up

    HUMAN HANDOFF
    If they ask about enterprise or custom pricing, or explicitly ask for a human:
    ##add_label##: Sales Escalation
    ##assign_human_role##: 3
    ```

    The pattern to notice: **plain instruction, then the `##action##` it triggers, right below
    it.** That's what turns a passive chatbot into a digital worker that actually completes
    tasks.

    Two more patterns, so you can see how the shape of a prompt changes with the job:

    A **Support Agent** — simpler, focused entirely on answer-or-escalate:

    ```text theme={null}
    You are the Customer Support Agent for [Your Business].

    ROLE & KNOWLEDGE USAGE
    Answer questions about features, policies, and troubleshooting from your connected
    Knowledge Source. Be patient, clear, and empathetic.

    HUMAN HANDOFF (ESCALATION)
    If the customer reports a billing issue, has an unresolved technical problem after
    troubleshooting, or explicitly asks for a human, escalate:
    ##add_label##: Escalated Support
    ##assign_human_role##: 5
    ```

    A **Media Agent** — no data collection at all, just conditional photo delivery:

    ```text theme={null}
    You are the Agent for Sending Product Photos for [Your Business].

    ROLE
    Provide accurate product images. Keep text brief — let the images do the talking.

    CONDITIONAL DELIVERY RULE (CRITICAL)
    Never send images automatically at the start of a conversation. Hold them in reserve and
    deliver them only when a customer explicitly asks to see a photo.

    KNOWLEDGE USAGE
    When a customer asks for a specific product ("show me the red kurti"), fetch the matching
    image and description from your connected Knowledge Source.
    ```

    Because the Support Agent collects context before escalating, the human teammate who picks up
    the conversation already has what they need — no re-asking the customer to explain the issue
    again.

    <Warning>
      **Only one confirmed way to send images from an agent:** upload them under **Knowledge
      Sources → Media**, in the next step below, with a description for each — not by typing image
      URLs into the System Prompt. This is what ChatSyncs' own System Prompt Actions reference
      confirms.
    </Warning>

    One agent per job is the pattern here — see [How Do I Build a Multi-Agent AI
    Workforce?](/learn/chatsyncs-ai-agents/build-a-multi-agent-ai-workforce-with-chatsyncs) for how these three agents work together with
    Knowledge Sources, Agent Routing, and a testing checklist once you're ready to go beyond a
    single agent.

    While typing, you don't have to remember the exact `##action_name##` syntax — type `##` in the
    box to autocomplete an action, then pick a label/sequence/etc. from the list that appears:

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-agent/step-06b-system-prompt-actions-popup-1.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=81ba2d5b6157ec3bd1b593e45b619abf" alt="How to write actions in System Prompt popup, listing add_label, remove_label, assign_sequence, remove_sequence, save_custom_field, call_http_api, and the Shopify actions with their ##action_name##: id format" width="766" height="784" data-path="images/learn/whatsapp-ai-agent/step-06b-system-prompt-actions-popup-1.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-agent/step-06c-system-prompt-actions-popup-2.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=c16254c4fd59c4e6e2722dd13277eb8b" alt="How to write actions in System Prompt popup continued, listing the WooCommerce actions, assign_human_member, assign_human_role, trigger_bot_flow, transfer_agent, mark_as_solved, block_subscriber, and skip_reply" width="772" height="810" data-path="images/learn/whatsapp-ai-agent/step-06c-system-prompt-actions-popup-2.png" />
    </Frame>

    This is only a quick reference while you're typing — see [AI Agent
    Actions](/learn/chatsyncs-ai-agents/ai-agent-actions-in-chatsyncs) for the full list with examples and how each one behaves.
  </Step>

  <Step title="Add Knowledge Sources">
    Right now, your agent can only work from the System Prompt you just wrote — it has no real
    business knowledge yet. If a customer asks something specific, like *"are you open on
    Sunday?"* or *"do you have this in red?"*, it has nothing to answer from. **Knowledge
    Sources** fix that: they're where you feed the agent your actual business information, so it
    answers from real facts instead of guessing.

    Scroll down on the same **Create AI Agent** form to the **Knowledge Sources** panel:

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-08-knowledge-sources-panel.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=d2d3b8b4a9fae2bdf4829455ff3a740b" alt="Knowledge Sources panel with a Knowledge Set dropdown and six source type buttons: Content, URL, File, Media, Google Sheet, and API" width="1364" height="285" data-path="images/learn/whatsapp-ai-knowledge-base/step-08-knowledge-sources-panel.png" />
    </Frame>

    First, give this knowledge a home: open **Knowledge Set** and either pick one you already
    made, or create a new one by typing a name for it — think of a Knowledge Set as a folder that
    can hold several pieces of training material at once. Everything you add below gets saved
    into whichever Knowledge Set is selected, and the agent reads all of it together when it
    answers.

    Once you have a Knowledge Set, there are six buttons for the six ways to fill it — use as
    many as you need:

    **Content** is the simplest one: a plain text box where you type or paste information
    directly, like your business hours or return policy.

    ```text theme={null}
    We're open Monday to Saturday, 10 AM to 8 PM. We're closed on Sundays and public holidays.
    Returns are accepted within 7 days of delivery, as long as the product is unused.
    ```

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-03-add-content-faq.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=b02022079bc68f1258bbed6cb7a6770c" alt="Content panel with a single text box: Write the content your agent should learn from..." width="1363" height="461" data-path="images/learn/whatsapp-ai-knowledge-base/step-03-add-content-faq.png" />
    </Frame>

    **URL** lets you point at a page you've already written — an FAQ page, a pricing page — and
    ChatSyncs reads its content instead of you retyping it. Paste the link in **Campaign URL**:

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-04-add-url.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=dd72fe2bb6524b9e42e78086a1d3efa1" alt="URL panel with a Campaign URL field, Fetch Content Configuration selectors, and Remove Content Configuration selectors, plus Generate Raw Response and Generate FAQ buttons" width="1333" height="704" data-path="images/learn/whatsapp-ai-knowledge-base/step-04-add-url.png" />
    </Frame>

    If the page has content you don't want included — a header, footer, or ad banner — two
    optional settings let you fine-tune what gets read. **Fetch Content Configuration** pulls in
    *only* one part of the page (pick `ID` or `Class` as the **Selector Type**, then enter that
    exact ID or class name from the page's code):

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-04b-url-selector-type-options.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=8739bd7e7226c6e68ddc8cf7ca4832ca" alt="Selector Type dropdown open showing ID and Class options" width="1333" height="587" data-path="images/learn/whatsapp-ai-knowledge-base/step-04b-url-selector-type-options.png" />
    </Frame>

    **Remove Content Configuration** does the opposite — it excludes sections you list, and you
    can click **+ Add Remove Selector** to exclude more than one:

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-04c-url-remove-content-selectors.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=19b413df2c26cbd3adf920512707cbdb" alt="Remove Content Configuration with two Selector Type / Selector Name rows and an Add Remove Selector button" width="1321" height="339" data-path="images/learn/whatsapp-ai-knowledge-base/step-04c-url-remove-content-selectors.png" />
    </Frame>

    Once the page loads, choose **Generate Raw Response** to keep it as one detailed block, or
    **Generate FAQ** to automatically split it into short question-and-answer pairs instead.

    **File** works the same way, but from a document instead of a webpage — upload a **PDF**,
    **Word** (`.doc`/`.docx`), **Excel** (`.xls`/`.xlsx`), **CSV**, **OpenDocument**
    (`.ods`/`.odt`), or **TXT** file, like a product catalog or a training manual:

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-05-add-file.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=a96c20de62d00f9710228d0e16dc843d" alt="File panel with an Upload button, and accepted formats listed: PDF, Word (.doc, .docx), Excel (.xls, .xlsx), CSV, OpenDocument (.ods, .odt), TXT" width="1334" height="380" data-path="images/learn/whatsapp-ai-knowledge-base/step-05-add-file.png" />
    </Frame>

    **Media** is how the agent learns to send photos, not just text. Add an **Image URL** (or
    click **Upload**) and write a short **Description** — this description is what tells the
    agent *when* to send that exact photo, so be specific about what makes it recognizable:

    ```text theme={null}
    Red cotton kurti, size M, price 1200 BDT
    ```

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-06-add-media.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=0556f40ca5f30d008a85a56dfa462d64" alt="Media panel with an Image URL field, an Upload button, and a Description field with placeholder text: e.g. Red cotton kurti, size M, price 1200 BDT" width="1319" height="401" data-path="images/learn/whatsapp-ai-knowledge-base/step-06-add-media.png" />
    </Frame>

    With that saved, a customer asking *"do you have this in red?"* gets sent that exact photo
    automatically. Click **+ Add more image** to attach as many as you need:

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-agent/step-07e-media-add-more-image.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=4f808b9ca1faa539de020af0b04bdddb" alt="Media panel with the Add more image button highlighted" width="1308" height="409" data-path="images/learn/whatsapp-ai-agent/step-07e-media-add-more-image.png" />
    </Frame>

    **Google Sheet** connects a spreadsheet you've already linked under [How to Connect Google
    to ChatSyncs](/learn/chatsyncs-integrations/connect-google-to-chatsyncs) — pick it from the dropdown, which lists
    every sheet available to your connected Google account:

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-07-add-google-sheet.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=d7391c753df5e7fb6010569550c8d45b" alt="Select a Sheet dropdown open, showing a connected Google account and its available sheets" width="1351" height="414" data-path="images/learn/whatsapp-ai-knowledge-base/step-07-add-google-sheet.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-knowledge-base/step-07b-google-sheet-selected.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=a33f203753cd829a6244ba18544faa5a" alt="Google Sheet panel with a sheet selected under Import From Google Sheet, and a Save button" width="1333" height="191" data-path="images/learn/whatsapp-ai-knowledge-base/step-07b-google-sheet-selected.png" />
    </Frame>

    **API**, the last option, isn't shown as a screenshot here since it's just a dropdown — pick
    one of your already-configured [HTTP APIs](/learn/chatsyncs-integrations/http-api-integration-in-chatsyncs), and the agent pulls
    fresh data straight from that endpoint's response each time, instead of storing anything
    static.

    <Tip>
      You don't have to pick just one type. A single Knowledge Set can hold Content, a URL, a
      File, and Media all together — the agent uses everything in it to answer.
    </Tip>

    See [How to Train Your AI Chatbot](/learn/chatsyncs-ai-agents/train-your-ai-chatbot-in-chatsyncs) for the full reference
    page on every source type, including its own FAQ and troubleshooting.
  </Step>

  <Step title="Save">
    The agent now appears in the **Agents** list and in the **Active Agents** dropdown back on
    **AI Configuration**.
  </Step>
</Steps>

## Turn your new agent on

Creating an agent doesn't make it start replying — it still needs to be switched on for this
bot, back on the **AI Configuration** sub-tab.

<Frame>
  <img src="https://mintcdn.com/chatsyncs/sAsjFfzcUITpKpey/images/learn/whatsapp-ai-agent/step-02-active-agents-dropdown.png?fit=max&auto=format&n=sAsjFfzcUITpKpey&q=85&s=3da800587e926b742323e3970d007d0b" alt="Active Agents multi-select dropdown listing Order Status Agent, Sales Advisor Agent, and WhatsApp Marketing Agent" width="1466" height="613" data-path="images/learn/whatsapp-ai-agent/step-02-active-agents-dropdown.png" />
</Frame>

<Steps>
  <Step title="Go back to AI Configuration">Select the **AI Configuration** sub-tab again.</Step>
  <Step title="Open Active Agents">Click the **Active Agents** field — it's a multi-select, so you can turn on more than one agent for the same bot.</Step>
  <Step title="Pick your new agent">Select the agent you just created. If it's not in the list, click **Refresh**.</Step>
</Steps>

Only agents added here can actually reply to customers — everything you did in the previous
section just *built* the agent, this step is what *switches it on* for this bot.

If you activate more than one agent, [Agent Routing](/learn/chatsyncs-ai-agents/agent-routing-in-chatsyncs) is what decides
which one answers a given customer message.

## Frequently asked

<AccordionGroup>
  <Accordion title="What's the difference between the Slug and the Name?">
    **Name** is what you see in the UI. **Slug** is the internal identifier (auto-generated from
    the name if left empty) used to reference this agent elsewhere, like in a `transfer_agent`
    action — see [AI Agent Actions](/learn/chatsyncs-ai-agents/ai-agent-actions-in-chatsyncs).
  </Accordion>

  <Accordion title="I created an agent but it's not answering anything — why?">
    Check three things: it's added to **Active Agents** on the AI Configuration tab, the **AI
    Agent** toggle is on, and it has at least one knowledge source attached — see [How to Train
    Your AI Chatbot](/learn/chatsyncs-ai-agents/train-your-ai-chatbot-in-chatsyncs) — if it's meant to answer from trained
    content rather than just its System Prompt.
  </Accordion>

  <Accordion title="Do I need more than one agent?">
    No — a single agent with a broad System Prompt and one Knowledge Set works fine for most
    bots. Multiple agents are worth it once different types of questions need very different
    instructions or actions — see [How Do I Build a Multi-Agent AI
    Workforce?](/learn/chatsyncs-ai-agents/build-a-multi-agent-ai-workforce-with-chatsyncs).
  </Accordion>
</AccordionGroup>

## Related Documentation

* [AI Agents](/learn/chatsyncs-ai-agents/introduction) — the section overview, and what to build next.
* [How to Train Your AI Chatbot](/learn/chatsyncs-ai-agents/train-your-ai-chatbot-in-chatsyncs) — the full Knowledge Source
  reference.
* [AI Agent Actions](/learn/chatsyncs-ai-agents/ai-agent-actions-in-chatsyncs) — the full `##action##` syntax reference.
