Skip to main content
ollim-bot has five extensibility mechanisms: routines, reminders, webhooks, MCP tools, and subagents. Each serves a different trigger pattern and interaction model, but the scheduling mechanisms share a common execution path and configuration schema. All scheduling mechanisms — routines, reminders, and webhooks — are data-driven. Each is a markdown file with YAML frontmatter stored in ~/.ollim-bot/. The scheduler picks up changes every 10 seconds. No code changes required to add new instances.

Mechanisms

Decision matrix

MechanismTriggerRecurrenceSession modelBest for
RoutinesCron scheduleRecurringBackground forkDaily check-ins, weekly reviews, periodic monitoring
RemindersSpecific timeOnce (chainable via follow_up_chain)Background forkTime-based nudges, progressive follow-up workflows
WebhooksHTTP POST from external systemOn-demandBackground forkGitHub events, monitoring alerts, form submissions
MCP toolsAgent decision during conversationPer-interactionCurrent sessionStructured embeds, user pings, fork management
SubagentsDelegated by main agentPer-invocationBackground forkEmail triage, history review, responsiveness analysis
Interactive forks/fork command or enter_fork toolPer-sessionForked from mainDeep dives, research, tangents without context bloat

Choosing between routines and reminders

Use routines when you want something to fire on a recurring schedule — every weekday at 9am, every Sunday evening. Routines persist until removed. Use reminders when you want a one-shot prompt at a specific time. For progressive workflows (e.g., “check if the user responded, then follow up”), set max_chain and let the agent call follow_up_chain to schedule continuations.

Choosing between webhooks and routines

Both run as background forks. Use webhooks when the trigger comes from an external system (a GitHub push, a monitoring alert). Use routines when the trigger is time-based. Webhooks include 4-layer input security: JSON Schema validation, content fencing, Haiku screening of strings, and operational limits.

Shared configuration

Routines, reminders, and webhooks all dispatch through the same background fork execution path (run_agent_background). They share these YAML frontmatter fields:
FieldTypeDefaultDescription
backgroundbooleanfalseRun in a background fork instead of the main session (routines and reminders only — webhooks are always background)
modelstringOverride the default model (haiku, sonnet, opus)
thinkingbooleantrueEnable extended thinking
isolatedbooleanfalseRun without main session history or fork state
update_main_sessionstringon_pingalways, on_ping, freely, or blocked — controls report_updates behavior
allow_pingbooleantrueWhether ping_user and discord_embed are available
allowed_toolslistAllowlist of tools — routines and reminders only (overrides defaults, mutually exclusive with disallowed_tools)
disallowed_toolslistBlocklist of tools — routines and reminders only (mutually exclusive with allowed_tools)
All three mechanisms are markdown files with YAML frontmatter stored in ~/.ollim-bot/. The agent can create and manage them directly using Glob, Read, Write, and Edit tools — no CLI required.

Background fork execution

When a routine, reminder, or webhook fires with background: true, the scheduler:
  1. Creates a disposable forked session (or an isolated session if isolated: true)
  2. Injects a preamble with current ping budget, upcoming schedule, and refill timing
  3. Runs the prompt with the configured model and tool restrictions
  4. Discards the fork — text output is never shown directly
The agent communicates results through MCP tools: ping_user for plain text alerts, discord_embed for structured messages, and report_updates to queue a summary for the next main session interaction. If neither ping_user nor report_updates is called, the fork is silently discarded with zero context bloat.
Background forks run without holding the agent lock. When the user is mid-conversation, non-critical pings return errors and the agent falls back to report_updates. Critical pings (critical: true) bypass all three checks — per-session limit, busy state, and ping budget. They are tracked in a separate critical_used daily counter but do not consume budget tokens.

Next steps