Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["1217"],{67648(e,s,t){t.r(s),t.d(s,{metadata:()=>r,default:()=>h,frontMatter:()=>i,contentTitle:()=>o,toc:()=>c,assets:()=>l});var r=JSON.parse('{"id":"integrations/mercury-bots","title":"Mercury Bots \u2014 The Fleet","description":"Persistent, persona-scoped agents that run outside your conversation \u2014 each with its own persona, sandbox, skills, permission scopes, and durable queue. Build fleets with lead bots and crews.","source":"@site/docs/integrations/mercury-bots.mdx","sourceDirName":"integrations","slug":"/integrations/mercury-bots","permalink":"/docs/integrations/mercury-bots","draft":false,"unlisted":false,"editUrl":"https://github.com/cosmicstack-labs/mercury-agent/tree/main/website/docs/integrations/mercury-bots.mdx","tags":[],"version":"current","frontMatter":{"id":"mercury-bots","title":"Mercury Bots \u2014 The Fleet","description":"Persistent, persona-scoped agents that run outside your conversation \u2014 each with its own persona, sandbox, skills, permission scopes, and durable queue. Build fleets with lead bots and crews.","keywords":["bots","fleet","persona","mercury bots","fleet lead","crew","dispatch","dlq","bundles"]},"sidebar":"docsSidebar","previous":{"title":"Web Dashboard","permalink":"/docs/integrations/web-dashboard"},"next":{"title":"Kanban Boards","permalink":"/docs/integrations/kanban-boards"}}'),n=t(74848),d=t(28453);let i={id:"mercury-bots",title:"Mercury Bots \u2014 The Fleet",description:"Persistent, persona-scoped agents that run outside your conversation \u2014 each with its own persona, sandbox, skills, permission scopes, and durable queue. Build fleets with lead bots and crews.",keywords:["bots","fleet","persona","mercury bots","fleet lead","crew","dispatch","dlq","bundles"]},o="Mercury Bots \u2014 The Fleet",l={},c=[{value:"Concepts",id:"concepts",level:2},{value:"Bot vs sub-agent vs channel",id:"bot-vs-sub-agent-vs-channel",level:2},{value:"Quick start",id:"quick-start",level:2},{value:"Commands",id:"commands",level:2},{value:"Workspaces & file access",id:"workspaces--file-access",level:2},{value:"Scheduling & autonomy",id:"scheduling--autonomy",level:2},{value:"From Telegram",id:"from-telegram",level:2},{value:"Bundles",id:"bundles",level:2},{value:"Web cockpit",id:"web-cockpit",level:2},{value:"Observability",id:"observability",level:2},{value:"Security notes",id:"security-notes",level:2}];function a(e){let s={code:"code",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"mercury-bots--the-fleet",children:"Mercury Bots \u2014 The Fleet"})}),"\n",(0,n.jsxs)(s.p,{children:["Mercury Bots are ",(0,n.jsx)(s.strong,{children:"persistent, persona-scoped agents"})," that run ",(0,n.jsx)(s.em,{children:"outside your conversation"}),". Unlike sub-agents (which die with their task) or channels (which answer as one persona), bots are long-lived specialists: each has a name, a character, its own private workspace, its own skill library and permission scopes, a per-bot token budget, and a durable job queue. Dispatch work and keep talking \u2014 the bot works in the background and delivers results in ",(0,n.jsx)(s.strong,{children:"its own thread"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"concepts",children:"Concepts"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Concept"}),(0,n.jsx)(s.th,{children:"What it is"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.strong,{children:"Bot"})}),(0,n.jsxs)(s.td,{children:["A persistent persona agent: ",(0,n.jsx)(s.code,{children:"bot.yaml"})," manifest + ",(0,n.jsx)(s.code,{children:"permissions.yaml"}),", sandbox at ",(0,n.jsx)(s.code,{children:"~/.mercury/bots/<id>/"}),", journal-backed history"]})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.strong,{children:"Wake"})}),(0,n.jsxs)(s.td,{children:["Turning a bot on for a turn (",(0,n.jsx)(s.code,{children:"/bots run <id> [routine]"})," or a dispatched task)"]})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.strong,{children:"Thread"})}),(0,n.jsx)(s.td,{children:"The bot's own chat \u2014 results, thinking streams, and journal history land here, never in your active chat"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.strong,{children:"Fleet lead"})}),(0,n.jsxs)(s.td,{children:["A bot promoted to organize its own crew (",(0,n.jsx)(s.code,{children:"/bots promote <id>"}),") \u2014 tell it ",(0,n.jsx)(s.em,{children:"what"}),", it decides ",(0,n.jsx)(s.em,{children:"how"})," and who"]})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.strong,{children:"Crew"})}),(0,n.jsx)(s.td,{children:"The bots under a lead; results bubble up through the lead; multi-level hierarchies supported"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.strong,{children:"Bundle"})}),(0,n.jsx)(s.td,{children:"Shareable export of a bot (or whole fleet): manifests + personas + permissions + skills"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.strong,{children:"DLQ"})}),(0,n.jsx)(s.td,{children:"Dead-letter queue for failed/timed-out jobs, replayable non-destructively"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.strong,{children:"Needs-you alert"})}),(0,n.jsx)(s.td,{children:"Escalation to your active channel when a bot is blocked (failed job, permission wall, stopped bot)"})]})]})]}),"\n",(0,n.jsx)(s.h2,{id:"bot-vs-sub-agent-vs-channel",children:"Bot vs sub-agent vs channel"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{}),(0,n.jsx)(s.th,{children:"Sub-agent"}),(0,n.jsx)(s.th,{children:"Mercury Bot"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"Lifetime"}),(0,n.jsx)(s.td,{children:"dies with its task"}),(0,n.jsx)(s.td,{children:"persists across restarts"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"Identity"}),(0,n.jsx)(s.td,{children:"anonymous"}),(0,n.jsx)(s.td,{children:"named persona with editable character"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"Workspace"}),(0,n.jsx)(s.td,{children:"session workspace"}),(0,n.jsxs)(s.td,{children:["private sandbox ",(0,n.jsx)(s.code,{children:"~/.mercury/bots/<id>/"})," + shared folder"]})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"Results"}),(0,n.jsx)(s.td,{children:"your chat"}),(0,n.jsx)(s.td,{children:"the bot's own thread"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"Memory"}),(0,n.jsx)(s.td,{children:"none"}),(0,n.jsx)(s.td,{children:"journal history hydrates on reopen"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"Skills"}),(0,n.jsx)(s.td,{children:"session skills"}),(0,n.jsx)(s.td,{children:"native library + per-bot libraries"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"Schedule"}),(0,n.jsx)(s.td,{children:"\u2014"}),(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"bot_schedule"})," \u2014 bots own their routines"]})]})]})]}),"\n",(0,n.jsx)(s.h2,{id:"quick-start",children:"Quick start"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{children:'/bots # roster with live states\n/bots create researcher "Researcher" "Web research specialist"\n/bots persona researcher "Meticulous researcher who cites sources."\n/bots promote researcher # make it a fleet lead (optional)\n/dispatch_bot bot=researcher task="Compare X vs Y, cite sources"\n/bots open researcher # open its thread\n'})}),"\n",(0,n.jsxs)(s.p,{children:["The result lands in the researcher's thread \u2014 your chat stays clean. Check on it with ",(0,n.jsx)(s.code,{children:"/bots"})," or open its thread and reply directly."]}),"\n",(0,n.jsx)(s.h2,{id:"commands",children:"Commands"}),"\n",(0,n.jsx)(s.p,{children:"Run these inside a conversation with Mercury (CLI, Telegram, Discord, Slack, or Web):"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Command"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"/bots"})}),(0,n.jsx)(s.td,{children:"Roster with live states \u2014 on Telegram with tappable Stop/Start/Run/Runs buttons per bot and a fleet row (Cost, Outputs, Doctor, Stop all)"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:'/bots create <id> "Name" "Description"'})}),(0,n.jsx)(s.td,{children:"Onboard a bot (persona, permission tier, fleet, budget size, and where results land)"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"/bots open <id>"})}),(0,n.jsx)(s.td,{children:"Open the bot's own thread (TUI)"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"/bot <id> <message>"})," or ",(0,n.jsx)(s.code,{children:"@<id> <message>"})]}),(0,n.jsx)(s.td,{children:"Dispatch a task; the result (and any delivered files) come back to the chat that asked"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"/bots cost [days]"})}),(0,n.jsx)(s.td,{children:"Token spend per bot and fleet, today against the caps"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"/bots outputs [id]"})," \xb7 ",(0,n.jsx)(s.code,{children:"/bots folder <id>"})," \xb7 ",(0,n.jsx)(s.code,{children:"/bots fetch <id> [name]"})]}),(0,n.jsx)(s.td,{children:"What was delivered; open the folder; send a file to this chat"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"/bots show <id> [runId]"})," \xb7 ",(0,n.jsx)(s.code,{children:"/bots journal <id>"})]}),(0,n.jsx)(s.td,{children:"What a run did (tools, deliveries, reply) \xb7 recent runs"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"/bots tasks <leadId>"})}),(0,n.jsx)(s.td,{children:"A lead's delegated tasks and their results"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"/bots budget <id> <tokens|suggest|none>"})}),(0,n.jsx)(s.td,{children:"Daily token cap (default 5M; none = unlimited)"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"/bots persona <id> <text>"})," \xb7 ",(0,n.jsx)(s.code,{children:"/bots edit <id> <field> <value>"})]}),(0,n.jsx)(s.td,{children:"Character \xb7 any config field"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"/bots permissions <id> [readonly|builder|operator|full]"})}),(0,n.jsx)(s.td,{children:"Capability tier"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"/bots promote <id>"})," / ",(0,n.jsx)(s.code,{children:"demote"})," \xb7 ",(0,n.jsx)(s.code,{children:"/bots crew <leadId>"})," \xb7 ",(0,n.jsx)(s.code,{children:"/bots add-crew"})," / ",(0,n.jsx)(s.code,{children:"remove-crew"})]}),(0,n.jsx)(s.td,{children:"Fleet structure"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"/bots stop <id>"})," / ",(0,n.jsx)(s.code,{children:"start <id>"})," \xb7 ",(0,n.jsx)(s.code,{children:"/bots stop all"})," / ",(0,n.jsx)(s.code,{children:"start all"})]}),(0,n.jsx)(s.td,{children:"Hold and resume one bot (and its crew) \xb7 the whole fleet"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"/bots enable <id>"})," / ",(0,n.jsx)(s.code,{children:"disable <id>"})]}),(0,n.jsx)(s.td,{children:"Suspend/reactivate (imported bots start disabled)"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"/bots run <id> [routine]"})}),(0,n.jsx)(s.td,{children:"Fire a routine now, or a bare wake"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"/bots dlq [clear [id]]"})," \xb7 ",(0,n.jsx)(s.code,{children:"/bots replay <id> <jobId>"})]}),(0,n.jsx)(s.td,{children:"Failed jobs; drop them; re-run one"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"/bots doctor"})," \xb7 ",(0,n.jsx)(s.code,{children:"/bots storage"})]}),(0,n.jsx)(s.td,{children:"Fleet health \xb7 disk usage"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsxs)(s.td,{children:[(0,n.jsx)(s.code,{children:"/bots export <id> [path]"})," \xb7 ",(0,n.jsx)(s.code,{children:"/bots import <path>"})]}),(0,n.jsx)(s.td,{children:"Bundles (a lead's carries its crew; imports start disabled)"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"/bots help"})}),(0,n.jsx)(s.td,{children:"This list, inside any chat"})]})]})]}),"\n",(0,n.jsxs)(s.p,{children:["CLI mirrors the read-only surface \u2014 ",(0,n.jsx)(s.code,{children:"mercury bots doctor"})," (fleet health check, exit 1 when actionable), ",(0,n.jsx)(s.code,{children:"mercury bots list"}),", ",(0,n.jsx)(s.code,{children:"mercury bots storage"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"workspaces--file-access",children:"Workspaces & file access"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["Every bot gets a ",(0,n.jsx)(s.strong,{children:"private sandbox"}),": ",(0,n.jsx)(s.code,{children:"~/.mercury/bots/<id>/"}),". Work stays isolated; other bots can't wander into it."]}),"\n",(0,n.jsxs)(s.li,{children:["The fleet-shared folder ",(0,n.jsx)(s.code,{children:"~/.mercury/bots/_shared/"})," is for cross-bot files \u2014 implicit grants for crew members, explicit for leads."]}),"\n",(0,n.jsxs)(s.li,{children:["Access scopes (",(0,n.jsx)(s.strong,{children:"read / write / execute"})," per directory) are declared in the bot's ",(0,n.jsx)(s.code,{children:"permissions.yaml"}),"; hand-edits apply live; malformed entries skip + warn rather than crash."]}),"\n",(0,n.jsxs)(s.li,{children:["Shell approval follows the bot's own allow-list (",(0,n.jsx)(s.code,{children:"permissions.yaml autoApproveCommands"}),")."]}),"\n",(0,n.jsxs)(s.li,{children:["Finished results exit via ",(0,n.jsx)(s.strong,{children:(0,n.jsx)(s.code,{children:"bot_deliver"})})," into a folder you can actually find: ",(0,n.jsx)(s.code,{children:"~/Documents/Mercury/<Bot name>/"})," (Windows: Documents; Termux: shared storage; ",(0,n.jsx)(s.code,{children:"bots.deliverablesDir"})," in ",(0,n.jsx)(s.code,{children:"mercury.yaml"})," overrides). Finals sit on top, crew work under ",(0,n.jsx)(s.code,{children:"work/"}),", with a README index and files named ",(0,n.jsx)(s.code,{children:"2026-10-10 Oxide Series D explained.md"}),". The path is shown when you onboard a bot and in ",(0,n.jsx)(s.code,{children:"/bots"}),"; ",(0,n.jsx)(s.code,{children:"/bots outputs"})," lists deliveries and ",(0,n.jsx)(s.code,{children:"/bots folder <id>"})," opens the folder."]}),"\n",(0,n.jsx)(s.li,{children:"Writes to the shared folder are budgeted per run \u2014 it is for data other bots consume, not for notes. Bots never write to the deliverables folder by hand."}),"\n",(0,n.jsxs)(s.li,{children:["The ",(0,n.jsx)(s.strong,{children:"retention janitor"})," enforces per-bot disk caps (journal rotation, DLQ cap), so a forgotten fleet can't fill your disk."]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"scheduling--autonomy",children:"Scheduling & autonomy"}),"\n",(0,n.jsxs)(s.p,{children:["Bots own routines through ",(0,n.jsx)(s.code,{children:"bot_schedule"})," \u2014 schedule their own future runs and recurring jobs, visible in ",(0,n.jsx)(s.code,{children:"/tasks"})," and the fleet doctor. Leads additionally self-organize: give a lead a goal and it recruits crew, splits work, and synthesizes results upward."]}),"\n",(0,n.jsx)(s.p,{children:"Every unattended run is governed:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"A turn is capped"})," at 300k tokens and 20 minutes (",(0,n.jsx)(s.code,{children:"autonomy.maxTokensPerTurn"}),", ",(0,n.jsx)(s.code,{children:"maxTurnMinutes"})," in ",(0,n.jsx)(s.code,{children:"bot.yaml"}),"); long context is compacted automatically."]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Every bot has a daily token cap"})," \u2014 5M unless you set one with ",(0,n.jsx)(s.code,{children:"/bots budget <id> <tokens|suggest|none>"})," \u2014 and the fleet has one (",(0,n.jsx)(s.code,{children:"bots.fleetDailyTokenBudget"}),"). You are warned at 80%; at 100% the bot pauses until tomorrow."]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"A routine tick is skipped, never queued,"})," while the bot is still busy or within its routine's minimum interval (",(0,n.jsx)(s.code,{children:"schedules[].minIntervalMinutes"}),"). A cadence you declare in ",(0,n.jsx)(s.code,{children:"bot.yaml"})," is honoured as written; routines a bot creates for itself run at most every 30 minutes, at most three per bot."]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Bots stay online."})," A bot is idle between runs, never dead: a routine that keeps producing nothing is cooled down (6 hours, doubling to a day) and resumes by itself; budget pauses lift at midnight and queued work is pumped then; ",(0,n.jsx)(s.code,{children:"/bots doctor"})," flags a bot whose routine has not fired in twice its cadence (",(0,n.jsx)(s.code,{children:"stale"}),"). Bots run in their own lane \u2014 they never touch your main chat or code session."]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Leads delegate typed tasks"})," with ",(0,n.jsx)(s.code,{children:"fleet_delegate"}),' \u2014 several at once, each with a goal and what "done" means \u2014 and are woken ',(0,n.jsx)(s.strong,{children:"once"})," with a digest when the batch finishes or its deadline passes. A lead's standard job can be declared as a ",(0,n.jsx)(s.strong,{children:"pipeline"})," in ",(0,n.jsx)(s.code,{children:"bot.yaml"})," (",(0,n.jsx)(s.code,{children:"pipeline.stages"}),"), and ",(0,n.jsx)(s.code,{children:"fleet_pipeline"})," runs it end to end with no lead turn between stages:"]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-yaml",children:'pipeline:\n name: article\n stages:\n - { name: research, bot: source-researcher, goal: "Build a sourced dossier on {{input}}" }\n - { name: draft, bot: article-writer-draft, goal: "Write the 800\u20131000 word piece from {{previous}}" }\n - { name: check, bot: fact-checker, goal: "Fact-check {{previous}} and fix what fails" }\n - { name: package, bot: delivery-packager, goal: "Finalise {{previous}} for delivery", final: true }\n'})}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Bots remember."})," After a productive run, durable facts (sources, decisions, where things are) go into the bot's own memory, and every turn starts with a digest of its last five runs plus its own working-state note (",(0,n.jsx)(s.code,{children:"bot_state"}),"). ",(0,n.jsx)(s.code,{children:"bots.fleets.crewProvider"})," puts crew work on a cheaper provider."]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"A run is judged by what it did,"})," not by what it says: delivered a file, took an action, delegated, or nothing. A routine that only writes notes gets one nudge to deliver; three empty runs in a row cool it down (6h, doubling to 24h; it resumes by itself, or ",(0,n.jsx)(s.code,{children:"/bots start"})," resumes it now). Monitoring routines can declare ",(0,n.jsx)(s.code,{children:"expects: check"})," to be allowed to find nothing."]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"from-telegram",children:"From Telegram"}),"\n",(0,n.jsxs)(s.p,{children:["Everything above works from your phone: ",(0,n.jsx)(s.code,{children:"/bots"})," and ",(0,n.jsx)(s.code,{children:"/bot"})," are in Telegram's command menu, and the roster comes with buttons \u2014 ",(0,n.jsx)(s.strong,{children:"Stop / Start"}),", ",(0,n.jsx)(s.strong,{children:"Run"})," and ",(0,n.jsx)(s.strong,{children:"Runs"})," per bot, and a fleet row with ",(0,n.jsx)(s.strong,{children:"Cost"}),", ",(0,n.jsx)(s.strong,{children:"Outputs"}),", ",(0,n.jsx)(s.strong,{children:"Doctor"})," and ",(0,n.jsx)(s.strong,{children:"Stop all"}),". A tap runs the same slash command you would have typed (same permissions, same reply). Creating a bot works there too: ",(0,n.jsx)(s.code,{children:'/bots create <id> "Name" "Description"'}),", then your next message is its persona, and the template, permissions, fleet and budget steps arrive as buttons. When a bot finishes a task you asked for from Telegram, the reply comes back to that chat ",(0,n.jsx)(s.strong,{children:"with the delivered files attached"}),", not a path on your Mac; ",(0,n.jsx)(s.code,{children:"/bots outputs <id>"})," lists what a bot has delivered with a \u{1F4CE} button per file, and ",(0,n.jsx)(s.code,{children:"/bots fetch <id> [name|latest]"})," sends one."]}),"\n",(0,n.jsx)(s.h2,{id:"bundles",children:"Bundles"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{children:"/bots export <id> # single bot (or whole crew if lead / whole fleet)\n/bots import <path> # recreate bots \u2014 starts disabled by design\n"})}),"\n",(0,n.jsxs)(s.p,{children:["Bundles contain manifests, personas, permissions, and skill libraries so a recreated fleet works identically. What never travels: ",(0,n.jsx)(s.code,{children:"~/.mercury/bots/<id>/"})," sandbox state, journals, and ",(0,n.jsx)(s.code,{children:".env"})," secrets. Import locally, review, ",(0,n.jsx)(s.code,{children:"/bots enable"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"web-cockpit",children:"Web cockpit"}),"\n",(0,n.jsx)(s.p,{children:"The local dashboard ('Mercury Bots' section) shows the live roster, per-bot threads with streamed thinking, needs-you badges, and a fleet step view that mirrors the TUI (solo / lead auto-build / lead manual)."}),"\n",(0,n.jsx)(s.h2,{id:"observability",children:"Observability"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsxs)(s.strong,{children:[(0,n.jsx)(s.code,{children:"/bots"})," roster"]})," \u2014 live per-bot states (running / waiting / stopped / needs-you)."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.strong,{children:(0,n.jsx)(s.code,{children:"/bots cost [days]"})})," \u2014 token spend per bot and fleet against the caps; ",(0,n.jsx)(s.strong,{children:(0,n.jsx)(s.code,{children:"/bots show <id> [runId]"})})," \u2014 the tool trace, deliveries and reply of a run; ",(0,n.jsx)(s.strong,{children:(0,n.jsx)(s.code,{children:"/bots stop all"})})," \u2014 the kill switch; ",(0,n.jsx)(s.strong,{children:(0,n.jsx)(s.code,{children:"/bots dlq clear"})})," \u2014 drop dead-lettered jobs."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.strong,{children:"Journals"})," \u2014 per-bot run history with real timings, steps, tool calls, the outcome (",(0,n.jsx)(s.code,{children:"deliverable"}),", ",(0,n.jsx)(s.code,{children:"action"}),", ",(0,n.jsx)(s.code,{children:"delegated"}),", ",(0,n.jsx)(s.code,{children:"message"}),", ",(0,n.jsx)(s.code,{children:"none"}),") and delivered paths; a compact transcript per run is kept (last 50)."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.strong,{children:"DLQ + replay"})," \u2014 failures classify honestly (",(0,n.jsx)(s.code,{children:"failed"}),", ",(0,n.jsx)(s.code,{children:"timed out"}),") and replay non-destructively."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.strong,{children:(0,n.jsx)(s.code,{children:"/bots doctor"})})," (in any chat) and ",(0,n.jsx)(s.strong,{children:(0,n.jsx)(s.code,{children:"mercury bots doctor"})})," \u2014 storage health, stale routines, whole-home write grants, outcome ratio, queue depth, journal rotation, and scheduler linkage (routines registered but never wired are flagged before they silently never fire)."]}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"security-notes",children:"Security notes"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Bots are persona-scoped: tools, skills, and scopes come from the bot's own manifests, not from your session."}),"\n",(0,n.jsxs)(s.li,{children:["Permission tiers (",(0,n.jsx)(s.code,{children:"ask"})," / ",(0,n.jsx)(s.code,{children:"allow"}),") are chosen explicitly at onboarding \u2014 nothing defaults silently."]}),"\n",(0,n.jsxs)(s.li,{children:["Bots stopped with ",(0,n.jsx)(s.code,{children:"/bots stop"})," hold their queued jobs; nothing sneaks back in via the due-sweep until you ",(0,n.jsx)(s.code,{children:"/bots start"}),"."]}),"\n",(0,n.jsx)(s.li,{children:"Imported bundles start disabled \u2014 inspect before enabling."}),"\n"]})]})}function h(e={}){let{wrapper:s}={...(0,d.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(a,{...e})}):a(e)}},28453(e,s,t){t.d(s,{R:()=>i,x:()=>o});var r=t(96540);let n={},d=r.createContext(n);function i(e){let s=r.useContext(d);return r.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),r.createElement(d.Provider,{value:s},e.children)}}}]);