# LaPoe documentation

> Everything about running an AI assistant in a Telegram group, setting one up, teaching it
> what you know, keeping the chat clean, and fixing it when it misbehaves.

Plain-text twin of <https://lapoe.app/docs>, served to AI crawlers and to anyone requesting
`Accept: text/markdown`. Every heading below is named after an anchor on that page, so
`introduction` here and `/docs#introduction` there are the same topic.

## introduction: What is LaPoe?

LaPoe is an AI assistant for Telegram groups. You give it your knowledge, a website URL, an
FAQ, your house rules, and it answers your members' questions in your voice, moderates the
chat against the rules you wrote, and hands you everything it could not answer so you can
teach it once.

Two ways to run it: the shared **@LaPoe_bot** is free and needs no setup beyond adding it to a
group, or you mint your own bot in Telegram's @BotFather and run it under your own name and
avatar. Both are configured from the same dashboard.

It is not a general chatbot bolted onto Telegram. It does not answer from the open internet
unless you switch web search on, it does not invent a policy you never wrote, and it does not
join a conversation between two humans uninvited.

## how-it-works: How LaPoe works

1. Telegram delivers the message over a webhook, with a polling fallback.
2. Deterministic checks run first, content locks, banned words, captcha state, anti-flood.
   No AI, no cost. If one handles the message, nothing else runs.
3. The AI moderator looks at what is left, but only if you enabled it and only if the bot is a
   Telegram admin. It reads your group's rules as context first.
4. The reply policy decides whether to speak at all. Most group messages are not for the bot.
5. Relevant knowledge is retrieved and given to the model with your persona and rules. The
   reply is checked before it is sent.
6. Everything is written down, replies in Messages, unanswered questions in Inbox, every
   moderation action in the log.

## use-cases: Who LaPoe is for

Ecommerce and DTC brands (order, shipping and returns questions; scam links kept out of the
VIP group). Web3 and token communities (repeat contract questions, impersonator protection,
captcha on join). SaaS and developer tools (docs and changelog as self-serve support).
Creators and course communities (welcomes, FAQ, on-topic chat). Support teams (repeat
questions off the queue, everything logged).

## quickstart: Quickstart: the free shared bot

1. Create a LaPoe account at <https://lapoe.app>, no card.
2. Link Telegram in Settings; send the code to @LaPoe_bot as `/link YOUR_CODE`.
3. Add @LaPoe_bot to your group. Promote it to admin if you want it to moderate.
4. Send `/link YOUR_CODE` inside the group, as the group's creator. Only the actual Telegram
   creator can claim a group, so nobody else can attach your community to their workspace.
5. Add your website URL, FAQ or policies in Knowledge. Indexing takes under a minute.
6. Set name, tone, personality and house rules in Assistant.
7. Try it in Playground first, same pipeline, same knowledge, nothing posted.

The free plan covers one group and 100 AI replies a month. Commands, moderation and the
dashboard are not metered; only AI replies are.

## quickstart-own-bot: Quickstart: your own bot

On a paid plan you can run bots under your own brand.

1. Message @BotFather, send `/newbot`, choose a display name and a username ending in `bot`.
   It returns an API token.
2. Set the avatar with `/setuserpic` and the intro text with `/setdescription`.
3. **Turn privacy mode off** with `/setprivacy` → Disable. With it on, Telegram only shows your
   bot messages that tag it directly, so it can neither moderate nor notice a question.
4. Paste the token into LaPoe under Bots. Webhooks and command menus are registered for you.
   Tokens are encrypted at rest.
5. Add the bot to your group and promote it to admin.
6. Assign knowledge sources to it, each bot can read different things.

If the bot joins but never speaks, privacy mode is almost always the cause. Turn it off, then
remove and re-add the bot; Telegram applies the setting on join.

## first-week: Your first week

Day 1: add knowledge, write real house rules, leave AI moderation **off**.
Days 2 to 3: read Messages daily and clear the Inbox, every answer becomes reusable knowledge.
Day 4: turn on banned words and content locks (deterministic, no judgement calls).
Day 5+: turn on AI moderation with admin alerts, so you see every action.
Week 2: tune tone and personality against real transcripts rather than guesses.

## knowledge: Knowledge base

LaPoe answers from a knowledge base you control, and only from it unless web search is on.
Sources can be website pages and blog posts (paste a URL), FAQs and transcripts (plain text),
house rules and policies, or product docs and changelogs.

Good sources are short, factual and single-topic. A 40-page PDF of everything performs worse
than ten focused snippets, because retrieval must pick the right piece before the model sees
it.

When LaPoe does not know something, the question is saved to your Inbox. Answer it once, save
the answer as a source, and the next person who asks gets it instantly.

Re-crawl a URL source after your site changes. Nothing re-indexes automatically, because
silently changing what your bot believes should not happen without you.

