# Administration (/en/docs/max/groups)

Inspect your group's members, settings and activity, then choose an administrative task. Check permissions, unanswered questions and suspicious accounts before preparing changes. Start with a report; settings changes and member removal are separate decisions.

[Personal account](/llms.mdx/docs/max/usage/content.md) · [Bots](/llms.mdx/docs/max/bot/content.md) · [Administration](/llms.mdx/docs/max/groups/content.md)

## Check the group and your permissions

```text prompt
Use max CLI. In Club, show the description, members, administrators and my permissions. Which settings can I change? Do not change anything.
```

Expect group information and available actions. Membership does not automatically grant administrative access; check permissions first.

[Group and participant reports](/llms.mdx/docs/max/rankings/content.md)

## Prepare a moderation plan

```text prompt
Use max CLI. Review Club: unanswered questions, newcomers and spam signals. Suggest people to help and messages to check. Do not delete messages, block people or change settings.
```

Expect specific messages and reasons. Choose subsequent actions separately: reply, inspect an account or change access rules. Management commands follow below.

[Anti-bot and other reports](/llms.mdx/docs/max/rankings/content.md#task-antibot)

## Commands and instructions

Use this page when you administer a MAX group and want help managing it. You will learn to find unanswered questions, inspect joins and who added members, summarise the week, handle spam under your rules and track membership history. By default, `max` flags violations; deleting a message or removing someone requires your permission.

These actions use your personal account in groups you administer. Terms used below:

- **Administrator** — a member permitted to manage a group. Some commands count only your replies and administrator replies.
- **Local archive** — messages saved on this computer. Reports and tasks see only downloaded history.
- **Task** — something awaiting you, such as an unanswered question. `max` opens and closes tasks locally.
- **Rules** — what `max personal chats moderate` checks, such as links or flooding, and which actions it may take.
- **Member snapshot** — a list saved on one day. Comparing snapshots shows joins and departures.

## What you can do [#what-you-can-do]

| Task | Command |
| --- | --- |
| Find questions that are waiting to be answered | `max personal review --unanswered` |
| See who joined, left, added or removed | `max personal chats events` |
| Sum up the week: decisions, promises, open questions | `max personal review 'date>7d'` |
| Keep a list of what's waiting for you | `max personal tasks list` |
| Remove spam according to your own rules | `max personal chats rules set`, `max personal chats moderate` |
| Replace leaked invitation link | `max personal chats links reset` |
| Let people in or turn them away | `max personal chats requests list\|confirm\|reject` |
| View activity for the week | `max personal stats chats show` |
| Save list of participants every day | `max personal chats members fetch --track` |
| Find members who look like bots or spammers | `max personal chats members check` |

The full list of commands for groups is [below](#что-можно). Details about each - [groups and channels in the user manual](/llms.mdx/docs/max/usage/content.md#%D0%B3%D1%80%D1%83%D0%BF%D0%BF%D1%8B-%D0%B8-%D0%BA%D0%B0%D0%BD%D0%B0%D0%BB%D1%8B); each option is in the [command reference](/llms.mdx/docs/max/commands/content.md).

## Working with an agent [#working-with-an-agent]

An AI agent (such as Claude Code, Codex, Cursor, or Gemini CLI) can perform these checks for you. An agent with a terminal needs [max skill](/llms.mdx/docs/max/usage/content.md#%D0%BF%D0%BE%D0%B4%D0%BA%D0%BB%D1%8E%D1%87%D0%B8%D1%82%D1%8C-%D0%B8%D0%B8-%D0%B0%D0%B3%D0%B5%D0%BD%D1%82%D0%B0); agent in an application without a terminal - [MCP server](/llms.mdx/docs/max/mcp/content.md). Below is your request, agent command and result.

### An admin's morning: who is waiting for an answer [#an-admins-morning-who-is-waiting-for-an-answer]

Start with questions that have been waiting for you or the admins.

**Your request:**

> What in Поход has been waiting for an answer for more than four hours?

**Command:**

```sh
max personal review 'chat:"Поход"' --unanswered 4h --json
```

**Example agent answer:**

> **3 questions are waiting for an answer.**
>
> | Person | Question | Waiting |
> | --- | --- | --- |
> | Lena | What time do we leave on Saturday? | 6 hours |
> | Sam | Are the tents shared? | 12 hours |
> | Ira | Who will bring the cooking pot? | 15 hours |
>
> Open a question to check the surrounding conversation.

These are `review` rules: a question mark outside a link, or a reply to you/an admin, can open a question. Your or an admin’s reply or next message can close it. The [statistics report](/llms.mdx/docs/max/rankings/content.md) counts linked direct answers and can give a different result.

### Newcomers this week [#newcomers-this-week]

Review joining events. A new account is a reason to check, not proof of spam.

**Your request:**

> Who joined Поход this week? Show anyone worth reviewing.

**Command:**

```sh
max personal chats events "Поход" 'time>=7d' --json
```

**Example agent answer:**

> | Newcomer | How they joined |
> | --- | --- |
> | Kate | Added by Lena |
> | Oleg | Joined himself |
>
> Review Oleg’s available profile information before drawing conclusions. Account age alone is not grounds for removal.

Events cover available history only. The current member list can be checked separately.

### Link leaked [#link-leaked]

Change the invitation link only if you ask for it.

**Your request:**

> The invitation link to “Hike” has leaked. Replace it and allow only admins to add people.

**Replace link:**

```sh
max personal chats links reset "Поход" --json
```

**Limit adding participants:**

```sh
max personal chats update "Поход" --only-admins-add on --json
```

**Example agent answer:**

> | Setting | Result |
> | --- | --- |
> | Previous invitation link | Replaced |
> | Who may add members | Administrators only |
>
> The result includes the new link; share it only with people who need it.

These commands change the group. The example request authorises both changes; asking only to inspect a link does not.

### Removing spam with your confirmation [#removing-spam-with-your-confirmation]

Preview what the rules propose before applying any action.

**Your request:**

> Check Поход for spam. Show the proposed actions first.

**Command:**

```sh
max personal chats moderate "Поход" --dry-run --json
```

**Example agent answer:**

> | Finding | Proposed action | Status |
> | --- | --- | --- |
> | Invite link | Delete the message | Preview only |
>
> Nothing was deleted. Confirm the specific message if you want to apply the action.

Applying an action requires your request and the profile's permissions. A preview does not authorise deletion.

### A weekly report [#a-weekly-report]

Ask for a short recap of decisions, commitments and open questions.

**Your request:**

> Summarise the week in Поход.

**Command:**

```sh
max personal review 'chat:"Поход" date>7d' --json
```

**Example agent answer:**

> **Decided:** leave at 7:00 from the station.
>
> **Committed:**
>
> - Lena — food.
> - Sam — tents.
>
> **Still open:** who will bring the cooking pot.
>
> I can show the source messages if you want to verify the recap.

### Scheduled checks [#scheduled-checks]

No agent is required: moderation is an ordinary command. Run it twice a day, allowing deletion where the consent level is `ask`:

```cron
0 9,21 * * * max personal chats moderate "Поход" --allow-dangerous >> ~/max-check.log 2>&1
```

Without `--allow-dangerous` in cron, actions at level `ask` are just planned and waiting for you. The lines `PATH` and `XDG_RUNTIME_DIR`, without which `max` will not find Node and your login in cron, are in the section [how to run on a schedule](/llms.mdx/docs/max/recipes/content.md#%D0%BA%D0%B0%D0%BA-%D0%B7%D0%B0%D0%BF%D1%83%D1%81%D0%BA%D0%B0%D1%82%D1%8C-%D0%BF%D0%BE-%D1%80%D0%B0%D1%81%D0%BF%D0%B8%D1%81%D0%B0%D0%BD%D0%B8%D1%8E).

## Available actions [#available-actions]

| command | What does |
|---|---|
| `max personal review 'chat:<чат>' --unanswered [длительность]` | questions that you and the admins did not answer within the specified time (for example, `4h`; default `24h`) |
| `max personal chats events <чат>` | who entered, left, who was added and removed, by whom; by default 7 days |
| `max personal chats members list <чат>` | page of participants from MAX (`--all` - all available, up to 5000): who is the owner and admins (immediately after `admins add` the role may be the same), when the account was created, when it was online |
| `max personal chats rules show\|set\|unset <чат>` | group rules |
| `max personal chats moderate <чат>` | checking according to the rules; does what the rules allow |
| `max personal chats members add\|remove`, `admins add\|remove` | members and admins |
| `max personal chats requests list <чат>` | applications to the channel with approval; admins see, application time is unknown |
| `max personal chats requests confirm\|reject <чат> <человек>` | accept or reject one application |
| `max personal chats requests confirm\|reject <чат> --all` | answer every application to the channel; permissions and the action limit are checked before anything changes |
| `max personal chats links show\|reset <чат>` | invitation link; `reset` - new, old stops working |
| `max personal chats inspect <ссылка>` | where the invitation or public link leads; does not enter anywhere |
| `max personal chats create`, `max personal chats join <ссылка>`, `max personal chats leave <чат>` | create a group, join via link, exit |
| `max personal chats update` | settings, title, description, photo, who can pin (`--all-can-pin`) and add people (`--only-admins-add`); read settings - `max personal chats show` |
| `max personal messages delete --for-everyone`, `pin`, `unpin` | delete for everyone, pin |

An agent connected via [MCP server](/llms.mdx/docs/max/mcp/content.md) can execute the same commands within the scope of profile rights.

Group-changing commands return `operation_id` in JSON. After creating, joining, updating or resetting a link, the chat record is in `chat`. If the title or description changed but the settings request did not complete, the result is `outcome_unknown`. Read the group with `chats show` before retrying: the change may have applied partially.

## What needs your reply [#what-needs-your-reply]

`max personal review` maintains a task list in the local copy; `max personal serve` does not yet open tasks in MAX. An unanswered question or a message mentioning you by name opens a task; your reply closes it. A task links to the message without copying its text.

See what awaits you, the old ones on top, and then only questions and mentions in one group:

```sh
max personal tasks list state:open
```

```sh
max personal tasks list chat:<id чата> "(kind:question OR kind:mention)"
```

Add something that the rules don't see, like your promise, or close a task that doesn't need to be answered:

```sh
max personal tasks add msg:max/<вы>/<чат>/<сообщение> --type promise --category other
```

If a task may be the same work as an open task, `tasks add` refuses with exit code 2 and names the candidates. Repeat with `--into <задача>` to attach the message to it, or with `--new` to open a new task anyway. If it only resembles a task closed in the last 14 days, `tasks add` opens a new task linked to the closed one by `follow-up-of`; the closed task stays closed, and `tasks show` displays the link. `tasks duplicates list` shows the pairs found by the rules, and `tasks merge <задача> --into <другая>` merges them:

```sh
max personal tasks add msg:max/<вы>/<чат>/<сообщение> --type promise --category other --into <задача>
```

```sh
max personal tasks close <задача> --as dismissed --reason no-reply-needed
```

An agent — a program with `AI_AGENT` or `CLAUDECODE` set — closes a task only with `--certainty`: its confidence from 0 to 1. Below the threshold, the task stays open with a suggested close. `tasks list close:suggested` lists these tasks, and `tasks agenda` shows the reason `close-suggested`. Confirm the suggestion with `tasks close <задача>` or refuse it with `tasks reject <задача>`. The default threshold is 0.8, changed by `config set task_agent_close_min`; `config set task_agent_close off` keeps every task an agent closes open:

```sh
max personal tasks list close:suggested
max personal tasks close <задача>
max personal tasks reject <задача>
max config set task_agent_close_min 0.9
```

A pair that is not one task is removed for good by `tasks duplicates reject`; `tasks duplicates defer` leaves it to you, and `tasks duplicates list decision:unsure` lists it. `tasks related <задача>` scores similar tasks and changes nothing, and `tasks unmerge` undoes a merge:

```sh
max personal tasks related <задача>
max personal tasks duplicates list decision:unsure
max personal tasks duplicates reject <дубль> <задача>
max personal tasks unmerge <дубль>
```

`tasks agenda` and `tasks duplicates list` use query fields:

- `tag:` and `category:` keep tasks with that tag or category: `tag:urgent`, `category:money`.
- `claimed:` selects whose claim is on a task: `none`, `mine`, `others` or `any`. Without this field, the agenda shows unclaimed tasks and yours; `claimed:any` shows all.
- `decision:` selects duplicate pairs: `review`, the default, waits for a reviewing agent; `unsure` waits for you: `decision:unsure`.

When two agents work, one claims the task first; the claim ends by itself after 30 minutes, `--lease` changes the term, and `tasks release` gives the task back early:

```sh
max personal tasks agenda category:money tag:urgent claimed:any
max personal tasks claim <задача> --lease 2h
max personal tasks release <задача>
```

`tasks categories` shows the category list. One list serves the whole store, shared by `tg`, `max` and `memo`. It has 59 categories by default and supports up to 80. `config set task_categories.<имя>` adds or changes a category — its meaning, then words used by the rule in English, Russian and Spanish (`es:`):

```sh
max config set task_categories.travel "поездки и билеты | рейс, отель, es:vuelo"
```

A task keeps its category even after it is removed from the list. `tasks categories` names these categories and counts their tasks, `tasks list category:<имя>` finds them, and `tasks update <задача> --category <имя>` moves a task to a different category.

More on the [Tasks](/llms.mdx/docs/tasks/content.md) page.

See open tasks by chat, the oldest and median time until closed:

```sh
max personal stats tasks show
```

A closed task stays closed and a dismissed task does not reappear. Only your reply closes the task; administrator replies are not yet counted, and an `@ник` mention is not detected. The same commands are available through MCP.

## Rules [#rules]

Group rules define what `max personal chats moderate` checks and may do. Each group's rules stay on this computer and never go to MAX. The first `set` saves all rules with defaults. There is no background monitoring: checks happen only when `chats moderate` runs.

Show the rules. Before the first change, these are the default values, marked as unsaved:

```sh
max personal chats rules show "Поход"
```

Delete a message with a link:

```sh
max personal chats rules set "Поход" links delete
```

Block these people by number...

```sh
max personal chats rules set "Поход" blocked 12345,67890
```

...and delete them when they write or enter:

```sh
max personal chats rules set "Поход" blockedPeople remove
```

Delete without asking you:

```sh
max personal chats rules set "Поход" consent.delete allow
```

See what the test would do without doing anything:

```sh
max personal chats moderate "Поход" --dry-run
```

Check what's new from the last run and act:

```sh
max personal chats moderate "Поход"
```

| Rule | Default | Meaning |
|---|---|---|
| `trusted` | — | Comma-separated user IDs; rules do not affect these people |
| `blocked` | — | User IDs whose messages and joins are checked |
| `blockedNames` | — | Comma-separated, case-insensitive parts of names |
| `blockedPeople` | `report` | Action for a blocked person's message or join |
| `invites` | `report` | Invitation to another chat (`max.ru/join/…`, Telegram links) |
| `links` | `report` | Any link |
| `forwards` | `report` | Forwarded message |
| `flood.messages`, `flood.minutes`, `flood.action` | 5, 1, `report` | More than 5 messages in one minute from one person |
| `newAccount.days`, `newAccount.action` | 7, `report` | Account younger than 7 days; 0 disables this rule |
| `consent.delete`, `consent.remove` | `ask` | Your permission level for each action |

A rule's action is `report` (flag the issue), `delete` (delete the message for everyone) or `remove` (remove the person from the group). If a message breaks several rules, the strongest action is selected. Rules do not affect you, admins or people in `trusted`.

Consent determines whether the action is performed:

- `deny` — never;
- `readonly` — report only;
- `ask` — ask in the terminal; without an answer, the action waits. `--allow-dangerous` authorizes these actions for this run;
- `allow` — act immediately.

Old files are read: `forbid` becomes `deny`, `flag` and `confirm` - `ask`. An agent connected via MCP operates only where the level is `allow`; level `ask` actions remain the plan for you, there are no server forms.

`chats moderate --json` returns `{ item: { chat_id, rows } }`. `--since-time` accepts an ISO 8601 time or `30m`, `2h`, `1d`, not a message ID, and does not advance the saved position. The next-check position is stored with the rules; the old session position is migrated automatically before the first run. CLI and personal-account MCP share this position.

## Using a bot [#using-a-bot]

An administrator bot in the group can run the same check: `max <бот> bot chats
moderate`. Unlike a personal account, it can ban removed users from returning through an invitation link. It cannot access account age. See [bot group checks](/llms.mdx/docs/max/bot/content.md#%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0-%D1%87%D0%B0%D1%82%D0%B0-%D0%BF%D0%BE-%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D0%BB%D0%B0%D0%BC).

## Limitations [#limitations]

- **Personal accounts cannot ban.** A removed member can return through an invite link. Reset the link (`max personal chats links reset`) or use a bot check, which can ban.
- **Join requests exist only for a channel with approval.** A closed group has no approval: people join through the link immediately. In a channel with approval, `chats join` only sends a request (`requested: true`). `chats requests list` does not show when a person asked to join: MAX does not report it. You can answer all requests at once with `--all`; selecting requests by link is not available, because MAX does not report a request's link.
- **At most 10 actions per check** (`--max-actions`). Deletions count toward the hourly send limit; once it is reached, remaining actions wait for the next check.
- **Up to 1,000 messages per CLI check.** If there are more, the next check continues from that position.
- **One join means reading the full member list.** To find a new member's account age, the check reads every member; in a large group this can require dozens of MAX requests.
- **Nothing monitors the group automatically.** A check runs only when started by you, by an agent at your request, or by a schedule you set up.

## Statistics for group administrators [#statistics-for-group-administrators]

See the week’s messages, people who wrote and replies. For questions about who answers, who needs help and whether newcomers stay, open [Statistics](/llms.mdx/docs/max/rankings/content.md).

**Your request:**

> Show Поход’s activity this week and point out gaps in the history.

**Command:**

```sh
max personal stats chats show "Поход" --since-time 7d --offline --json
```

**Example agent answer:**

> | Metric | In available history |
> | --- | ---: |
> | Messages | 120 |
> | People who wrote | 18 |
> | Replies | 30 |
>
> History is incomplete: these are observed counts. This local request did not fetch joining or leaving events.

Without `--offline`, the CLI also fetches joining and leaving events. Saved daily member observations remain available locally. The first report cannot reconstruct past member lists.

### Member snapshots [#member-snapshots]

`max personal chats members fetch` reads participants into a local copy: saves their profiles, changes, number of participants per day and the result of the completeness check. `--max-pages` limits the number of pages. If the list is incomplete, no one is recorded as having left: this requires the entire available list and a known number of group members, not exceeding the number of people read. In MAX, lists are often partial; increasing the budget only helps where the server actually serves the remaining pages.

To collect the lineup every day, add the group to the watch list: `max personal chats tracking add <группа>` (does not read participants right away) or `max personal chats members fetch <группа> --track`. While `max personal server` is running, it receives the composition of the monitored groups: the first time a minute after connecting, then once a day. If the composition is already saved today in UTC, including an incomplete response, the automatic receipt is skipped; You can repeat it manually via `max personal chats members fetch <группа>`.

Tracking does not start the server or prolong its idle timeout: for daily history, keep `max personal server` running at all times. `max personal chats tracking list` shows the groups being monitored and the last number of participants saved; `show` - group status and snapshots of the number of participants over the last 30 days. `max personal chats tracking remove <группа>` stops automatic receiving; the accumulated history remains accessible through `max personal chats members history`.

`max personal chats members history` lists saved joins, departures and profile changes chronologically; the query `time>=7d` limits the period. It never contacts MAX. A join uses MAX's timestamp when available, otherwise first observation. Departure time is the first complete snapshot missing the person, rather than their exact departure. The initial list does not mean everyone joined that day. `chats members list --offline` shows the latest complete saved membership; partial reads do not replace it. Without a complete snapshot, the list can be empty even when individual profiles and events exist. Profiles and history remain beside messages in the local archive.

`max personal chats members check` reads members and shows signals of suspicious accounts. `--max-pages` limits pages, and a query such as `score>=3` keeps members scored three or higher. This is a hint for human review: nobody is removed, administrators and the owner are excluded, `more` means an incomplete list, and `unknown` means unknown signals. MAX does not provide every Telegram signal. This check is unavailable with `--offline`. “Never wrote” means no messages from the person were found in local history; it does not prove they never posted in the group.

`--deep <n>` additionally checks the first n members in full, one per second: their profile and up to 1000 saved messages each. Public spammer lists cover only Telegram accounts, so they are not queried for MAX, as the response explains.

### Weekly report for your group [#weekly-report-for-your-group]

“Hike” below is a fictitious example group. First, download its messages via `messages sync`, if they are not already in a local copy, then save the current composition and prepare a report:

```sh
max personal chats tracking add "Поход" --json
```

```sh
max personal chats members fetch "Поход" --json
```

```sh
max personal stats chats show "Поход" --since-time 7d --by day --timezone Europe/Madrid --json
```

```sh
max personal chats members history "Поход" 'time>=7d' --offline --json
```

```sh
max personal chats tracking show "Поход" --offline --json
```

```sh
max personal chats members check "Поход" --json
```

Ask the agent to report message and active-sender counts, unanswered questions, membership changes and days with member snapshots. Keep incompleteness indicators in the report: `complete`, `more`, `unknown` and missing daily snapshots. Repeat membership collection for the next report; the first report cannot show departures before the first saved membership list.
