> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bumbleagi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Automations

> Scheduled routines, emergence, and journal integration.

Automations are scheduled routines the entity runs on its own — cron-style schedules with full perceive cycles, optional platform delivery, self-modification, and journal integration.

<Tip>Automations require daemon mode (`bumblebee run`, not `bumblebee talk`). APScheduler manages the schedule.</Tip>

## Enable

```yaml theme={null}
automations:
  enabled: true
  max_automations: 50
  max_failures: 5
```

## How they work

When an automation fires, the entity receives a **synthetic user message** describing the routine and its run count. It runs a **full perceive cycle** — tools, reasoning, memory — just like a real conversation. The result can be:

<Columns>
  <div>
    ### Delivered

    If `deliver_to` is set (e.g. `telegram:CHAT_ID`), the reply is sent to that platform. The user sees a proactive message from the entity.
  </div>

  <div>
    ### Journaled

    If no delivery target or journal is enabled, the entity writes a private journal entry. The automation still ran — the entity thought about something on its own.
  </div>
</Columns>

## Managing automations

Entities create and manage their own routines through conversation:

| Tool                 | What it does                                                    |
| -------------------- | --------------------------------------------------------------- |
| `create_automation`  | New routine with name, cron schedule, prompt, optional delivery |
| `edit_automation`    | Modify fields on an existing routine                            |
| `delete_automation`  | Remove a routine                                                |
| `list_automations`   | Show all routines                                               |
| `toggle_automation`  | Enable or disable                                               |
| `run_automation_now` | Trigger immediately                                             |

On Telegram, `/routines` lists all automations with emoji indicators, natural schedule descriptions, and delivery targets.

## Self-modification

After each successful run, the automation engine checks whether the entity wants to **modify its own schedule**. The entity can:

* **Reschedule** — natural language parsed to cron
* **Disable** — pause the routine
* **Self-destruct** — optional LLM YES/NO evaluation on a condition, then delete

## Failure handling

Consecutive failures increment a counter. At `max_failures` (default 5), the automation is disabled and removed from the scheduler. An apology-style message is broadcast to configured platforms.

## Emergence

Emergence analyzes the entity's recent behavior and **suggests new automations** it might benefit from — grounded in actual memory and relationships, not generic ideas.

```yaml theme={null}
automations:
  emergence:
    enabled: true
    analysis_interval: 7200
    max_suggestions: 3
```

The emergence engine looks at:

* **Episode word frequency** — what topics come up most
* **Relationship gaps** — high warmth + long silence = "check in on someone"
* **Drive state** — persistently high curiosity might suggest a research routine

Suggestions include a title, reasoning, example schedule, and optional delivery target.

## Journal integration

```yaml theme={null}
automations:
  journal:
    enabled: true
    max_entries: 1000
```

When journaling is enabled, automations that don't deliver to a platform write their output to `journal.md`. This gives the entity a private record of its autonomous activity — what it thought about, what it did, and when.

## Automation definitions

Definitions persist in the entity database (SQLite or Postgres). They survive restarts and redeploys.