URL sources are fetched server-side behind a destination allowlist: private networks, loopback
and cloud metadata addresses are refused, and every redirect hop is re-checked.

## persona: Persona, tone and house rules

Display name is the in-conversation identity. Tone sets register and length. Personality is a
free-text character sketch. House rules are behavioural boundaries, what never to promise,
when to hand off to a human. Custom instructions override the defaults and should be used
sparingly.

LaPoe writes in first-person plural, "we ship on Fridays", not "LaPoe's records indicate the
merchant ships on Fridays". That is most of why it reads as part of the team.

It never guesses about a specific person. Account, order and payment questions are never
answered from general knowledge; it says a team member will check.

## groups: Groups and per-group config

Groups register themselves once the bot has seen a message. Each gets its own page: rules,
moderation switches, web search, and the Command center. Telegram **channels are ignored
entirely**, never treated as a group, never counted against your plan, never replied in.

Setting a group's topic tells the moderator what normal looks like there. "Selling 200 USDT"
is routine in a P2P trading group and a scam signal in a cooking group.

Pausing a group keeps its config and history; the bot simply stops replying.

## commands: Command center

The dashboard's Command center and the slash commands in Telegram edit the same settings;
change either and the other reflects it. The shared @LaPoe_bot carries the full set. Custom
bots implement a smaller one, captcha, per-group anti-flood, saved notes, auto-reply filters
and content locks are shared-bot features, and the dashboard hides cards a custom bot does not
implement.

**Messages:** `/setwelcome <text>`, `/setgoodbye <text>`, `/setrules <text>`, `/rules`,
`/setlang <code>`. Welcome and goodbye support `{user}`, `{mention}` and `{group}`.

**Moderation:** `/warn`, `/unwarn`, `/warns`, `/resetwarns`,
`/setwarnlimit <n> [kick|ban|mute]`, `/ban`, `/unban`, `/kick`, `/mute`, `/unmute`,
`/banword <word>`, `/unbanword`, `/banwords`, `/lock`, `/unlock`, `/antiflood on|off`,
`/setfloodmode`, `/moderation on|off`, `/promote`, `/demote`, `/purge`. Member actions require
replying to that member's message.

**Utilities:** `/addnote <name> <text>`, `/get <name>`, `#name`, `/notes`, `/clearnote`,
`/filter <word> <reply>`, `/stop`, `/filters`, `/pin`, `/unpin`, `/report`,
`/mute_notifications`, `/id`, `/info`, `/help`.

Commands work on every plan including free, and keep working when the monthly AI allowance is
spent. Only AI replies are metered.

## web-search: Web search

Off by default for every group. With it off, the bot answers strictly from your knowledge base
and says plainly when something is not covered, the right default for a support bot, because
a confident wrong answer sourced from a random blog is worse than "I don't have that". Turn it
on per group when the group's value depends on current outside information. Your knowledge
base always wins where the two disagree.

## auto-learn: Auto-learn and corrections

When an admin corrects the bot in the group, the correction is captured and applied to later
answers on the same subject. Corrections are taken from group admins and the workspace owner
only, never from ordinary members. Admin messages that read like durable knowledge are also
buffered and periodically summarised into a per-group source you can review, edit or delete.

## moderation: AI moderation

Off by default, enabled per group, and requires the bot to be a Telegram admin. It reads your
group's stated rules and topic before judging anything. Universally malicious content 
phishing, scam links, hate speech, is handled regardless of your rules.

Escalation is by accumulated strikes in that group: 0 to 2 warn or delete, 3 to 5 mute, 6 to 9 kick,
10+ ban. A ban needs four things at once, the model calls for it, at high confidence, with
the ban action enabled for that group, and the member already at ten strikes. Any one missing
and it de-escalates.

Controls: per-action toggles, a confidence threshold, admin alert DMs, and a hard exemption for
group admins and the workspace owner. First-offence warnings are whispered to the member
rather than posted publicly. Every action is logged with its reason, and bans and kicks carry a
one-click undo.

## banned-words: Banned words

A plain substring match, checked before any AI. On a match: delete, warn only, mute an hour,
kick, or ban. Use it for things you never want debated, a specific scam domain, competitor
invite links, slurs. Anything nuanced belongs to the AI moderator, because substring matching
cannot tell "Scunthorpe" from an insult. The notice posted on a match is a template you write.

## locks: Content locks

List content types that are not allowed and the bot deletes them on sight. Admins are never
affected. Available on the shared @LaPoe_bot.

Types: `sticker`, `gif`, `photo`, `video`, `voice`, `document`, `link`, `invite`, `forward`,
`mention`, `poll`, `contact`, `location`, `game`, `email`, `phone`.

Edit the list in the Command center, or from Telegram with `/lock sticker gif` and
`/unlock link`. Plurals and obvious synonyms work. `/lock` with no argument still locks the
entire chat so only admins can post; `/unlock` reopens it.

