Coming from profiles?
Your profiles keep working exactly as they did; Bot Mode adds the parts a profile alone does not have:
Nothing moves: config, memory, skills, and credentials stay in
~/.mibyan/profiles/<name>/, and mibyan -p <bot> chat still opens the same agent.
The Bots pane
The roster shows one row per agent profile: avatar, latest-message preview, and timestamp.- Click a Bot to land in its chat — every Bot has a canonical, persistent Bot Chat conversation that is created (and pinned) the moment the Bot is born. A row click always opens that Bot Chat (the same conversation the row previews), even when you have other tabs open for the Bot; those tabs stay open beside it. In the tab strip the Bot Chat is captioned with the Bot’s name, so two open Bots are told apart at a glance.
- Right-click a Bot → Open recent session to jump to its most recently active ordinary conversation — a cron run, a delegated job, a side thread — as a tab beside the Bot Chat. The row click itself never changes; a Bot with no other conversation yet just opens its Bot Chat.
- Active now — the roster’s activity filter includes the owner of the focused live turn, Bots that wrote within the last 90 seconds, and Bots with a recent worker heartbeat. A connected gateway alone does not mean a Bot is working.
- Search filters the roster as you type.
- Hide a Bot — right-click a row → Hide Bot to take a Bot you don’t use out of the roster and the Active-now strip. Hiding is display-only: @mentions still resolve, group-chat memberships are untouched, and routines keep running. Once at least one Bot is hidden, an eye toggle appears in the pane header — click it to reveal hidden Bots dimmed in place, then right-click → Unhide Bot to bring one back. Hidden Bots never toast, but they accumulate unread activity silently and the eye badges a dot so you know something happened. Hidden state is saved in the Bot’s profile metadata, so it follows the Bot to every desktop connected to that backend.
The canonical Bot Chat is a forever-chatTyping
/new (or /reset) inside a Bot’s canonical chat would fork the relationship into a scratch session — the one thing Bot Mode promises never happens. The composer reroutes it to /compact instead: fresh working context, same conversation. Regular sessions on the same profile keep full /new freedom.Archiving a Bot Chat from the sidebar retires it: the next click on the Bot starts a fresh conversation that becomes the new canonical Bot Chat. The retired chat stays archived and hidden — its history is preserved in the database, but it is no longer reachable from the Bot or the archive view. The automatic idle-archive sweep (sessions.auto_archive) never retires a Bot Chat; only an explicit archive does.Organize bots into sections
Sections are folders you make yourself — Clients, Team, whatever fits — as a second axis beside the automatic per-gateway grouping. With no sections created the roster is the plain list it always was.- Create one from the pane’s + menu → New section, or right-click a Bot → Move to section → New section… (that files the Bot into it as you create it).
- File a Bot by dragging its row onto a section — the target highlights while you hover, and Esc cancels the drag — or right-click → Move to section and pick one. Remove from section puts it back in Unassigned.
- Rename, reorder, or delete a section from its heading’s right-click menu (or the ⋯ that appears on hover); double-click a heading to rename. Headings fold like the gateway headings do.
- Deleting a section never deletes Bots — they return to Unassigned, and the toast offers Undo. No confirmation is asked.
ui_meta), so a Bot’s section follows it to every desktop connected to that backend: a second desktop rebuilds the section headings from its members the first time it loads the roster, and a rename made on one desktop reaches the others the same way. The section list itself (order, empty sections) is kept per desktop, so deleting a section on one machine leaves an empty heading on the others until you delete it there too. Bots filed before names rode along carry only the id; the desktop that created the section stamps the name onto them automatically the next time its roster loads, and other desktops pick the section up from there. When the roster shows more than one gateway, sections nest inside each gateway’s bucket.
Creating a Bot
Hit New Agent in the roster. The quick path is three fields — Name, Title, Description — and the Bot exists in seconds, introducing itself as the first message of its new Bot Chat. An Advanced disclosure opens the full capabilities surface:- Clone from an existing profile — start from another Bot’s config, skills, SOUL, and memory, or pick Fresh profile for a clean start.
- Create empty — skip the bundled skills entirely for a minimal profile.
- Model & provider pin — give the Bot its own model. Any provider/model pair Mibyan knows about works, and different Bots can run on different models side by side. Leave it unset to inherit from the launch profile. Picking a model from the Bot Chat’s composer sticks to that chat (it survives reopening the app) until you change the Bot’s profile model, which takes over again.
- Custom SOUL.md — the Bot’s persona and standing instructions.
- Per-skill, per-toolset, and per-MCP-server enablement — tick exactly the capabilities this specialist needs.
- Copy API keys from the main profile — on by default. Each Bot gets its own credential store: static API keys are copied in, while single-use OAuth logins (Anthropic, OpenAI Codex, xAI) are not copied — sign the Bot in itself with
mibyan -p <name> auth add <provider>. See Every profile owns its credentials.
Choosing which machine it lives on (“Create on”)
With more than one connection registered in Settings → Connections, the New Agent dialog grows a Create on picker. Pick a device and the profile is created on that machine’s backend — your window never switches gateways. The new Bot then appears in the roster as a Connections Bot (with an@name-device handle when the name exists on several machines), and chatting with it routes to its own machine. Clone from profile then offers what exists on the target machine — its own default, or Fresh profile — rather than this window’s roster; you never have to switch gateways to create a fresh Bot elsewhere.
With a single connection (the common case) the picker is hidden and the Bot is created on the machine you’re connected to — exactly the old behavior.
Remote-creation notes:
- Clone source is a profile of the target machine (its
default) — a remote box doesn’t have your local profiles to clone. - The live Capabilities tab pins to the target machine’s backend, so skills, tools, and MCP servers you configure during creation land on the machine the Bot will live on. (Older desktop builds fall back to staged Skills/Tools/MCP checklists for remote targets; both read the target machine’s catalog.)
- Cancelling the dialog discards the draft profile on whichever machine it was created.
Avatars
Every Bot gets a face:- Blob faces (default) — a deterministic soft-body face drawn from the Bot’s name: same name, same face, forever. While you type a name in New Agent the face follows it live; hit Randomize to re-roll, Lock face to keep the one you like even if the name changes, or pin one of the six silhouettes (round, organic, boxy, nub, cloud, sun) while everything else still comes from the name.
- Geometric faces — the classic 7 shapes × 10 colors. During a focused live turn, the owning Bot leans and looks upward with three animated dots, then eases back to idle when the turn ends. Ownership includes the connection, so same-named Bots on different gateways do not borrow the pose. Background workers keep their existing working animation; photos, blob faces and sigils keep their own rendering.
- An uploaded image — any picture you like.
- An AI-generated portrait — when an image backend is configured, generated in place (this rides the standard
image.generateRPC and works over both local and remote gateways). - A pixel pet — a companion from the petdex gallery that bounces beside the avatar while the Bot is busy. Run
mibyan petsin a terminal to explore the gallery.
Voices
A Bot speaks with its own profile’s TTS settings (tts.* in that profile’s config.yaml) on its own gateway. Read Aloud, auto-speak and voice conversation in a Bot chat — in a split tile or opened in the main pane — all synthesize through the Bot’s (connection, profile), so two Bots with different voices sound different and two Bots with the same profile name on different gateways never share a voice. A Bot profile with no tts.* of its own uses that profile’s server defaults; only a chat with no known owner (a plain session) uses the active profile’s voice. Speech-to-text in a Bot chat still uses the active profile’s STT settings.
Routines
The Routines pane attaches recurring tasks to the Bot that does them — “summarize my inbox every morning” lives next to the Bot responsible for it. The pane docks beside the chat only while the Bots tab is active and steps aside when you switch back to Sessions (older desktop builds keep it always visible). Closing it with its ✕ hides it until you next leave and re-enter the Bots tab, when it comes back as the collapsed right-edge tab. A structured schedule picker builds the schedule (frequency first, then only the detail that matters), with an Advanced field exposing the raw Mibyan schedule string. Routines are plain Mibyan cron jobs namespaced[bot:<name>] <routine> — they also show up in mibyan cron list and the core Cron page. Runs land in the Bot’s own chat history, so the result is right where you would talk to that Bot anyway.
Groups and group chats
Messages sent during a member turn queue behind the active room drive, including replies in the same thread. They do not interrupt that member or mark unseen messages as read. Stop cancels queued continuations and holds the members until resumed: @mention a held member, or address the whole room (@all … /
@everyone …, any wording) to release everyone — @all resume is not a
required incantation. stop, halt or pause holds a member only when the
word sits next to its @mention (stop @bot, @bot please pause); the same word
elsewhere in the sentence is read as ordinary prose, so a German halt no longer
silences the bot it was sent to — but such a message does not release a held
member either (@bot please just stop now never wakes it; repeat the stop next
to the mention to hold it). Stop words inside fenced code, inline code, quotes or
blockquote lines are content, not directives, and never hold anyone. A held member
still receives the messages its hold skipped — including the one that triggered it —
on its first turn after release, so nothing addressed to it is lost. Rooms that never
use “stop” as a command can turn off Detect stop directives in the group settings
dialog; the Stop button keeps cancelling the active run either way. A member that is visibly still working keeps its turn for up to three
hours (a member that stops reporting work expires after three minutes of silence regardless); a quiet
room then watches timed-out members for another three hours after the foreground wait ends, and this
observation window does not extend the turn itself.
Unresolved member failures remain visible in the collapsed Activity summary after
the room settles — including a turn the member’s backend itself failed (bad
credentials, provider errors), which is reported the moment the gateway
reports it instead of looking like twenty minutes of thinking. A failure row names its cause: builder hit an error — <first line of the error> (secret-shaped tokens redacted, long lines truncated), or builder couldn't start — too many bots running when the local
backend pool had no free slot. Expand Activity for the turn sequence; re-address the member to
try again. An ambiguous submit failure is not automatically resubmitted.
Right-click a local Bot → Manage groups to add or remove it from any number of group chats. Pick existing groups independently or create one inline. Local membership is stored in the Bot’s backend-synced profile metadata, so it follows that profile across desktops; older profiles with one legacy group continue to work. Connections Bots join through the New Group Chat picker and remain source-qualified in the room’s shared state.
To edit an existing room as a unit, use Manage members — from the room header’s people icon or the Manage members… button in Group settings. The checklist pre-selects the current members and lists every local and Connections Bot; add or remove several at once and Save members applies the new roster (still 2–6 Bots) while the room, its history and each member’s room session stay in place. A removed Bot takes no further turns; an added Bot reads the recent room history on its first turn. Cancel changes nothing.
Each member’s turn carries every room message since its own last turn — up to about 200 messages or 32,000 characters of transcript, whichever fills first — with a single oversized message cut to a marked 8,000-character excerpt (the room log stores the same excerpt) rather than crowding out the messages around it; when the window still overflows, the prompt names exactly how many earlier messages were left out.
Rooms follow your gateways, not one Desktop. Each room’s recent transcript, members, picture, and name are mirrored into the shared profile metadata of every gateway your Desktop is connected to, with per-gateway versioning so two Desktops writing at once merge instead of overwriting each other. Open Mibyan Desktop on another machine against the same gateway (local network, Tailscale, anywhere) and the room appears with its history; gateway-only clients see it too. Rooms carry a durable internal identity, so renaming one changes just its display name everywhere, disbanding one removes it permanently on every client — even ones that were offline at the time; your Desktop remembers its own disbands, so a gateway whose copy missed the deletion cannot bring the room back — and recreating a same-name group starts a genuinely fresh room. If a gateway dies or is removed, nothing is lost: every connected Desktop keeps the full room locally and re-seeds any gateway it reconnects to. (The full orchestration log stays in each Desktop’s local storage; the shared mirror is a bounded recent-history projection.)
A group’s identity is editable, at creation and after:
- New Group Chat lets you set an optional room picture alongside the name — upload one from your device or generate one (when an image backend is configured), using the same pipeline as Bot avatars. The picture appears in the roster row (in place of the default group glyph) and leads the title in the room header.
- The room header’s gear button opens Group settings, where you can rename the group or set, replace, or remove its picture any time. A rename carries everything with it — the room log, each member’s room session, memberships, and the picture — so no history is lost. Renaming to a name that’s already taken is rejected rather than silently suffixed.
- Group settings also lists every member with a Compress history button. Each member keeps a hidden per-room session that grows with every turn; when it gets large enough the member starts answering with empty replies (
The model returned no response after processing tool results). Compress history runs the same context compression as/compressagainst that hidden session — it is not reachable from the sidebar or the room composer — and reports how many messages were folded. Compress one member at a time; the room log itself is untouched.
- One visible conversation. Public messages and each member’s reply stay readable in arrival order, with the speaker’s name and timestamp. Starting another topic does not collapse earlier replies. Reply in thread continues that topic without reordering the room; Activity is a secondary status view, not a replacement for messages. Private Bot Chats remain separate.
- Your message triggers up to three serial rounds of member turns. @-mentioned Bots respond (everyone responds when nobody is mentioned); each Bot replies briefly or passes, and the room settles when a full round stays silent.
-
Teammates can hand off to the primary Bot with
@mibyan, including in older saved rooms; Bots on other gateways keep their device-qualified tags (for example,@default-vera). -
Bots pull each other in with
@name, and escalate real judgment calls to you with@user— the group row shows a needs you badge when that happens. Pending questions and command approvals also light that badge; resolving the last prompt clears only prompt attention, not an independent mention. A command approval in the room answers on the click itself —once,session,alwaysordenysends at once, with no second button to find. Prompts follow a renamed room, while disbanding retires them even if a member’s in-flight poll arrives later. - Hard caps (10 messages per send, 3 rounds) keep rooms from spinning.
- Each member keeps its own persistent room session, so room context survives like any other conversation.
- Not every Bot replies to every message. Speaking is each member’s own choice — a Bot replies only when it has something new to add and passes otherwise, and @-mentioning specific members scopes the round to them. Expect the members you addressed (or whoever has something to say) to speak, and the rest to stay quiet.
-
Rooms keep running when you close the Desktop. When every member of a room lives on the same gateway, that gateway owns turn scheduling through a durable driver: closing Mibyan Desktop (or losing its connection) does not stop a room mid-discussion, and the Desktop simply catches up from the room’s log when it reconnects.
groups.capabilitieson the gateway reportsdriver: truewhen this applies. More than one room worker may share a home — the messaging gateway (mibyan gateway run) and the Desktop’s own backend (mibyan serve) both run one — and whichever holds the room’s driver lease runs the next turn; a member’s room session is held only for the duration of its turn, so the lease can move between workers without a turn being refused. Room state lives in the install’s rootshared-state.db; installs that created rooms before that file existed (when rooms were still kept in the rootstate.db) get those rooms copied across once, on the first open after updating, so pre-existing Group Chats stay reachable. Rooms whose members span several machines are different: each member’s turns run on its own gateway, and the cross-connection courier described under Bot-to-bot messaging still applies to them. -
Mentions read as identities. In the transcript a routed
@botmention, the human handoff@user, and the broadcasts@everyone/@allrender as inline references (accent text, not pills); unknown@wordsand e-mail addresses stay plain. Hover a Bot’s message and use Reply to @handle to seed@handleinto the composer, so your next send goes to that Bot only (when a same-named Bot from a Connection shares the room, the tag is device-qualified, e.g.@reviewer-mini/@reviewer-local) — Reply in thread still continues the whole thread. If a reply box for a different thread is open, Reply to seeds the main composer instead and so starts a fresh thread; use Reply in thread to continue that thread. -
Rooms can span machines. New Group Chat is available as soon as two Bots are selectable across all your registered connections — one Bot on this device plus one on another gateway is enough. The picker seats Bots from any registered connection; each member’s turns run on its own machine, in its own room session there. Cross-machine members carry a device badge (
dixie · Mac Mini) in the room and in other members’ transcripts, and the disambiguated@name-devicehandle works in room mentions — so same-named agents on two machines never blur together. A member’s turn that outlives this Desktop — you quit or it crashed mid-turn — finishes on the member’s own machine: the room posts that reply the next time it is driven, and does not re-drive the member while it is still working. -
Rooms show the same identity as the roster. Transcript rows, the “X is thinking…” line and Activity rows resolve each member’s title and avatar by its owning connection and profile — re-titling a Bot or changing its picture updates every room it sits in, remote members keep their own titles, and two same-named Bots on different connections never borrow each other’s avatar. When two members would still read identically, Activity appends the connection label (
Reviewer · Mac Mini). -
Plugins can watch members work. The durable room log records
turn.startedandturn.settled; what a member does in between (tools, approvals, streamed text) is projected to plugins through theon_room_member_activityhook with room, member and turn coordinates, so community clients can build tool cards and live member status on top of Group Chat without reading Mibyan internals. -
What a member says outside the room still reaches it. Each member’s room session is an ordinary Mibyan session (titled
Group: <room> · <thread>), so you can resume it from the CLI, a routine can post into it, or the Bot’s own tools can write to it. When you open the room, and again each time the room drives that member, whatever those writers added since the room last looked — your questions and the member’s answers — is posted into the room log under that member’s name, once, in the thread the session belongs to; a window restart does not repeat it. The room’s own turn prompts and their replies are never duplicated this way, and neither are the agent’s housekeeping rows (context compaction notes, routine deliveries, delegation results) or the member’s reactions to them. The room starts watching a session the first time it sees it: what was already in that session by then is not replayed, so a room restored on a second Desktop does not re-post its members’ history.
Bot-to-bot messaging
Bots message each other with attribution, and you can hand work off from any chat:- @mentions — type
@researcher have a look at thisin any chat and the composer’s@autocomplete helps you pick the right Bot; on send, the mention is resolved against the live roster and the active Bot is told exactly who you mean (profile, friendly name, and device for cross-connection Bots). The Bot then composes its own message and sends it withmessage_agent— your text is never forwarded verbatim, and the reply comes back attributed to that agent. An email address or an unknown@passes through untouched. Bots on other connected machines are reachable the same way: the Desktop relays the message over that connection’s own socket (see Bots across machines below). - Renamed Bots keep their tags in sync — give a Bot a friendly name (the pencil in its chat header, or
mibyan profile rename) and it becomes taggable by that name: a Bot titled Research Buddy answers to@research-buddy(and@researchbuddy), in regular chats and in group rooms alike. The composer’s@autocomplete offers the renamed tag and also matches when you type the old profile name, which keeps resolving too. This includes the primary Bot: rename it Maia and group-turn prompts introduce it as@maia, its inter-agent messages sign asMessage from 🤖 Maia (@mibyan), and teammates canmessage_agent(target="maia")it —@mibyanstays a working alias. - Remote Bots complete under their titles, from any chat. The
@autocomplete lists Bots on your other connected machines as soon as the Desktop is connected — you do not have to open the Bots pane first — and a remotedefaultappears under its Bot Mode title (@cos-botfor a remote default titled CoS Bot, not a second@mibyan). When two Bots would tag alike, the picker inserts the connection-qualified form (@cos-bot@<connection>), which resolves to exactly that machine’s Bot. A relayed message signedMessage from 🤖 mibyan (@mibyan@<connection>)still renders as an agent notice, not as your own text. - Direct messages — every Bot Chat carries the
message_agenttool: a Bot messages a teammate by callingmessage_agent(target="researcher", message="…"). The target is the teammate’s profile name, its friendly name (mibyan profile renameor the Bot Mode title —Scribe,Dr. Foo) or the@-tag the Desktop inserts for it (@scribe,@dr-foo,@drfoo);@mibyanalways means the primary Bot. A profile name is matched first, so it can never be hijacked by another Bot’s friendly name, and a friendly name shared by two Bots is refused with the roster instead of guessing. The tool validates the target against the live roster, prefixes the sender’sMessage from 🤖 <friendly name> (@<handle>):attribution automatically, and delivers into the teammate’s canonical Bot Chat. Delivery is fire-and-forget: the sender gets a dispatch acknowledgement (status: queuedplus adelivery_id— and aprocess_idfor the background delivery process — means the message was handed to that process, not that it was delivered), finishes its turn, and that process’s completion notification carries the outcome — the reply, or the delivery failure. On surfaces that cannot receive completion notifications (anapi_serversession, one-shot runners) the acknowledgement instead carriesreply_delivery: poll: the sender retrieves the outcome withprocess(action="wait", session_id=…)before ending its turn, and the outcome is also saved into the sender’s session transcript as a delivery row when the process exits, so the reply is never silently lost. The notification carries the reply whole up to the message size limit (16,000 characters); a longer one arrives as its tail and says how much was cut (process(action="log", session_id=…)has the rest). The message travels as a real parameter (nothing shell-interpreted — quotes,$(...), and backticks arrive verbatim), and the Bot composes its own message rather than forwarding your words. The teammate roster — names and roles from each profile’s title/description — is part of every Bot Chat’s system prompt, so Bots know who does what before choosing a recipient. The tool exists only in canonical Bot Chat sessions on Bot-Mode-managed installs; regular chats, group-room member sessions, and CLI sessions never see it.
queued acknowledgement confirms durable admission, not a completed reply. The target profile retains the delivery ID and receipt under runtime/bot_live_delivery/; settled confirms completion. A crashed or cancelled imported turn is not automatically replayed, and pending work pinned to a departed owner remains inspectable rather than being silently rerun. Do not resend a delivery whose outcome is unknown. Older backends without live-delivery capability retain the existing ownership refusal; restart that backend after upgrading.
- Staying silent — a Bot that has nothing to add may end a turn with one of the intentional silence tokens (
[SILENT],NO_REPLY, …). The Bot Chat keeps that turn in its transcript but renders nothing, and a teammate that messaged it gets an empty reply instead of the token. Failed turns and prose that merely mentions a token are shown as-is.
agent.bot_mode_protocol in config.yaml (default: on):
What actually makes a chat a Bot Chat
agent.bot_mode_protocol is only the master switch. Before the protocol section — or the message_agent tool — is injected, two further conditions must hold, and on a desktop install the Bots pane satisfies both for you the moment it creates a Bot:
- The session is titled exactly
Bot Chat. That exact title is the canonical chat’s identity (it is what the desktop plugin’s createCanonicalChat uses and whatmibyan -p <bot> chat -c "Bot Chat"resumes); any other title, or an untitled scratch session, gets neither the section nor the tool. - At least one profile on the install carries a
ui_meta: { mibyan-bots: … }block in itsprofile.yaml. This is the “Bot-Mode-managed” marker the desktop plugin writes for every Bot it owns; the gate scans every profile, so one marked profile marks the whole install. There is no CLI command that writes it.
message_agent is unreachable even though the docs-level switch is on — bots message each other fine over the messaging platform, but the agent-side message_agent tool never appears. To enable it headless, satisfy both conditions by hand:
message_agent are all picked up — including over mibyan -p <bot> chat on a purely terminal box.
Bot-to-bot delivery is per-invocation: the receiving Bot picks the message up when it next runs. Live interrupt of a Bot mid-conversation is future work.
Failed turns retry safely
Local one-shot delivery preserves the active-session refusal code separately from its human-readable message.SESSION_NOT_OWNED produces target_busy; an
unreadable coordination registry is not mislabeled as another owner. Older local
CLIs without the code marker still use the historical refusal wording.
A failed delivery turn is retried at most once, and only when a retry can actually help. Transient failures (target runtime offline, delivery timeout, provider rate limit or server error) re-run the same Bot Chat session unchanged. A context-overflow failure also re-runs the same session — the retried turn compacts the over-threshold transcript via the standard context-compression pass before calling the model, so the retry fits where the original didn’t. Auth, quota, and configuration failures never auto-retry: a second attempt cannot fix them and only burns quota, so the failure is surfaced immediately. A retried turn never starts a fresh session — your Bot Chat history and context stay intact. The re-run resumes the message the failed attempt already wrote into the Bot Chat instead of appending it again, so the recipient’s transcript carries exactly one copy of the DM.
When a target has no live Desktop or TUI owner, local delivery opens that
profile’s canonical Bot Chat through a quiet CLI turn. The transport prefers
the Mibyan entrypoint beside the sending runtime’s Python interpreter, so an
unrelated or older mibyan on a service’s PATH cannot take precedence when
that sibling entrypoint exists. --in ~ selects the working directory; the
explicit Bot Chat title is resolved in the target profile’s session database.
When a delivery fails: typed reasons
A failed bot turn or relay delivery carries a machine-readablereason code alongside the human error text, end to end: the target gateway classifies the failure (provider_auth_or_access, provider_quota_limit, provider_rate_limit, provider_server_error, context_overflow, missing_config, model_unavailable, runtime_offline, queued_expired, delivery_timeout, target_busy, unknown), the Desktop forwards it, and the sending agent’s completion notification is tagged [reason: <code>] ahead of the error text. A calling agent can branch on the code — “sign in again” vs “retry later” — instead of parsing provider prose. The Desktop’s needs-attention badge uses the same codes.
Messaging across connected machines (the Desktop relay)
Every gateway you register in Settings → Connections — local, remote URL, SSH, Mibyan Cloud, docker — is a persistent line the Desktop holds open, and Bot Mode uses those lines for messaging automatically. No extra setup:- Rosters propagate on their own. While the Desktop runs, it periodically tells each connected gateway which agents live on the other connections. Every Bot Chat’s teammate roster then lists them (“Teammates on OTHER connected machines”), with names, roles, and which machine they’re on — and the roster refreshes when agents appear, disappear, or get renamed (capability epoch).
message_agentreaches them directly. A Bot on your laptop messages the cloud agent withmessage_agent(target="moxie", …)exactly like a local teammate. If the same handle exists on several machines, disambiguate withtarget="moxie@<connection>"(the tool’s error tells the Bot the exact forms). Each teammate is listed by the machine’s name from Settings → Connections, so a Bot reads@moxie on Homelabrather than a bare connection id. Delivery rides the Desktop: the sending gateway queues the message, the Desktop relays it to the target connection’s own gateway, the target Bot runs a turn in its canonical Bot Chat — as that chat’s next turn when it is open in a Desktop — and the reply comes back to the sender as the same background completion notification local DMs use (the process that waits for it is a Mibyan entrypoint, so it starts underapprovals.single_query_mode: deny— the default for a Bot’s one-shot reply turn — too; an open chat that has not answered within the live-delivery budget reports the message queued there instead; do not resend). Messages to different Bots are delivered side by side, so one Bot’s long turn never delays another Bot’s mail (or ages it pastbot_mode.envelope_ttl_seconds); messages to the same Bot are delivered in order, one turn at a time.- The Desktop is the courier. Cross-connection delivery works while a Desktop that knows both connections is running (it holds the sockets and the credentials — gateways never see each other’s auth). If the Desktop is closed mid-delivery, the sender’s Bot is told the reply didn’t arrive rather than left hanging; a message the Desktop picked up but never handed to the target (it disconnected in between) is offered to the next drain again — once, and only after the Desktop’s own delivery deadline (~26 minutes) has passed with no reply, so a slow-but-live turn is never delivered twice. The sender keeps waiting long enough for that second delivery to finish (~52 minutes in all); if it still gets no reply, the sender is told so with reason
delivery_timeout. While a re-offered message waits for a drain,bot_mode.envelope_ttl_secondsapplies to it exactly as to a freshly queued one, and the first reply recorded for a message is the one that stands. For always-on machine-to-machine messaging with no Desktop in the loop, register a peer (mibyan peer, below) — the two routes coexist. - A remote
defaultgoes by its title. Every machine’sdefaultis@mibyan, so a remote one is offered — and reachable — under its Bot Mode title instead (a remotedefaulttitled CoS Bot is@cos-bot; with no title,mibyan@<connection>), and a DM it sends arrives signed with that same reply-safe form rather than a bare@mibyanthat would point back at your own default. - The 10-minute cap bounds the target’s turn, not its handoffs. A relayed message gives the target Bot 10 minutes to finish its turn. When that turn messages a teammate itself, the delivery process stays alive afterwards — bounded by
terminal.oneshot_completion_wait_seconds— so the teammate’s reply can land in its Bot Chat (and, when it arrives in time, becomes the answer relayed back). That wait is never counted against the cap: a turn that finished is reported to the sender with its answer, not asdelivery_timeout, and its handoff is left to complete.
Bot-initiated DMs across machines (mibyan peer)
Bots on one machine can message Bots on another machine’s gateway without any desktop in the loop. Register the other gateway as a peer (its API server URL + API_SERVER_KEY):
mibyan peer dm delivers into the remote agent’s canonical Bot Chat over the peer’s existing API server, runs one agent turn there, and prints the reply on stdout — the exact cross-machine twin of the local mibyan -p <bot> chat command.
Use peer dm only for short queries and receipts because it holds one HTTP
connection until the turn finishes. If the peer takes the message but the turn outlasts that
connection, the message is already in the peer’s Bot Chat and the turn keeps running there, so the
command says exactly that instead of reporting the peer unreachable — resending would run the turn
twice. A timeout while connecting still reports the peer unreachable. When the peer’s Bot Chat is
open in its Desktop, the message is handed to that open chat and runs there as its next turn —
whoever is watching sees it, and the reply still comes back on the call (the streaming route answers
the same way, as that turn’s single completion event); if that turn is still going after five
minutes, peer dm reports the message as queued in that chat rather than lost. For a long
turn, peer run returns a
run_id immediately; poll it with peer status. If the peer’s Bot Chat is open in its Desktop, the run is that chat’s next turn and its status follows the chat’s own receipt. The run inherits the
canonical Bot Chat transcript, and a stable --idempotency-key makes a retry
return the original run instead of starting duplicate work. Use peer stop
with that exact run ID to interrupt it without targeting another turn.
Once a peer is registered, the messaging protocol taught to every Bot Chat (agent.bot_mode_protocol) automatically includes the peer roster, and message_agent accepts peer targets directly — message_agent(target="spark/researcher", …), or target="spark" for the peer’s main agent — so your bots learn on their own that teammates exist on other machines and how to reach them. Registering or removing a peer refreshes each Bot Chat’s protocol on its next message (capability epoch).
Requirements: the peer machine runs the api_server gateway platform with a strong API_SERVER_KEY; reachability is your network’s business (LAN, Tailscale, VPN). The key is a credential and lives in ~/.mibyan/.env as mibyan_PEER_<NAME>_KEY; peer names/URLs live in config.yaml under bot_peers.
One-way reachability (NAT)Cross-gateway links are direct gateway-to-gateway connections — Desktop is a
viewer, not a relay. A gateway behind home NAT can dial out to a public peer
(laptop → VPS works), but the reverse direction has no inbound route
(VPS → home fails) unless your network provides one. If your Group Chat spans
a NAT boundary, put the room’s authority on the host every participant can
reach (typically the public VPS), or bridge the network with Tailscale/VPN.
Transferring hosted room authority
Authority takeover is an operator recovery procedure, not an atomic handover. Use the existing JSON-RPC methodsgroups.promote and groups.demote on the
appropriate gateway. There are no groups.peer.promote or groups.peer.demote
methods; groups.capabilities lists the methods your gateway supports.
-
Check replica coverage. On the replacement gateway, inspect
groups.replica_statewith{"room_id":"ROOM_ID"}and comparelast_seqwithlatest_seq. Require a complete replica before planned takeover; promotion itself does not check this coverage.groups.replicatereportscaught_upafter ingesting pages returned bygroups.log; peer registration alone does not prove the replacement has the room history. Caught-up status describes the last replicated page, not proof the old writer has stopped or that no newer events exist. For a planned move, quiesce writers, replicate through the final cursor, then maintain the fence. For disaster recovery, account for any history that never reached the replica. -
Promote only while the old writer is fenced. On the replacement:
room_idandconfirm: trueare required;reasonis optional and defaults toauthority-unreachable. Confirmation is your assertion that the previous authority cannot commit, not a request to fence it automatically. Without confirmation the call returns error4118. A successful result reportsauthority_gateway_idandauthority_epoch(the replicated epoch plus one). -
Demote the old authority before returning it to service. Keep its normal
room writers fenced while applying this RPC through a controlled recovery
connection on the old gateway. Replace the example gateway ID and epoch with
the exact values returned by the successful promotion:
All three parameters are required. Do not guess a future epoch: demotion requires evidence of a newer authority, not an invented value. It records
authority.lostand adopts the observed lineage; repeating the same lineage is idempotent. If the old host is unavailable, keep it fenced and perform this step before restoring its normal writers. -
Verify and reconnect. Read
groups.stateon both gateways and compareroom.authority_gateway_idandroom.authority_epochwith the promotion result. Old-authority sends must be refused; direct clients to the replacement. Demotion fences writes; it does not merge histories or automatically turn the old authoritative store into a synchronized replica.
state.db stores to accept messages and develop divergent histories. A higher
epoch on the replacement does not remotely disable the old writer; equal epochs
are not required for split-brain. If histories have already diverged, fence
writers and preserve both histories for recovery rather than assuming that
promotion, demotion, or replay will merge them.
Bots across machines
When you register several backends in Settings → Connections — the local runtime, remote gateways, SSH hosts, Mibyan Cloud instances — the roster shows the Bots from every connected source, persistently: SSH sources are inventoried without spawning anything on the remote box, and machines that are momentarily unreachable keep their last-known rows instead of vanishing. When the same profile name exists on several sources, handles disambiguate as@name-device (for example @research-homelab). A Bot’s chats, sessions, memory, and routines live on the machine that owns the profile.
Clicking a Connections Bot does not hop your window onto that machine — stay in your chat and @mention it, seat it in a group chat, or create new agents on it directly with the Create on picker. Cloud and local agents share one roster this way: register your Mibyan Cloud instance and your desktop (say, over Tailscale or SSH) and their Bots can message each other and sit in the same rooms, with each agent’s work running on its own machine. Bot-to-bot DMs across those machines go through the Desktop relay automatically (see Messaging across connected machines above).
See Connecting Desktop to Many Mibyan Instances for the full multi-connection guide.
Warm Bot Backends (how many bots run at once)
Each local Bot runs in its own backend process, and Desktop keeps at most Settings → Advanced → Warm Bot Backends of them alive at once (default 3, ~60 MB each). Idle backends are reaped after the idle timeout next to that setting (default 10 minutes); theMibyan backend for profile "<name>" exited (1) line in desktop.log that follows an idle-reap message is that cleanup, not a crash. A Bot you open while every slot is busy waits up to 30 seconds for a slot, then fails with timed out waiting for a free local slot.
Reads of another Bot’s chat history and background transcript refreshes do not take a slot — only an interactive open or a running turn does. If you drive a large fleet (group chats with many members, or Kanban dispatch across many profiles), raise Warm Bot Backends toward the number of Bots you expect to be active at the same time and give the machine the memory to match. Setting it higher than the profiles you actually use only adds startup work.
Turning it off
Bot Mode is a bundled desktop plugin. Flip its Desktop switch off in Capabilities → Plugins → Bots — the roster, the Routines pane, and the composer middleware unregister live, no restart needed. Your profiles, sessions, and cron jobs are untouched either way; Bot Mode never owns your data, it only renders it. There is also a preference to hide the canonical Bot Chats from the regular sidebar session list, so they only appear inside the Bots pane. (This uses the core hidden-session flag; on older gateways the chats simply stay visible.)CLI parity
Because Bots are profiles, everything has a terminal equivalent:
See Profiles for the underlying primitive and Profile Commands for the full CLI reference.

