跳到正文
Skillpedia
自动化7.6k · #13138

automations

它能做什么

这项技能说明如何在 Agent-Native 应用中创建自动化。自动化是智能体遵循的一组指令,可由计划、事件、webhook 或手动触发启动。适合希望日常智能体工作无需每次提出要求即可自动运行的人。

适用场景

  • ✓当你希望智能体按计划执行任务,例如每天早上的时候。
  • ✓当你希望某项任务在特定事件发生时自动开始的时候。
  • ✓当你希望外部服务通过 webhook 启动一项任务的时候。

技能链接

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/automations/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/automations/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“你能设置一个自动化,让它每个工作日早上给我发送新支持工单的摘要吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体将每个自动化保存为一个 markdown 文件,顶部是关于运行时间的几项设置,下方是指令。你也可以随时手动运行它。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Automations

Rule

Automations are the user-facing umbrella for agent-executed tasks that run on demand, in response to events or webhooks, or on a cron schedule. Schedule, Event, Manual, and Webhook are the persisted trigger types. Each automation is a markdown resource under jobs/ with YAML frontmatter describing when and how it fires, and a body containing natural-language instructions the agent follows.

Recurring Jobs is the legacy name and API for scheduled automations. manage-jobs, jobs/, and /agent#jobs remain stable compatibility surfaces. Use manage-automations for new personal or organization automations, including per-automation model overrides and MCP allowlists. Keep manage-jobs for existing schedule-only integrations and delivery metadata.

The Persisted Trigger Types

Type Fires when Trigger-specific fields
schedule Cron expression matches (same as recurring jobs) schedule (required), timezone
event A matching event is emitted on the event bus event (required), condition (optional)
manual A user explicitly invokes run-now None
webhook A POST reaches its generated webhook endpoint None

Event triggers can optionally include a condition -- a natural-language string evaluated by a model against the event payload before dispatch. If the condition does not match, the automation is skipped. Manual automations have no schedule, timezone, event, or condition; they never fire from the scheduler or event bus and run only through manage-automations action=run-now. Webhook automations run only when their generated endpoint is called. The endpoint path contains a secret token; share it only with the intended webhook provider.

The UI's Email received choice is not a persisted trigger type. It is a specialized event editor that persists triggerType: event with event: mail.message.received and represents email filters as the event condition.

How It Works

  1. User asks the agent to create an automation (or uses the app's Automations page in Settings, /settings/automations; open it with open-settings-page page automations).
  2. For an event trigger, the agent calls manage-automations with action=list-events to discover the exact registered event name and payload.
  3. Agent calls manage-automations with action=define to write a jobs/<name>.md resource.
  4. The scheduler acquires due schedule triggers, the event dispatcher acquires matching event triggers, the webhook route accepts authenticated endpoint calls, and manual triggers wait for action=run-now.
  5. Event acquisition enforces owner and organization scope and evaluates any condition against the event payload.
  6. Schedule, event, webhook, and explicit run-now acquisition converge on the shared background-automation runner, which validates identity, resolves the configured model and MCP allowlist, runs the agent loop, handles continuation and delivery, and records usage.
  7. Status (lastRun, lastStatus, lastError) is written back to the resource frontmatter.

Trigger acquisition stays separate by design: the scheduler decides when a cron expression is due, the event dispatcher matches event names, owners, and conditions, the webhook route authenticates its endpoint token, and run-now is the only acquisition path for manual automations. Everything after a trigger is accepted uses the same execution lifecycle.

Markdown Format

---
enabled: true
triggerType: event
event: calendar.booking.created
condition: "attendee email ends with @example.com"
mode: agentic
domain: calendar
createdBy: user@example.com
runAs: creator
---

Send a Slack message to #sales with the booking details.
Use the web-request tool with ${keys.SLACK_WEBHOOK}.

Frontmatter Fields

Field Type Purpose
schedule string Cron expression; new scheduled automations default to once per hour (0 * * * *) when omitted
enabled boolean Whether the automation is active
triggerType "schedule" | "event" | "manual" | "webhook" How the automation fires
event string?
常见问题

四种触发类型是什么?

技能列出的四种类型是计划触发、事件触发、手动触发和 webhook 触发。

事件条件有什么作用?

它是一项自然语言检查,会在自动化启动之前针对事件运行。

它与定期任务有什么区别?

定期任务是计划自动化的旧称,旧的 API 仍然有效。

详情

作者的原始描述

Manual, event-triggered, webhook-triggered, and schedule-triggered automations with optional event conditions. Use when creating automations, wiring events or webhooks, running one on demand, or understanding triggers.

repo: BuilderIO/agent-native

热度

GitHub 星标
7.6k
排名
#13138
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能