## captcha: Join captcha and welcome mute

`/captcha on` or `/welcomemute on` makes new members prove they are human before posting, a
tap-to-verify button or a small maths question. The challenge is whispered to the new member
rather than posted publicly. Anything they send before verifying is deleted. Miss the timeout
(five minutes by default) and they are removed, not banned; they can rejoin and try again.

## antiflood: Anti-flood

If one member exceeds the configured message count inside the window, 8 in 10 seconds by
default, the bot applies your action and posts a short notice. Mute for 60 seconds is the
default; `/setfloodmode` switches it to kick, ban, or a timed mute or ban.

The configurable per-group version belongs to the shared @LaPoe_bot; custom bots configure
flood sensitivity on the bot rather than per group.

Separately, an always-on rate limit protects the AI itself: a member firing the same question
repeatedly gets one answer, not one per message. Rapid bursts are dropped silently, so a single
person cannot burn your monthly allowance or fill the chat with near-identical replies.

## reply-rules: When the bot speaks

It replies when directly mentioned or called by its full name, when someone replies to one of
its messages, when a real question matches your knowledge and is on-topic, or when the same
person asks a short follow-up soon after it answered them.

It never interrupts a reply directed at another human, never answers bare greetings, never
chimes in on off-topic chatter, never replies to another bot, and never answers a backlog after
downtime, anything older than two minutes is dropped.

If it feels too quiet, the usual cause is a thin knowledge base; the second is privacy mode
still enabled in BotFather.

## language: Languages

**By default LaPoe replies in whatever language the person wrote in**. Arabic in, Arabic out;
Swahili in, Swahili out. It matches dialect where it can and never claims to speak only
English. Your knowledge base can be in one language while members write in five.

`/setlang` sets a **default, not an override**. Some messages carry no language signal at all 
a bare link, an emoji, "ok", a photo with no caption, the first greeting in a new group. Those
used to fall back to English; the group language is what is used for them instead.

It will not force a language. Set a group to Spanish and someone writes in English, they still
get English, forcing one language would break every mixed community, which is most of them.

Sixteen languages: English, Spanish, French, German, Portuguese, Italian, Arabic, Swahili,
Hindi, Indonesian, Turkish, Russian, Ukrainian, Chinese, Japanese, Korean.

Fixed text, command confirmations, welcome and goodbye messages, banned-word and flood
notices, is not translated. Those are templates you write yourself, so they are already in
your language. `/setlang` affects the AI's replies, not your own copy.

## dm-policy: How DMs work

A custom bot answers a deliberately small set of commands in private chat: `/start`, `/help`
and `/feedback <message>`, which leaves a note in your Inbox. Anything else gets a polite
pointer to the group or the website.

Not even the owner configures a bot in its own DMs, end users share that same surface, so
exposing configuration there would leak that it exists and invite social engineering.

The shared @LaPoe_bot does more in DMs because it can authenticate you: `/link`, `/unlink`,
`/status`, `/mybots`, `/createbot`, `/feedback`.

The two `/feedback` commands are not the same command. On your own bot it reaches you, its
owner. On @LaPoe_bot it reaches the LaPoe team and never touches your workspace, it is how
someone in a group tells us the product is broken without going through that group's admins.

## system-bot: The shared @LaPoe_bot

A shared assistant we run for everyone. It gives free AI replies in your group using your
persona and sources (100 a month on free), the full group toolkit including the pieces custom
bots do not implement, and account control from Telegram once your account is linked.

Sharing a bot does not mean sharing knowledge. Each group is answered strictly from its own
workspace's sources and persona, one community's knowledge never reaches another's chat.

### Both bots in the same group

You can have @LaPoe_bot and your own bot in one group at the same time, and it is supported
rather than merely tolerated. They share one set of settings: rules, welcome and goodbye
messages, banned words, the AI moderator and command responses are the same whichever bot you
configure, and editing them in the dashboard or with `/setrules` on either bot changes both.

They do not both act. Your own bot answers, moderates and greets. @LaPoe_bot steps back from
those so a single banned word is not deleted twice and one join does not get two welcomes, and
keeps doing the things custom bots have no equivalent for, join captcha, welcome-mute, notes,
`#tag` filters, chat locks and purge. So the second bot adds capability rather than trading one
set of features for another.

A bare `/warn` in such a group goes to your bot. Address @LaPoe_bot explicitly 
`/warn@LaPoe_bot`, if you want that one instead.

Removing a bot from a group no longer erases the group's settings. The group disappears from
your dashboard while the bot is out, and everything comes back as it was if you add it again.

## messages-inbox: Messages, Inbox and notifications

