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

# Reference

> Let Aiko know about your server

Reference material is Aiko's source of truth for server-specific questions — FAQs, rules, product info, announcements, or anything else Aiko should answer from. A server can combine three kinds at once: Discord channels, uploaded documents, and web links.

There are three ways to feed reference material.

## Reference Channels

`/settings` → Reference → **Manage** button → **Reference channels** field → pick channels or a category → submit

Picking a whole category expands to every text channel inside it. For each selected channel, Aiko:

* Reads up to 500 recent messages
* Keeps up to 40,000 characters, favoring the newest content
* Skips Aiko's own messages and empty messages
* Combines multiple channels under channel headings

<Tip>
  New messages in a selected channel trigger an automatic re-sync after about 15 seconds of inactivity. You don't need to resubmit the form every time the channel changes.
</Tip>

<Note>
  Submitting this field always replaces the **whole** channel list with whatever's selected at submit time — it's not additive. Clearing every channel and submitting removes the channel-based reference entirely (uploads and links are untouched).
</Note>

### Add or Remove a Single Message

Right-click any message → **Apps** → **Add to Reference** / **Remove from Reference**

Lets you include or exclude one specific message without touching the channel list as a whole — useful for pulling in a message from a channel you haven't fully added, or excluding one noisy message from a channel you have.

<Info>
  Both context commands require Discord's **Manage Server** permission (or this server's admin role) — same as everything else on this page.
</Info>

## Upload Documents

`/settings` → Reference → **Manage** button → **Reference documents** field → attach file(s) → submit

Plain-text formats only (`.txt`, `.md`, `.csv`, `.json`, and similar).

<Warning>
  There's currently no button to remove an uploaded document. Uploading a new file with the **exact same name** as an existing one replaces its content — that's the only way to update or effectively retire one. There's no way to delete an upload outright and drop it from the count.
</Warning>

## Document Links

`/settings` → Reference → **Manage** button → **Document links** field → one URL per line → submit

Aiko fetches each URL's readable content (stripped of navigation/boilerplate) and folds it into the reference material the same way a channel or upload is.

* Each link's content is capped at 40,000 characters.
* Fetching a single link times out after 20 seconds.
* All links are validated (fetched successfully) before anything is saved — if any one URL fails, none of the links from that submission are saved.

<Note>
  Unlike uploads, this field is a full replacement list, not additive — it's pre-filled with your current links, so if you clear it and submit, all links are removed.

  Editing in place (add/remove a line, keep the rest) works the way you'd expect.
</Note>

## Limits

<Info>
  |                            | Aiko Free | Aiko Plus / Pro / Max |
  | -------------------------- | --------- | --------------------- |
  | Reference document uploads | 1         | 10                    |
  | Reference document links   | 1         | 3                     |

  Reference channels have no plan-based count limit — only the per-channel 500-message / 40,000-character caps above.

  Going over your upload or link limit doesn't delete anything — it just stops including the oldest ones in what Aiko actually reads from, in favor of the most recent ones, until you're back under the limit.
</Info>

You need Discord's **Manage Server** permission (or this server's configured admin role) to change any reference material.

## What reference material is for

It's what Aiko actually reads from to answer server-specific questions — it doesn't change her tone (that's [server persona](/server-personality) or [personal persona](/personal-personality)), and it's not the same as a [FAQ](/aiko-bot/faq) entry, which is a single exact question/answer pair that skips the AI entirely on a match. Reference material is the broader pool an answer gets grounded in when nothing in the FAQ matches.
