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

# Autonomy Mode: Confidence-Scored Auto Replies

> Freesona's autonomous mode uses a confidence-scored intent evaluator — not random chance — to decide when to chime in on conversations.

Autonomy mode lets Freesona participate in conversations without being explicitly called. Instead of waiting for a direct mention or a command prefix, the bot evaluates every message in non-conversation channels and decides whether to respond based on a real confidence score. This makes Freesona feel like an active participant in your server rather than a passive tool you have to invoke.

## How It Works

Every message Freesona sees in a non-conversation channel is evaluated by a confidence-scoring heuristic that produces a score between **0.0** and **1.0**. No extra API calls are made — scoring runs entirely on message content and context. The bot responds only when two conditions are met:

1. The confidence score meets or exceeds the active frequency threshold.
2. Both the per-channel and per-user cooldowns have elapsed.

### Scoring Signals

Each signal adjusts the raw score up or down. Scores are clamped to the `[0.0, 1.0]` range before comparison against the threshold.

| Signal                                                   | Score impact |
| -------------------------------------------------------- | ------------ |
| Direct mention or reply to bot                           | +0.90        |
| Attachment present                                       | +0.50        |
| Code block present                                       | +0.40        |
| Semantic trigger word (`what`, `how`, `explain`, `fix`…) | +0.40        |
| Ends with question mark                                  | +0.20        |
| Channel has existing conversation memory                 | +0.10        |
| Short filler message (`lol`, `ok`, emoji-only)           | −0.30        |
| Long monologue, no question and no mention               | −0.20        |

<Note>
  A message containing a direct mention or reply already scores 0.90 on its own — high enough to fire at every frequency level. Filler messages and long monologues are penalised to prevent the bot from interrupting casual chatter.
</Note>

## Frequency Thresholds

Use `/autonomy frequency` to control how often the bot chimes in. Lower thresholds mean the bot responds to more messages.

| Frequency | Confidence threshold | When to use                                                                              |
| --------- | -------------------- | ---------------------------------------------------------------------------------------- |
| `low`     | ≥ 0.70               | Bot chimes in rarely — only high-confidence situations like direct questions or mentions |
| `default` | ≥ 0.50               | Balanced participation for most servers                                                  |
| `high`    | ≥ 0.35               | Bot participates actively in many conversations                                          |

## Cooldowns

Two independent cooldowns prevent the bot from dominating any single conversation. Both are configurable in `config.json` (see [Configuration](/configuration)):

* **Per-channel cooldown** (`autonomy_cooldown_seconds`, default `120`) — after responding in a channel, the bot will not respond autonomously in that same channel again until this many seconds have elapsed.
* **Per-user cooldown** (`autonomy_user_cooldown`, default `60`) — after responding to a specific user, the bot waits this many seconds before responding to them again autonomously.

Both cooldowns must have elapsed for a new autonomous response to fire.

## Commands

Enable, disable, and tune autonomy mode from any channel where you have Administrator permissions.

| Command                                  | Description                  | Permission    |
| ---------------------------------------- | ---------------------------- | ------------- |
| `/autonomy on`                           | Enable autonomy mode         | Administrator |
| `/autonomy off`                          | Disable autonomy mode        | Administrator |
| `/autonomy frequency <low/default/high>` | Set the confidence threshold | Administrator |

<Note>
  `/autonomy` is a slash-only command because it uses Discord UI interactions. Autonomy mode affects non-conversation channels. The conversation channel set via `/setchannel` has its own reply mode, controlled separately by `/chatmode`.
</Note>

## Conversation Channel vs. Autonomy

These two systems are independent and control different reply behaviours:

<CardGroup cols={2}>
  <Card title="Conversation channel" icon="comments">
    Set via `/setchannel`. The bot replies to messages in this channel according to the active **chatmode** setting. Autonomy scoring does not apply here.
  </Card>

  <Card title="Autonomy mode" icon="bolt">
    Applies to every **other** channel. The bot uses confidence scoring to decide whether to respond unprompted. Chatmode has no effect outside the conversation channel.
  </Card>
</CardGroup>

### Chatmode Commands

Configure how the bot replies inside the conversation channel:

| Command              | Behaviour                                                     | Permission    |
| -------------------- | ------------------------------------------------------------- | ------------- |
| `/chatmode all`      | Reply to every message                                        | Administrator |
| `/chatmode mentions` | Reply only to direct mentions and replies to the bot          | Administrator |
| `/chatmode smart`    | Reply to mentions, replies, **and** messages with attachments | Administrator |

### Channel Setup Commands

| Command                  | Description                     | Permission    |
| ------------------------ | ------------------------------- | ------------- |
| `/setchannel <#channel>` | Set the AI conversation channel | Administrator |
| `/clearchannel`          | Remove the conversation channel | Administrator |
