Automations
An automation watches a list for new items and does something for each one. “When a new decision shows up in my memory, file an issue.” “When a new conversation is captured, summarize it in my console.” This page is for people who are comfortable with the console and a little JSON.
What an automation is
Every automation has the same shape:
- A trigger. One tool call that returns a list, such as “recent issues” or “new memories”. awe calls it on an interval you choose (15 minutes by default).
- A check for what is new. awe remembers the items it has already seen and keeps only the new ones.
- Actions. For each new item, awe runs your actions in order. An action is a tool call or a skill.
That is the only kind of trigger there is. To be exact about what an automation is not:
- It does not receive webhooks. Nothing is pushed to it. It asks, on its interval.
- It does not watch files or folders.
- It has no time-only trigger. Something that should happen at 9am is a scheduled task, not an automation.
Because the trigger is polled, an automation notices a new item up to one interval after it appears. A shorter interval reacts sooner and calls the trigger more often.
| You want | Use |
|---|---|
| Something at a set time or every N hours | A scheduled task: awe-scheduler.md |
| Something only when new items appear | An automation |
| Several steps per new item, each using the one before | An automation |
Where to find them
Console → Activity → Scheduled. Scheduled tasks and automations share one table. The Event-driven chip shows only automations. An automation’s row reads “when server · tool has new items”.
On each automation row:
| Control | What it does |
|---|---|
| Enabled toggle | Switches it on or off. Its memory of seen items is kept |
| Run | Runs it now and records the run |
| Runs | Opens its run history, with the result of every step for every item |
| ✕ | Deletes it and its run history |
The run history view also has Pin (keep the automation’s chat tab in your tab row) and Reset (forget which items were seen).
Create one
- Console → Activity → Scheduled → + New task → When new items appear in…
- Fill in the form:
- Name: must be unique.
- Interval (minutes): how often to check. Default 15.
- Max events per run: how many new items one run acts on. Default 5.
- Trigger: pick a connected server, then a tool, then fill in the tool’s arguments.
- Event ID path (optional): where each item’s id is in the tool’s answer, as a dotted path such as
issues.id. Leave it blank and awe looks for a list underitems,results,issues,data,rowsorrecords. - Actions: add one step at a time. Each step is Call a tool or Run a skill.
- Notify webhook URL and Notify text template (optional): a chat webhook (Slack, Discord and similar) that awe posts to after a run that found something new. See “What a run does” below.
- Post to pinned chat tab when new events are found: gives the automation its own chat tab where awe summarizes what it found.
- Press Create automation.
The first run does nothing on purpose. It records the items that already exist and runs no actions, so you are not flooded with a month of history. Actions start with the first item that appears after that.
Using an item in an action
Inside an action’s text fields, {{...}} is replaced with values from the current item or from an earlier step.
| Token | Value |
|---|---|
{{trigger}} |
The whole new item, as JSON |
{{trigger.title}} |
A field of the item |
{{trigger.issue.id}} |
A nested field |
{{action1}} |
The whole result of step 1 (available from step 2 on) |
{{action1.items.0.id}} |
A field of that result. A number picks from a list |
A path that does not exist becomes empty text. There are no conditions or loops. For more logic, make the action a skill.
A skill as an action
A skill action hands the new item to a skill:
{ "kind": "skill", "skill": "growth-signal", "prompt_template": "New signal: {{trigger.title}} {{trigger.url}}" }
The filled-in template is what the skill receives. A skill with its own console tab runs there, the same way its scheduled runs do. A skill that is still a draft is refused until you promote it. See skills.md.
Triggers that watch awe itself
Any tool on a connected server can be a trigger. Five tools on the built-in awe-recall server exist for the purpose. Each answers “what is new since last time” about awe’s own data.
| Tool | New items are | Filters |
|---|---|---|
feed_captures |
Captured conversations (ChatGPT, Claude, Claude Code, chat apps) | source_glob (default capture:*) |
feed_memories |
Things awe remembered | tag, scope_glob, min_importance, pinned_only |
feed_contradictions |
Open contradictions: two remembered values for one thing | slot_glob |
feed_json_file |
Entries in a JSON file inside the awe folder that one of your scripts keeps up to date | path (required), items_path, id_field, at_field, where, min, max |
feed_extraction_failures |
Conversations awe failed to learn from. This is about awe’s health, not about you | none |
All five also take limit (default 25, at most 100). They return a cursor, which awe stores and hands back on the next run so nothing is missed or repeated. You never set the cursor yourself.
Try one by hand:
./awe-core call awe-recall feed_memories '{"tag":"DECISION","limit":3}'
Ideas that use them:
- File my decisions. Trigger
feed_memorieswith{"tag":"DECISION","scope_glob":"capture:web:*","min_importance":7}, then an action that creates an issue titledDecision: {{trigger.text}}. - Summarize new captures. Trigger
feed_captures, no actions, with the pinned chat tab on. - Tell me when two facts disagree. Trigger
feed_contradictions, with the pinned chat tab on.
What a run does
Each run:
- Calls the trigger tool.
- Works out which items are new.
- Acts on up to Max events per run of them. The rest are held for the next run, never dropped. The run’s note says how many were deferred.
- Posts to the notify webhook, if one is set and the run found something new. The JSON carries
automation,events_matched,textandtimestamp. The text is your template filled in from the first new item, or a default line with the count. A run that finds nothing new posts nothing. - Writes a run record and sets the next run time.
The pinned chat tab is quieter: a run that finds nothing new writes nothing there, and a run that finds new items writes one summary covering all of them. When a skill action ran, its own output takes the place of that summary.
awe keeps the ids of the last 500 items it has seen. If a trigger without a cursor returns more than 500 items at once, older ones can come round again. Use a tighter filter in the trigger’s arguments.
Pausing after repeated failures
If an automation’s trigger call fails 10 runs in a row, awe pauses it. This is the circuit breaker. It keeps a broken automation, most often one whose login has expired, from failing every few minutes for ever. A failed action does not count: the run is marked failed, but as long as the trigger works the automation keeps running.
When that happens:
- The row shows that it is paused, how many runs failed, and the last error, with a link to reconnect the app.
- awe records a finding, so it also shows up where awe reports things it has noticed.
./awe-core findingslists it. - An automation with a pinned chat tab gets one message there saying the same.
Fix the cause, then press Resume on the row. That switches it back on and clears the failure count. Change the limit with AWE_AUTOMATION_BREAKER_LIMIT in .env.
Automations awe proposes
awe looks for tool chains you repeat and drafts skills from them. When a chain starts with a call that returns a list, it also drafts an automation: the list call as the trigger and the rest as actions. A proposed automation is switched off and labelled Proposed. Nothing runs until you switch it on.
To offer automations for drafts that already exist:
./awe-core skill propose --from-drafts --dry-run # list what would be offered
./awe-core skill propose --from-drafts # offer them, switched off
The API
There is no command-line command for automations. Use the console, or these routes on http://127.0.0.1:8765. awe must be running.
| Method and path | What it does |
|---|---|
GET /api/automations |
List all |
GET /api/automations/:id |
One automation and its recent runs |
POST /api/automations |
Create |
PATCH /api/automations/:id |
Change any field. {"enabled": true} also clears a pause |
POST /api/automations/:id/run |
Run it now. Answers with the run record. Works even when it is switched off |
POST /api/automations/:id/reset-state |
Forget seen items. The next run is a first run again |
DELETE /api/automations/:id |
Delete it and its run history |
Create one:
curl -s -X POST http://127.0.0.1:8765/api/automations \
-H 'Content-Type: application/json' \
-d '{
"name": "decisions-to-console",
"interval_minutes": 15,
"trigger": {
"integration": "awe-recall",
"tool": "feed_memories",
"args": { "tag": "DECISION", "limit": 3 }
},
"actions": [],
"post_to_chat": true
}'
Fields for create and change:
| Field | Notes |
|---|---|
name |
Required, unique |
trigger |
Required: integration (the server name), tool, args, optional event_id_path |
actions |
A list. Each is {"integration","tool","args"} or {"kind":"skill","skill","prompt_template"} |
notify |
{"url","template"} |
interval_minutes |
Default 15 |
max_events_per_run |
Default 5 |
enabled |
Default true |
post_to_chat |
Default false |
description |
Optional |
A missing trigger tool, or a skill action with no skill name, is refused with a 400. A name that is already taken is refused with a 409.
Settings
Setting in .env |
Default | What it does |
|---|---|---|
AWE_WORKER_AUTOMATIONS |
on | Set to 0 to pause every automation at once |
AWE_AUTOMATION_BREAKER_LIMIT |
10 |
Failed trigger calls in a row before an automation is paused |
AWE_WORKER_SCHEDULER_INTERVAL_SECS |
60 |
How often awe looks for due automations and tasks |
Webhooks are a separate feature
awe can receive webhooks, but not as automation triggers. A webhook is a named address that another service posts to. awe puts what arrived into a chat as a message and, if a model is set up, answers it there.
| Method and path | What it does |
|---|---|
GET /api/webhooks |
List webhooks. Secrets are masked |
POST /api/webhooks |
Create one. name and url are required. Optional: secret, conversation_id, enabled |
PUT /api/webhooks/:id |
Change one |
POST /api/webhooks/:id/toggle |
Switch it on or off |
DELETE /api/webhooks/:id |
Delete it |
POST /api/webhooks/receive/:name |
The address the other service posts JSON to |
If you set a secret, every post must carry a matching HMAC-SHA256 signature in X-Webhook-Signature or X-Hub-Signature-256, in the form sha256=<hex>. A post without one is refused. The signature is checked against the exact bytes you send, so sign the body as you post it. Without conversation_id, messages go to the heartbeat chat.
The console listens on your own computer only. A service on the internet cannot reach it unless you put something in front of it.
Troubleshooting
It never runs. Check that it is switched on, and that awe is running. Look at its next run time, or press Run.
The first run found items but did nothing. That is the first-run rule. Wait for a new item, or accept that existing items are skipped.
The trigger returns data but nothing counts as new. awe could not find the list or the ids. Set Event ID path. If the whole answer is one thing you care about, leave it blank: awe treats the whole answer as a single item and acts when it changes.
An action got empty values. A {{...}} path that does not exist becomes empty text. Open Runs to see what each step received.
It paused itself. See “Pausing after repeated failures” above. Reconnect the app under Apps, then press Resume.
Related
- awe-scheduler.md: reminders and tasks that run on a clock
- skills.md: skills, which can be automation actions
- skill-console.md: skills with their own chat tab
- proactive-loops.md: findings, including paused automations
- connections.md: connecting the apps a trigger or action uses
- mcp-host.md: how servers and their tools are connected