Atlas Bots

Bots that live in ordinary Atlas chats. A bot is an Atlas bot account plus an outbound-only message stream on your own server — no webhook, no endpoint registration, no Atlas source code, and the default chat UI is the whole interface. One BotFather token is the entire configuration.

The SDK is on npm: npm install atlas-bot-sdk — compiled ESM with full type declarations, zero runtime dependencies, Node 18+. Get a token from BotFather and you're running; everything documented on these pages ships in the package.

The model, in one paragraph

Your bot's server connects out: it pulls its message stream as the bot's account and calls the platform LLM with the same token. Nothing anywhere registers your endpoint, because there isn't one — membership is the routing table (your bot receives exactly the chats it's a member of), the chat history is the queue (downtime loses nothing; the bot catches up on restart), and the chat timeline is the durable record.

The building blocks

ConceptOn Atlas
Creating a botBotFather — /newbot in an ordinary chat, backed by the platform's provisioning service
CredentialsThe bot's access token — chat identity, LLM access, and push access in one credential
Receiving messagesAn outbound message stream (webhook latency, pull semantics); a push delivery lane is the graduation path for breakout bots
Acting in chatChat actions with a rendered meaning in the app: messages, media, choice buttons, invites, chat renames, calls, notifications — the full catalog
ButtonsChoice buttons — tappable chips under a bot message; the tap comes back as an ordinary reply
CommandsThe invisible routing layer: button taps arrive as command values and bot.onCommand("claim", …) routes them — humans tap, they never type
Bot-to-bot loopsThe 🤖 marker loop-breaker, shared with the Atlas Auto Responder lanes — bots never react to bot messages
Privacy & groups/setprivacy, /setjoingroups — enforced by the SDK from the bot's platform-stored settings

Chat is the UI — and the API

Bots ship no interface. Everything user-visible is a chat event Atlas already knows how to render:

This is the deeper design rule: membership is the API. When your server decides something (a match, an assignment), it expresses the decision as an invite or a chat event, and the app renders the consequences.

Bot chats behave differently

The app treats a chat with a directory bot as the bot's surface, not yours:

When people need to talk: make a group

Bot chats are text-only — there is no call button in them, and no permission machinery pretending otherwise. When a conversation needs voice, or two humans need each other, the bot creates a group:

Guard rails, on by default

Every bot inherits the deterministic loop-safety rules proven by the Atlas Auto Responder — they are SDK defaults, not advice:

GuardRule
🤖 marker loop-breakerBot sends carry the marker; marked inbound never triggers a handler. Two responders can never ping-pong.
Stale guardCatch-up events older than 5 minutes are dropped — a bot that was down all night never answers old mail.
DedupeAn event id is handled at most once across stream overlaps.
CooldownSends into one chat are spaced (1s default).
Consecutive capAfter 8 unanswered sends in 30 minutes, the bot goes quiet in that chat until a human speaks.

Scaling story

A streaming bot is indistinguishable from a phone to the platform — bots scale exactly like users, and the platform runs zero delivery infrastructure for them (no retry queues, no webhook health tracking). A single breakout bot in thousands of busy chats eventually outgrows per-account streaming; the platform's answer is a push-based delivery lane, and because the SDK owns the transport under the same onMessage interface, graduating a bot is a config change, not a rewrite.

Start here

BotFather
/newbot to a working token in four messages, all in an ordinary chat.
Building a Bot
The SDK: handlers, the platform LLM with your tools, and deploy-anywhere operations.
API Reference
Every function a bot can call — messaging, media, calls, notifications, app commands.
Doctor Finder Example
The worked two-sided flow: LLM triage, doctor dispatch with tap-to-claim, and case groups where calls just work.