- No LLM call. Zero tokens, zero agent loop, zero model spend.
- Script is the job. The script decides whether to alert. Emit output → message gets sent. Emit nothing → silent tick.
- Bash or Python.
.sh/.bashfiles run underbashfromPATHwhen available, otherwise/bin/bash; any other extension runs under the current Python interpreter. A Python script can also pin a user-managed venv via--interpreter(see Using your own Python environment). Paths must resolve inside~/.mibyan/scripts/(relative, absolute, or~forms are OK if they stay in that directory). Cron scripts do not inherit provider credentials from the Mibyan process environment. - Same scheduler. Lives in
cronjobalongside LLM jobs — pausing, resuming, listing, logs, and delivery targeting all work the same way.
When to Use It
Use no-agent mode for:- Memory / disk / GPU watchdogs. Run every 5 minutes, alert only when a threshold is breached.
- CI hooks. Deploy finished → post the commit SHA. Build failed → send the last 100 lines of the log.
- Periodic metrics. “Daily Stripe revenue at 9am” as a simple API call + pretty-print.
- External event pollers. Check an API, alert on state change.
- Heartbeats. Ping a dashboard every N minutes to prove the host is alive.
Create One from Chat
The real win of no-agent mode is that the agent itself can set up the watchdog for you — no editor, no shell, no remembering CLI flags. You describe what you want, Mibyan writes the script, schedules it, and tells you when it’ll fire.Example transcript
You: ping me on telegram if RAM is over 85% every 5 minutes Mibyan: (writesUnder the hood, the agent makes two tool calls:~/.mibyan/scripts/memory-watchdog.sh, then callscronjob(...)withno_agent=true) Set up. Runs every 5 min, alerts Telegram only when RAM is over 85%. Script:memory-watchdog.sh. Job ID:abc123.
What the agent decides for you
When you phrase a request like “alert me when X” or “every N minutes check Y and tell me if Z”, Mibyan’cronjob_manage tool description tells it to reach for no_agent=True whenever the message content is fully determined by the script. It falls back to the normal LLM-driven path when the request needs reasoning (“summarize the new issues”, “pick the most interesting headlines”, “draft a friendly reminder”).
You don’t have to specify --no-agent yourself. Just describe the behavior.
Managing watchdogs from chat
The agent can pause, resume, edit, and remove jobs the same way it creates them:You: stop the memory watchdog for tonight Mibyan: (callscronjob(action='pause', job_id='abc123')) Paused. Resume with “turn it back on” or viamibyan cron resume abc123.
You: change it to every 15 minutes
Mibyan: (calls cronjob(action='update', job_id='abc123', schedule='every 15m'))
The full lifecycle (create / list / update / pause / resume / run-now / remove) is available to the agent without you learning any CLI commands.
Create One from the CLI
Prefer the shell? The CLI path gives you the same result with three commands:How Script Output Maps to Delivery
The “silent when empty” behavior is the key to the classic watchdog pattern: the script is free to run every minute, but the channel only sees a message when something actually needs attention.
Script Rules
Scripts must resolve inside~/.mibyan/scripts/. This is enforced at run time — relative names, absolute paths, and ~-prefixed paths are accepted when the resolved target stays in that directory; path traversal and symlink escapes are rejected. The same directory is shared with the pre-check script gate used by LLM jobs.
Interpreter choice is by file extension:
We intentionally do NOT honour
#!/... shebangs — keeping the interpreter set explicit and small reduces the surface the scheduler trusts.
Using your own Python environment
By default a Python cron script runs under Mibyan’ own Python environment, which only carries Mibyan’ own dependencies — so a script that importsopenpyxl, a database driver, or any other package you installed would fail with ModuleNotFoundError.
You can point the job at a user-managed venv instead with --interpreter:
--model, this is a user-owned setting: set it with mibyan cron create/edit; the agent’s cronjob tool can’t.
Rules:
- The venv is user-managed. Mibyan does not create, freeze, restore, or install packages into it — it just invokes the path you give.
- The path must be absolute or
~-prefixed (e.g.~/venvs/reporting/bin/python3). Bare names likepython3are rejected, because they are not stable acrossPATHchanges. - It must be a Python executable (
python,python3,python3.12, …), including a symlink’s target —/bin/bashor other interpreters are refused. - Applies only to Python scripts.
.sh/.bashalways run under bash regardless. - The job-level setting applies to both
scriptandmonitor_scriptwhen they are Python files. - It is validated at run time, not at creation — a cron job is long-lived, and the venv may be rebuilt or moved between when you create the job and when it fires. A missing or non-executable interpreter produces a clear script failure that is delivered like any other error.
- To clear it later:
mibyan cron edit <job_id> --interpreter "".
Schedule Syntax
Same as all other cron jobs:Delivery Targets
--deliver accepts everything the gateway knows about. Some common shapes:
~/.mibyan/.env / ~/.mibyan/config.yaml.
Editing and Lifecycle
Worked Example: Disk Space Alert
Comparison with Other Patterns
For critical system-health watchdogs that must fire even when the gateway is down, use OS-level cron with a plain
curl to a Mibyan webhook subscription (or any external alerting endpoint) — those run as independent OS processes and don’t depend on Mibyan being up. The in-gateway scheduler is the right choice when the thing being monitored is external.
Related
- Automate Anything with Cron — LLM-driven cron patterns.
- Scheduled Tasks (Cron) reference — full schedule syntax, lifecycle, delivery routing.
- Webhook Subscriptions — fire-and-forget HTTP entry points for external schedulers.
- Gateway Internals — delivery-router internals.

