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
| Field | Purpose |
|---|---|
| Label | Display name (e.g. "Daily News Summary") |
| Goal | What the bot should accomplish each run |
| Persona | System prompt that shapes the bot's behavior |
| Schedule | Once, Continuous, Interval, Hourly, or Daily |
| ModelName | Which model the bot uses |
| Temperature / MaxTokens | Inference parameters for this bot |
| EnabledSkillIdsCsv | Skills active during bot execution |
| Status | Current lifecycle state (see below) |
Bot Lifecycle
A bot moves through these statuses:
| Icon | Status | Meaning |
|---|---|---|
| ○ | Idle | Waiting for the next scheduled run |
| ▶ | Running | Actively executing its action plan |
| ⚠ | WaitingForInput | Encountered an error and needs your guidance (flashes in TUI) |
| ✓ | Completed | Finished the goal successfully |
| ✗ | Failed | Exhausted retries |
| ■ | Stopped | Manually terminated via /kill |
The Plan-Execute-Synthesize Loop
When a bot runs, the BotEngine follows this cycle:
- Plan – The AI generates an
ActionPlanwith 2–5 steps based on the goal and persona. Each step has a description and a pending status. - 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.
- Synthesize – After all steps complete, the engine logs a final
result summary. If any step errored, the bot may transition to WaitingForInput
and store
RetryGuidancefor 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:
- Goal – What should the bot accomplish? (e.g. "Summarize today's top tech news")
- Label – A short name for the sidebar (e.g. "Tech News")
- Persona – System prompt shaping behavior (e.g. "You are a concise tech journalist")
- Schedule – Once, Continuous, Interval (custom minutes), Hourly, or Daily
- 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.