Module 6 · Bots & Automation

What Is a Bot?

A Bot (BotInstance) is an autonomous agent that runs on a schedule without your interaction. You give it a goal and a persona, and DaisiBot's BotEngine executes a plan-execute-synthesize loop to accomplish it.

Bots are the biggest differentiator from simple chat — they turn DaisiBot from a conversational tool into a background automation engine.

Bot Anatomy

FieldPurpose
LabelDisplay name (e.g. "Daily News Summary")
GoalWhat the bot should accomplish each run
PersonaSystem prompt that shapes the bot's behavior
ScheduleOnce, Continuous, Interval, Hourly, or Daily
ModelNameWhich model the bot uses
Temperature / MaxTokensInference parameters for this bot
EnabledSkillIdsCsvSkills active during bot execution
StatusCurrent lifecycle state (see below)

Bot Lifecycle

A bot moves through these statuses:

Idle Running Completed
IconStatusMeaning
IdleWaiting for the next scheduled run
RunningActively executing its action plan
WaitingForInputEncountered an error and needs your guidance (flashes in TUI)
CompletedFinished the goal successfully
FailedExhausted retries
StoppedManually terminated via /kill

The Plan-Execute-Synthesize Loop

When a bot runs, the BotEngine follows this cycle:

  1. Plan – The AI generates an ActionPlan with 2–5 steps based on the goal and persona. Each step has a description and a pending status.
  2. Execute – Each step runs sequentially with tool access. The step status updates in real time (Pending → Executing → Completed or Error). Results are stored per-step.
  3. Synthesize – After all steps complete, the engine logs a final result summary. If any step errored, the bot may transition to WaitingForInput and store RetryGuidance for the next attempt.

The scheduler checks every 30 seconds (first check 2 seconds after startup) and triggers any bot whose NextRunAt has passed.

Creating a Bot (TUI Wizard)

The TUI provides a step-by-step creation wizard:

  1. Goal – What should the bot accomplish? (e.g. "Summarize today's top tech news")
  2. Label – A short name for the sidebar (e.g. "Tech News")
  3. Persona – System prompt shaping behavior (e.g. "You are a concise tech journalist")
  4. Schedule – Once, Continuous, Interval (custom minutes), Hourly, or Daily
  5. Start Mode – Run Immediately or Schedule First Run

In MAUI and Web, the same fields appear in a form dialog.

Monitoring & Managing Bots

  • Sidebar – In the TUI Bot screen (F2), each bot shows a status icon and label. Select one to see its output log.
  • /status – Shows detailed info for the selected bot or a summary of all bots.
  • /runnow – Triggers immediate execution without affecting the schedule.
  • /kill – Shows a confirmation dialog, then stops and deletes the bot.
  • Log output – Color-coded entries: bold magenta for steps, bold cyan for results, bold red for errors, yellow for warnings.

Error Recovery

When a bot step fails, the BotEngine transitions to WaitingForInput. The TUI flashes the icon to get your attention. You can provide retry guidance — a text instruction that gets injected into the next attempt so the bot can adjust its approach. The bot stores RetryGuidance, LastError, and ExecutionCount to learn from failures.

Active Recall Checkpoint

Cover the answers and test yourself before peeking.

1. What are the three phases of the BotEngine execution loop?

Reveal answer

Plan (generate action steps), Execute (run each step with tools), Synthesize (summarize results and handle errors).

2. How often does the bot scheduler check for due bots?

Reveal answer

Every 30 seconds (with the first check at 2 seconds after startup).

3. What happens when a bot enters WaitingForInput status?

Reveal answer

The bot encountered an error and is waiting for you to provide retry guidance. In TUI the status icon flashes to get your attention.

4. Name the five schedule types for bots.

Reveal answer

Once, Continuous, Interval (custom minutes), Hourly, Daily.