automate
Load before schedules, event sources, triggers or tasks. Routes events to one consumer and stops loops.
- License 许可
- Apache-2.0
- 所属仓库
- gents-ai/gents
- 最近更新
- 2026-11-15
- Stars
- ★ 24
- Forks
- 4
01 前言 Front Matter
- name
- automate
- description
- Load before schedules, event sources, triggers or tasks. Routes events to one consumer and stops loops.
03 SKILL.md 正文
Automate
A source (a schedule or a new document) fires a trigger. The trigger starts a task, which runs an agent with a prompt rendered from the firing document.
One consumer per event
Waking every agent to check whether an event is theirs wastes inference and creates sessions. Put the deciding field on the document and filter on it. In a turn-based app, the event names who moves next and each player's trigger filters on it.
Never feed your own trigger
A task that writes to the collection that fires it can loop until the node goes down. Before enabling anything, trace what each task writes and what that fires. Write elsewhere, or make the filter unable to match the task's own output.
Sessions and concurrency
- New session per fire: the default, for fires that stand alone.
- One continuing session per key, for memory: set
session_id_templateto a key such asgame:{{ doc.game_id }}:red, withcreate_session: true. The first fire creates it. - Concurrency:
parallel(default),queued_serialruns in order,serialskips while busy,latest_onlysupersedes. A periodic refresh wantsserial; one session per key wantsqueued_serial. - A trigger disables itself at
max_fires_per_hourand says why in its last error.
Keep the agent small
Its Tools carry only what its task needs. A routine job is one tool call and a short reply. An agent never configures its own triggers.
Turn it on one step at a time
Enable one trigger, cause one event, and inspect its request, session and output. Count the fires. If there are more than expected, disable the trigger first. Then enable the rest. Send any failure someone must know about to the mailbox.
Next: control-access.
04 同仓库更多 Skills
write_plugin
暂无简介
use-database
Load before designing an app's data. What DefraDB does for you, and how to shape collections.
plan-work
Load first when asked to build or automate an app for people. Sets the checks and build order.
package-pack
Load when a working app should become a pack, or when installing or changing a pack. Export, check, install, versions.
diagnose-node
Load when a trigger, tool, request or session didn't work as expected. Gives the order of checks.
design_page
暂无简介