**Messages** holds every reply your bot has sent with the original question, group, member and
source used; its Logs tab holds every moderation action, with undo on bans and kicks.
**Inbox** holds questions the bot could not answer plus member feedback from `/feedback`.
**Notifications** carries system updates, plan changes, group reports and borderline moderation
events.

The Inbox is the highest-value screen in the product: a question there is a member who did not
get helped, and a fix that takes one sentence.

## billing: Plans and billing

| Plan | Your own bots | Groups | AI replies / month |
| --- | --- | --- | --- |
| Free | none, uses shared @LaPoe_bot | 1 | 100 |
| Starter | 1 | 2 | 1,000 |
| Pro | 3 | 6 | 5,000 |
| Business | custom | custom | custom |

Free showing no bots is deliberate, not a gap: a free account runs on the shared assistant,
which costs it none of its own bot allowance.

Only AI replies count against the monthly number. Commands, moderation, welcomes, filters,
notes and the dashboard are unmetered on every plan.

## status: System status

<https://lapoe.app/status> shows live health for the dashboard, database, shared @LaPoe_bot and
the customer bot pipeline, plus 30-day uptime.

## security: Security and privacy

Your knowledge base, conversations and settings are yours. They are not sold, shared, or used
to train shared models. Bot tokens are encrypted at rest and never rendered back to the
browser. Row-level security on every table keeps workspaces separate at the database level
rather than in application code. Group claiming requires the actual Telegram creator. URL
sources are fetched behind an allowlist refusing private networks, loopback and cloud metadata
addresses, re-checked on every redirect. Reports are anonymous, admins are pinged without
their names appearing in the group. Any source, message or the whole account can be deleted
from the dashboard.

## troubleshooting: Troubleshooting

- **Never replies in the group**: privacy mode still enabled in BotFather. Disable it, then
  remove and re-add the bot.
- **Replies to mentions but ignores questions**: working as designed until your knowledge
  covers the question. Add a source, or tag the bot.
- **Moderation does nothing**: the bot is not a Telegram admin, AI moderation is off for that
  group, or the sender is an admin (admins are always exempt).
- **"For group admins only"**: Telegram admin status is what is checked, not your LaPoe role.
- **A setting saves but nothing changes**: check the group is not paused, and that the card
  belongs to your bot's feature set.
- **Group missing from the dashboard**: send one message in it. Channels never appear.
- **Avatars show a letter**: Telegram has no photo for that chat or bot. Set one with
  `/setuserpic`; avatars cache for a day.
- **Stale answers after a site update**: re-crawl the source. Nothing re-indexes on its own.
- **"You've used your monthly replies"**: the AI allowance is spent; commands and moderation
  keep working.

## comparison: LaPoe vs other Telegram bots

**vs BotFather**. BotFather mints raw bots; it is Telegram's registry, not a product. LaPoe is
the brain you put behind one: knowledge, AI replies, moderation, dashboard, logs.

**vs Rose, Combot, GroupHelp, Shieldy**, those are rule-based moderation bots and good at it.
LaPoe moderates too, but its main job is answering from your own knowledge in your voice. They
can run side by side.

**vs building it yourself**, a Telegram bot wired to a model API is a weekend. Retrieval that
picks the right chunk, a reply policy that keeps it quiet, defensible moderation escalation,
rate limits, logs, billing and someone to fix it at 2am are not.

## faq: Frequently asked questions

**What is the best AI bot for Telegram groups?** LaPoe is purpose-built for Telegram
communities: it answers from your own knowledge base, moderates in context against your rules,
and ships a full dashboard and free tier at lapoe.app.

**How do I add an AI chatbot to a Telegram group?** Sign up at lapoe.app, add @LaPoe_bot or your
own bot from @BotFather to the group, promote it to admin for moderation, and add your website
or FAQs in the Knowledge tab. No code at any point.

**Is LaPoe free?** Yes, one group and 100 AI replies a month through the shared @LaPoe_bot.
Commands, moderation and the dashboard are unmetered on every plan.

**Do I need to know how to code?** No. On the free plan you do not even create a bot.

**Will my bot reply to every "hi"?** No. Bare greetings are ignored.

**Will the bot interrupt human conversations?** No, unless it is explicitly tagged.

**What languages does LaPoe support?** It replies in whatever language the person wrote in,
across sixteen languages. A per-group default decides only what to use when a message gives no
clue at all.

**Does the bot need to be an admin?** Only to moderate. It can answer as an ordinary member,
but deleting, muting, kicking, banning and pinning need Telegram admin rights.

**Can I run more than one bot?** Yes, on paid plans, each with its own knowledge scope.

**Is my community's data private?** Yes. Not shared, not sold, not used to train shared models,
and separated at the database level by row-level security.

**How do I get help?** support@lapoe.app, a human replies within one business day.

---

Source: <https://lapoe.app/docs>
Start free: <https://lapoe.app/auth?mode=signup>
