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

# AI Agent setup guide

> Go from a license key to an AI agent answering your Discord tickets.

Setting up takes about 15 minutes. You need four things:

* An EchoAuth AI Agent **license key**. [Buy one in the shop](https://shop.echoauth.dev/product/echos-ai-agent-hosted) if you don't have one yet.
* A **Discord server** where you can add bots and manage roles.
* An **[OpenRouter](https://openrouter.ai) API key**. One OpenRouter key covers everything the agent needs: answers, screenshots and search.
* Optionally, a **docs site** or some written documentation for the agent to answer from.

We host your agent and keep it running. You set it up from the dashboard at [agent.echoauth.dev](https://agent.echoauth.dev).

<Info>
  **Recommended setup.** Long-term testing was done with OpenRouter only, using these three models:

  | Role | Model |
  | - | - |
  | Chat / Agent | `deepseek/deepseek-v4-flash-0731` |
  | Embedding | `qwen/qwen3-embedding-8b` |
  | Vision (image detection) | `nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free` |

  Other providers (NVIDIA, OpenAI, Anthropic) are available in the dashboard, but this is the combination we've tested over time.
</Info>

## 1. Create your account

<Steps>
  <Step title="Open the registration page">
    Go to [agent.echoauth.dev/register](https://agent.echoauth.dev/register).
  </Step>

  <Step title="Enter your license key">
    Paste the key from your purchase email. It looks like `ECHO-XXXX-XXXX-XXXX-XXXX`.
  </Step>

  <Step title="Choose a username and password">
    Your password needs at least 8 characters. Click **Create account**.
  </Step>
</Steps>

<Frame caption="The registration page">
  <img src="https://mintcdn.com/echoauth/cLGTi81QYaoRs3IW/images/ai-agent-setup/01-register.png?fit=max&auto=format&n=cLGTi81QYaoRs3IW&q=85&s=572419f600e4182cf06122e903cf3aa6" alt="Registration form with license key, username and password fields" width="1440" height="900" data-path="images/ai-agent-setup/01-register.png" />
</Frame>

Once your license is active, your agent is created for you. You land on the dashboard, where you'll see the agent, your license and usage stats.

<Frame caption="The dashboard after signing in">
  <img src="https://mintcdn.com/echoauth/cLGTi81QYaoRs3IW/images/ai-agent-setup/02-dashboard.png?fit=max&auto=format&n=cLGTi81QYaoRs3IW&q=85&s=2397a77fc1428106e09dcbc3b2869dab" alt="Dashboard showing one agent, license status and usage" width="1440" height="900" data-path="images/ai-agent-setup/02-dashboard.png" />
</Frame>

<Note>
  If **No agents yet** is showing, open **License** in the sidebar and check that your license is active.
</Note>

Click your agent to open its page. Everything else in this guide starts from here: **Configure** opens the settings, **Live logs** shows what the agent is doing, and **Update Agent** applies settings that need a redeploy.

<Frame caption="The agent page">
  <img src="https://mintcdn.com/echoauth/cLGTi81QYaoRs3IW/images/ai-agent-setup/03-agent.png?fit=max&auto=format&n=cLGTi81QYaoRs3IW&q=85&s=6c4ca792bd16efd8e9e175519f337123" alt="Agent page with Configure, Live logs, Restart and Update Agent" width="1440" height="900" data-path="images/ai-agent-setup/03-agent.png" />
</Frame>

## 2. Create your Discord bot

Your agent answers through a Discord bot that belongs to you. Create one in the Discord Developer Portal.

<Steps>
  <Step title="Create an application">
    Open the [Discord Developer Portal](https://discord.com/developers/applications) and click **New Application**. Name it after your support agent, for example "Acme Support".
  </Step>

  <Step title="Turn on the Message Content intent">
    Go to **Bot**. Under **Privileged Gateway Intents**, turn on **Message Content Intent** and save.

    <Warning>
      Without this intent, the bot receives empty messages and never replies.
    </Warning>
  </Step>

  <Step title="Copy the bot token">
    Still on **Bot**, click **Reset Token** and copy the token. You'll paste it into the dashboard in the next section. Keep it private: anyone with the token can control your bot.
  </Step>

  <Step title="Invite the bot to your server">
    Go to **OAuth2** → **URL Generator**. Tick the scopes `bot` and `applications.commands`, then these bot permissions:

    * View Channels
    * Send Messages
    * Read Message History
    * Embed Links
    * Attach Files

    Open the generated URL and add the bot to your server.
  </Step>

  <Step title="Give the bot access to your ticket category">
    Make sure the bot's role can see the category your ticket channels are created in. If it can't see the channel, it can't answer.
  </Step>
</Steps>

## 3. Add your keys

Create an API key at [openrouter.ai/keys](https://openrouter.ai/keys) and add some credit to your OpenRouter account. The vision model is free, but the chat and embedding models are paid per use.

Then, on your agent page, click **Configure** and open the **API Keys** tab.

<Frame caption="The API Keys tab, with the OpenRouter key and Discord bot token configured">
  <img src="https://mintcdn.com/echoauth/cLGTi81QYaoRs3IW/images/ai-agent-setup/04-keys.png?fit=max&auto=format&n=cLGTi81QYaoRs3IW&q=85&s=635dd8eb112950e6f74cfdc24c4f5664" alt="API Keys tab showing the OpenRouter API key and Discord bot token marked as configured" width="736" height="872" data-path="images/ai-agent-setup/04-keys.png" />
</Frame>

1. Paste your key into **OpenRouter API Key**.
2. Paste your **Discord Bot Token**.
3. Click **Save**.

You can leave the OpenAI, Anthropic and NVIDIA fields empty. Keys are stored encrypted and are never shown again after saving. A **configured** badge confirms that a key is set.

## 4. Choose your AI models

Open the **AI Settings** tab. The agent uses three models. Set all three to **OpenRouter** and pick the recommended models:

| Setting | What it does | Provider | Model |
| - | - | - | - |
| **Chat / Agent Model** | Writes the answers and decides what to look up in your docs. | OpenRouter | `deepseek/deepseek-v4-flash-0731` |
| **Vision Model** | Reads screenshots that customers attach to tickets. | OpenRouter | `nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free` |
| **Embedding Model** | Indexes your documentation and searches it. | OpenRouter | `qwen/qwen3-embedding-8b` |

<Frame caption="The AI Settings tab with the recommended OpenRouter models">
  <img src="https://mintcdn.com/echoauth/cLGTi81QYaoRs3IW/images/ai-agent-setup/05-ai.png?fit=max&auto=format&n=cLGTi81QYaoRs3IW&q=85&s=9c43f2bab0d0ade4e7a897f04f0a21f0" alt="AI Settings tab with OpenRouter selected for chat, vision and embedding models" width="736" height="872" data-path="images/ai-agent-setup/05-ai.png" />
</Frame>

<Note>
  Under the embedding model, the dashboard warns that it's above 2000 dimensions. That's expected for `qwen/qwen3-embedding-8b`. Search still works: it checks every passage instead of using an index, which stays fast for a knowledge base of a few thousand passages.
</Note>

Then write your **Base Prompt**. This is the agent's standing instructions: who it works for, the tone to use, and what it should never do. For example:

```text theme={null}
You are the support agent for Acme Store. Be friendly and concise.
Answer only from the documentation. If you are not sure, ask a staff member to step in.
```

<Warning>
  Pick your embedding model before you index anything. Changing it later makes the existing index unusable until you rebuild it.
</Warning>

## 5. Connect it to your tickets

Open the **Discord** tab. These settings tell the agent where to answer and who counts as staff.

<Frame caption="The Discord tab">
  <img src="https://mintcdn.com/echoauth/cLGTi81QYaoRs3IW/images/ai-agent-setup/06-discord.png?fit=max&auto=format&n=cLGTi81QYaoRs3IW&q=85&s=43f9146b21aa094f8d7629f409930f57" alt="Discord tab with owner roles, staff roles, ticket category IDs, ticket bot IDs and image models" width="736" height="872" data-path="images/ai-agent-setup/06-discord.png" />
</Frame>

To copy IDs, turn on **Developer Mode** in Discord under **User Settings** → **Advanced**. Then right-click a role, category or user and choose **Copy ID**.

<AccordionGroup>
  <Accordion title="Owner Role IDs" icon="crown">
    Roles that can use every slash command, including `/pause_bot` and `/edit_base`. Separate several IDs with commas.
  </Accordion>

  <Accordion title="Staff Role IDs" icon="user-shield">
    Your support team's roles. When a staff member writes in a ticket, the agent steps back and stays quiet in that ticket. To bring it back, mention the bot in the ticket or use `/restart` there.
  </Accordion>

  <Accordion title="Ticket Category IDs" icon="folder">
    The categories your ticket channels are created in. The agent only answers inside these categories.
  </Accordion>

  <Accordion title="Ticket Bot IDs" icon="robot">
    The user ID of your ticket bot, such as Ticket Tool or SellAuth Tickets. The agent ignores other bots, so add yours here to let the agent read the ticket's opening message.
  </Accordion>

  <Accordion title="Image Models" icon="image">
    Backup vision models, one per line, tried in order if the vision model from AI Settings fails. Put this fallbacks:<br />`nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free`<br />`google/gemma-4-31b-it:free`<br />`google/gemma-4-26b-a4b-it:free`<br />`thinkingmachines/inkling-small:free`<br />`dots-studio/dots-3-note-preview:free`
  </Accordion>
</AccordionGroup>

Click **Save**.

## 6. Give the agent your documentation

Open the **Knowledge Base** tab. The agent answers from two sources, and you can use either or both.

<Frame caption="The Knowledge Base tab">
  <img src="https://mintcdn.com/echoauth/cLGTi81QYaoRs3IW/images/ai-agent-setup/07-knowledge.png?fit=max&auto=format&n=cLGTi81QYaoRs3IW&q=85&s=18150d070975d8635a2a87c251b04dfa" alt="Knowledge Base tab with the Index documentation button, Docs URL and internal knowledge base" width="736" height="1291" data-path="images/ai-agent-setup/07-knowledge.png" />
</Frame>

<Tabs>
  <Tab title="Docs site">
    Use this if your documentation is published on Mintlify.

    1. Enter your **Docs URL**, for example `https://docs.acme-store.com`, without a trailing slash. The site must serve `/llms.txt`, which Mintlify does automatically.
    2. Click **Save**, then go to your agent page and click **Update Agent**.
    3. Back on this tab, click **Index documentation**. A few hundred pages take a couple of minutes, and you can leave the page while it runs.

    With **Sync Mode** set to **Poll llms.txt hourly**, the agent checks your docs every hour and re-indexes only the pages that changed.
  </Tab>

  <Tab title="Internal knowledge base">
    Use this for anything not on a docs site: FAQs, policies, error codes.

    1. Scroll to **Internal Knowledge Base**.
    2. Paste your text, or click **Load file** and choose a `.txt` or `.md` file.
    3. Click **Save**.

    The agent indexes it within about a minute. Plain text is fine: headings in ALL CAPS or between lines of `=====` become searchable sections.
  </Tab>
</Tabs>

Leave **Documentation Retrieval** and **Agentic Retrieval** on. With retrieval on, the agent looks up only the passages relevant to each question instead of reading everything every time.

## 7. Set reply timing and escalation

Open the **Behavior** tab.

<Frame caption="The Behavior tab">
  <img src="https://mintcdn.com/echoauth/cLGTi81QYaoRs3IW/images/ai-agent-setup/08-behavior.png?fit=max&auto=format&n=cLGTi81QYaoRs3IW&q=85&s=14df915b4ac0f9860f6e3a6b3a61d318" alt="Behavior tab with reply timing and human help keywords" width="736" height="872" data-path="images/ai-agent-setup/08-behavior.png" />
</Frame>

The agent waits until the customer has stopped typing, then answers everything in one reply. Each new message restarts the timer.

| Setting | Default | Meaning |
| - | - | - |
| After ticket opens | 45 s | Wait after the first message, since customers often add details or screenshots. |
| After each message | 30 s | Quiet time needed after later messages before replying. |
| Maximum wait | 180 s | Reply after this long even if the customer keeps typing. |

Under **Human Help Keywords**, list words that should hand the ticket to your team, one per line. For example `refund`, `chargeback` or `real person`.

## 8. Get alerts (optional)

Open the **Notifications** tab and paste the ID of a private staff channel. The agent posts there when your license is about to expire and when an AI provider rejects your key or runs out of quota.

<Frame caption="The Notifications tab">
  <img src="https://mintcdn.com/echoauth/cLGTi81QYaoRs3IW/images/ai-agent-setup/09-notifications.png?fit=max&auto=format&n=cLGTi81QYaoRs3IW&q=85&s=5906f4bf0dbdf4fa308c4958553bded2" alt="Notifications tab with the notification channel ID" width="736" height="872" data-path="images/ai-agent-setup/09-notifications.png" />
</Frame>

## 9. Start the agent

Go back to your agent page and click **Update Agent**. This redeploys the agent with your bot token, docs URL and embedding model. The output appears below the button while it runs.

<Info>
  Most settings reach the running agent within about a minute, with no redeploy. You only need **Update Agent** after changing the **Discord Bot Token**, **Docs URL**, **Embedding Model** or **Sync Mode**.
</Info>

To check that everything works:

1. Open a test ticket in your server and ask a question your docs answer.
2. Open **Live logs** on your agent page and watch the agent receive the message, search your docs and reply.

<Frame caption="Live logs">
  <img src="https://mintcdn.com/echoauth/cLGTi81QYaoRs3IW/images/ai-agent-setup/11-logs.png?fit=max&auto=format&n=cLGTi81QYaoRs3IW&q=85&s=18d1bd77e85407858cd81751cd36388e" alt="Live logs showing the agent start, sync, search the docs and reply in a ticket" width="1440" height="900" data-path="images/ai-agent-setup/11-logs.png" />
</Frame>

The status badge on your agent reads **Online** when it is running.

## Slash commands

Once the agent is in your server, owners and staff can control it from Discord.

| Command | Who | What it does |
| - | - | - |
| `/stop` | Owner, staff | Stop the agent replying in this channel. |
| `/restart` | Owner, staff | Let the agent reply in this channel again. |
| `/mute_existing` | Owner, staff | Stop the agent in every ticket that is already open. |
| `/pause_bot` | Owner | Pause the agent everywhere. |
| `/resume_bot` | Owner | Resume the agent everywhere. |
| `/edit_base` | Owner | Edit the base prompt. |
| `/chat_model` | Owner | Change the chat model. |

You can also pause the agent from the dashboard with **Global Bot Pause** on the **Discord** tab.

## Keep your license active

Your agent stays online while your license is active. The **License** page shows the days left and your expiry date.

<Frame caption="The License page">
  <img src="https://mintcdn.com/echoauth/cLGTi81QYaoRs3IW/images/ai-agent-setup/10-license.png?fit=max&auto=format&n=cLGTi81QYaoRs3IW&q=85&s=62db270604520c9a0c2815db6201b908" alt="License page with status, days remaining and available plans" width="1440" height="900" data-path="images/ai-agent-setup/10-license.png" />
</Frame>

To renew, buy a new key in the [shop](https://shop.echoauth.dev/product/echos-ai-agent-hosted), click **Renew license** and paste the key. The time is added to your current license.

## Troubleshooting

<AccordionGroup>
  <Accordion title="The bot is online but never replies">
    * Check that **Message Content Intent** is on in the Discord Developer Portal.
    * Check that the ticket's category ID is in **Ticket Category IDs**.
    * Check that the bot can see and send messages in that category.
    * Check that a staff member hasn't already written in the ticket. Mention the bot or use `/restart` to bring it back.
    * Check that **Global Bot Pause** is off.
  </Accordion>

  <Accordion title="The bot ignores the ticket's opening message">
    Add your ticket bot's user ID to **Ticket Bot IDs** on the **Discord** tab.
  </Accordion>

  <Accordion title="The agent isn't using my documentation">
    Open the **Knowledge Base** tab. If it says **Documentation is not indexed yet**, click **Index documentation**. If it says **The index does not match the embedding model**, click **Clear and rebuild the index**, or set the embedding model back to the one shown and save.
  </Accordion>

  <Accordion title="Replies or indexing fail with an OpenRouter error">
    Check that your OpenRouter account has credit and that the key on the **API Keys** tab is still valid. Free models such as the vision model can be rate-limited at busy times; the agent then falls back to the next model in **Image Models**.
  </Accordion>

  <Accordion title="The agent stopped responding">
    Open **Live logs** and look for errors, for example an invalid key or exhausted credit. Then click **Restart** on the agent page. If that doesn't help, click **Update Agent**.
  </Accordion>
</AccordionGroup>
