Skip to content

BuilderIO/agent-native / packages/core/docs

agent-native-docs

Unverified

How to look up version-matched Agent-Native framework docs and source in node_modules. Use before coding against @agent-native/core APIs or advanced features.

FileKindSize
AGENTS.mdmarkdown6.0 KB
SKILL.mdskill md2.2 KB
content/a2a-protocol.mdxmarkdown37.6 KB
content/actions-access-control.mdxmarkdown28.9 KB
content/actions-advanced.mdxmarkdown13.1 KB
content/actions-agent-tools.mdxmarkdown5.6 KB
content/actions-defining.mdxmarkdown31.2 KB
content/actions-other-surfaces.mdxmarkdown10.3 KB
content/actions-overview.mdxmarkdown8.3 KB
content/actions-run-context.mdxmarkdown9.1 KB
content/add-ui-to-your-agent.mdxmarkdown5.0 KB
content/administered-deployments.mdxmarkdown7.7 KB
content/agent-mentions.mdxmarkdown10.2 KB
content/agent-native-config.mdxmarkdown34.9 KB
content/agent-native-toolkit.mdxmarkdown17.3 KB
content/agent-resources.mdxmarkdown27.0 KB
content/agent-surfaces.mdxmarkdown33.8 KB
content/agent-teams.mdxmarkdown13.4 KB
content/agent-web-surfaces.mdxmarkdown10.7 KB
content/agentkit.mdxmarkdown14.0 KB
content/audit-log.mdxmarkdown14.3 KB
content/authentication.mdxmarkdown30.7 KB
content/automation-connectors.mdxmarkdown7.8 KB
content/automations.mdxmarkdown26.7 KB
content/aws-amplify.mdxmarkdown10.7 KB
content/aws-lambda.mdxmarkdown13.9 KB
content/aws-rds.mdxmarkdown1.7 KB
content/azure-postgresql.mdxmarkdown1.8 KB
content/azure-static-web-apps.mdxmarkdown9.1 KB
content/blueprint-installer.mdxmarkdown6.3 KB
content/cli-adapters.mdxmarkdown5.7 KB
content/client-advanced.mdxmarkdown13.1 KB
content/client-agent-chat.mdxmarkdown17.7 KB
content/client-data.mdxmarkdown19.3 KB
content/client-entry-points.mdxmarkdown1.2 KB
content/client-overview.mdxmarkdown10.6 KB
content/client-routing.mdxmarkdown5.7 KB
content/client-sync-internals.mdxmarkdown5.2 KB
content/cloneable-saas.mdxmarkdown16.6 KB
content/cloud-sql.mdxmarkdown2.3 KB
content/cloudflare.mdxmarkdown8.3 KB
content/code-agents-ui.mdxmarkdown26.6 KB
content/components.mdxmarkdown42.9 KB
content/context-awareness.mdxmarkdown24.9 KB
content/create-with-an-agent.mdxmarkdown8.8 KB
content/creating-templates.mdxmarkdown21.6 KB
content/cross-app-connect-design.mdxmarkdown8.4 KB
content/cross-app-sso.mdxmarkdown8.7 KB
content/custom-design-system.mdxmarkdown17.3 KB
content/data-programs.mdxmarkdown25.0 KB
content/decisions.mdxmarkdown7.9 KB
content/deno-deploy.mdxmarkdown7.2 KB
content/deploy-an-app.mdxmarkdown5.0 KB
content/deployment-environment-variables.mdxmarkdown16.3 KB
content/deployment.mdxmarkdown11.3 KB
content/dispatch.mdxmarkdown18.6 KB
content/docker.mdxmarkdown8.1 KB
content/docs-components.mdxmarkdown28.9 KB
content/doctor.mdxmarkdown21.3 KB
content/drafts/clips-experimental-features.mdmarkdown5.4 KB
content/drop-in-agent.mdxmarkdown16.0 KB
content/durable-background-runs.mdxmarkdown13.8 KB
content/durable-resume.mdxmarkdown10.0 KB
content/embedding-sdk.mdxmarkdown31.3 KB
content/environment-variables.mdxmarkdown29.9 KB
content/evals.mdxmarkdown12.4 KB
content/extensions.mdxmarkdown34.8 KB
content/external-agents-catalog.mdxmarkdown40.5 KB
content/external-agents.mdxmarkdown29.3 KB
content/file-uploads.mdxmarkdown10.7 KB
content/generative-ui.mdxmarkdown10.8 KB
content/getting-started-actions.mdxmarkdown2.7 KB
content/getting-started-pages.mdxmarkdown2.6 KB
content/getting-started.mdxmarkdown7.2 KB
content/harness-agents.mdxmarkdown16.9 KB
content/http-api.mdxmarkdown20.9 KB
content/integrations.mdxmarkdown33.8 KB
content/internationalization.mdxmarkdown6.2 KB
content/key-concepts.mdxmarkdown30.6 KB
content/koyeb.mdxmarkdown7.3 KB
content/locales/ar-SA/a2a-protocol.mdxmarkdown48.5 KB
content/locales/ar-SA/actions-access-control.mdxmarkdown40.8 KB
content/locales/ar-SA/actions-advanced.mdxmarkdown16.3 KB
content/locales/ar-SA/actions-agent-tools.mdxmarkdown8.1 KB
content/locales/ar-SA/actions-defining.mdxmarkdown42.2 KB
content/locales/ar-SA/actions-other-surfaces.mdxmarkdown14.5 KB
content/locales/ar-SA/actions-overview.mdxmarkdown11.3 KB
content/locales/ar-SA/actions-run-context.mdxmarkdown11.1 KB
content/locales/ar-SA/add-ui-to-your-agent.mdxmarkdown3.7 KB
content/locales/ar-SA/administered-deployments.mdxmarkdown6.4 KB
content/locales/ar-SA/agent-mentions.mdxmarkdown11.8 KB
content/locales/ar-SA/agent-native-toolkit.mdxmarkdown17.3 KB
content/locales/ar-SA/agent-resources.mdxmarkdown36.8 KB
content/locales/ar-SA/agent-surfaces.mdxmarkdown48.4 KB
content/locales/ar-SA/agent-teams.mdxmarkdown18.5 KB
content/locales/ar-SA/agent-web-surfaces.mdxmarkdown14.3 KB
content/locales/ar-SA/audit-log.mdxmarkdown15.9 KB
content/locales/ar-SA/authentication.mdxmarkdown39.8 KB
content/locales/ar-SA/automations.mdxmarkdown31.3 KB
content/locales/ar-SA/aws-amplify.mdxmarkdown14.9 KB
content/locales/ar-SA/aws-lambda.mdxmarkdown18.9 KB
content/locales/ar-SA/aws-rds.mdxmarkdown319 B
content/locales/ar-SA/azure-postgresql.mdxmarkdown344 B
content/locales/ar-SA/azure-static-web-apps.mdxmarkdown12.4 KB
content/locales/ar-SA/blueprint-installer.mdxmarkdown8.4 KB
content/locales/ar-SA/cli-adapters.mdxmarkdown6.7 KB
content/locales/ar-SA/client-advanced.mdxmarkdown17.8 KB
content/locales/ar-SA/client-agent-chat.mdxmarkdown23.0 KB
content/locales/ar-SA/client-data.mdxmarkdown23.8 KB
content/locales/ar-SA/client-entry-points.mdxmarkdown1.6 KB
content/locales/ar-SA/client-overview.mdxmarkdown13.9 KB
content/locales/ar-SA/client-routing.mdxmarkdown7.2 KB
content/locales/ar-SA/client-sync-internals.mdxmarkdown7.3 KB
content/locales/ar-SA/cloneable-saas.mdxmarkdown23.2 KB
content/locales/ar-SA/cloud-sql.mdxmarkdown317 B
content/locales/ar-SA/cloudflare.mdxmarkdown11.9 KB
content/locales/ar-SA/code-agents-ui.mdxmarkdown34.2 KB
content/locales/ar-SA/components.mdxmarkdown51.5 KB
content/locales/ar-SA/context-awareness.mdxmarkdown33.1 KB
content/locales/ar-SA/create-with-an-agent.mdxmarkdown12.2 KB
content/locales/ar-SA/creating-templates.mdxmarkdown26.8 KB
content/locales/ar-SA/cross-app-connect-design.mdxmarkdown1.5 KB
content/locales/ar-SA/cross-app-sso.mdxmarkdown9.7 KB
content/locales/ar-SA/custom-design-system.mdxmarkdown21.6 KB
content/locales/ar-SA/data-programs.mdxmarkdown33.3 KB
content/locales/ar-SA/decisions.mdxmarkdown9.1 KB
content/locales/ar-SA/deno-deploy.mdxmarkdown10.1 KB
content/locales/ar-SA/deploy-an-app.mdxmarkdown7.1 KB
content/locales/ar-SA/deployment-environment-variables.mdxmarkdown21.3 KB
content/locales/ar-SA/deployment.mdxmarkdown13.9 KB
content/locales/ar-SA/dispatch.mdxmarkdown27.3 KB
content/locales/ar-SA/docker.mdxmarkdown11.3 KB
content/locales/ar-SA/doctor.mdxmarkdown3.4 KB
content/locales/ar-SA/drop-in-agent.mdxmarkdown20.8 KB
content/locales/ar-SA/durable-resume.mdxmarkdown15.4 KB
content/locales/ar-SA/embedding-sdk.mdxmarkdown41.3 KB
content/locales/ar-SA/evals.mdxmarkdown13.3 KB
content/locales/ar-SA/extensions.mdxmarkdown34.0 KB
content/locales/ar-SA/external-agents.mdxmarkdown89.3 KB
content/locales/ar-SA/file-uploads.mdxmarkdown13.4 KB
content/locales/ar-SA/getting-started-actions.mdxmarkdown3.2 KB
content/locales/ar-SA/getting-started-pages.mdxmarkdown3.2 KB
content/locales/ar-SA/getting-started.mdxmarkdown9.7 KB
content/locales/ar-SA/harness-agents.mdxmarkdown22.3 KB
content/locales/ar-SA/internationalization.mdxmarkdown8.2 KB
content/locales/ar-SA/key-concepts.mdxmarkdown42.0 KB
content/locales/ar-SA/koyeb.mdxmarkdown10.2 KB
content/locales/ar-SA/mcp-apps.mdxmarkdown33.7 KB
content/locales/ar-SA/mcp-clients.mdxmarkdown35.0 KB
content/locales/ar-SA/mcp-protocol.mdxmarkdown27.6 KB
content/locales/ar-SA/messaging.mdxmarkdown59.2 KB
content/locales/ar-SA/multi-app-workspace.mdxmarkdown36.2 KB
content/locales/ar-SA/multi-tenancy.mdxmarkdown7.5 KB
content/locales/ar-SA/native-chat-ui.mdxmarkdown21.3 KB
content/locales/ar-SA/neon.mdxmarkdown244 B
content/locales/ar-SA/netlify.mdxmarkdown15.2 KB
content/locales/ar-SA/node-docker.mdxmarkdown878 B
content/locales/ar-SA/node-js.mdxmarkdown8.4 KB
content/locales/ar-SA/notifications.mdxmarkdown16.2 KB
content/locales/ar-SA/observability.mdxmarkdown45.2 KB
content/locales/ar-SA/observational-memory.mdxmarkdown10.9 KB
content/locales/ar-SA/onboarding.mdxmarkdown16.9 KB
content/locales/ar-SA/organizations-teams-permissions.mdxmarkdown5.9 KB
content/locales/ar-SA/package-lifecycle.mdxmarkdown3.0 KB
content/locales/ar-SA/plan-plugin.mdxmarkdown23.0 KB
content/locales/ar-SA/portal.mdxmarkdown636 B
content/locales/ar-SA/postgres.mdxmarkdown487 B
content/locales/ar-SA/pr-visual-recap.mdxmarkdown53.9 KB
content/locales/ar-SA/privacy-and-data-rights.mdxmarkdown6.2 KB
content/locales/ar-SA/processors.mdxmarkdown8.7 KB
content/locales/ar-SA/progress.mdxmarkdown10.7 KB
content/locales/ar-SA/pure-agent-apps.mdxmarkdown5.0 KB
content/locales/ar-SA/real-time-collaboration.mdxmarkdown55.6 KB
content/locales/ar-SA/recorder.mdxmarkdown16.7 KB
content/locales/ar-SA/recurring-jobs.mdxmarkdown23.8 KB
content/locales/ar-SA/render.mdxmarkdown11.2 KB
content/locales/ar-SA/sandbox-adapters.mdxmarkdown18.0 KB
content/locales/ar-SA/security.mdxmarkdown31.5 KB
content/locales/ar-SA/server-database.mdxmarkdown27.6 KB
content/locales/ar-SA/server-middleware.mdxmarkdown7.9 KB
content/locales/ar-SA/server-overview.mdxmarkdown12.2 KB
content/locales/ar-SA/server-plugins.mdxmarkdown9.1 KB
content/locales/ar-SA/server-routes.mdxmarkdown14.3 KB
content/locales/ar-SA/sharing.mdxmarkdown28.6 KB
content/locales/ar-SA/skills-guide.mdxmarkdown27.0 KB
content/locales/ar-SA/ssr-caching.mdxmarkdown7.4 KB
content/locales/ar-SA/supabase.mdxmarkdown264 B
content/locales/ar-SA/syncing-template-changes.mdxmarkdown11.7 KB
content/locales/ar-SA/telemetry.mdxmarkdown21.9 KB
content/locales/ar-SA/template-analytics.mdxmarkdown26.4 KB
content/locales/ar-SA/template-assets.mdxmarkdown31.9 KB
content/locales/ar-SA/template-brain.mdxmarkdown29.7 KB
content/locales/ar-SA/template-calendar-agent.mdxmarkdown10.2 KB
content/locales/ar-SA/template-calendar-developers.mdxmarkdown33.4 KB
content/locales/ar-SA/template-calendar-features.mdxmarkdown14.4 KB
content/locales/ar-SA/template-calendar-integrations.mdxmarkdown6.2 KB
content/locales/ar-SA/template-calendar.mdxmarkdown4.4 KB
content/locales/ar-SA/template-chat-agent.mdxmarkdown4.7 KB
content/locales/ar-SA/template-chat-developers.mdxmarkdown31.3 KB
content/locales/ar-SA/template-chat-features.mdxmarkdown9.9 KB

content/locales/ar-SA/recurring-jobs.mdx

View on GitHub
---
title: "الوظائف المتكررة"
description: "تعمل المطالبات المجدولة بواسطة Cron على تشغيل الوكيل من تلقاء نفسه - الملخصات اليومية والتقارير الأسبوعية والاستقصاء كل ساعة."
---

# الوظائف المتكررة

**المهمة المتكررة** هي مطالبة يتم تشغيلها وفقًا لجدول cron. إنها الطريقة التي يقوم بها الوكيل بالأشياء من تلقاء نفسه: "كل صباح في الساعة 7، قم بتلخيص رسائل البريد الإلكتروني الليلية الخاصة بي،" "كل يوم اثنين أنشر أرقام الاشتراك الأسبوع الماضي في Slack،" "كل ساعة ابحث عن المسودات القديمة وقم بحذفها."

<Callout tone="info">

**Recurring Jobs** هو الاسم القديم للأتمتة من النوع **Scheduled**. ‏**Automations** هو المفهوم الشامل لنوعي **Scheduled** و**Event**. تبقى ملفات `jobs/` وأداة `manage-jobs` للتكاملات القديمة المجدولة فقط. استخدم `manage-automations` وواجهة **Settings › Automations** للعمل الشخصي أو المؤسسي الجديد، بما في ذلك النموذج وقوائم MCP.

</Callout>

يتم تشغيل المهام المتكررة على مدار الساعة. للتفاعل مع _events_ (تم إنشاء الحجز، واستلام بريد إلكتروني) - نفس تنسيق ملف `jobs/` بالإضافة إلى الشروط - راجع [Automations](/docs/automations).

توجد الوظائف في [موارد الوكيل](/docs/agent-resources) في `jobs/<name>.md` - مجرد ملف Markdown مع المادة الأمامية YAML. لا يوجد تسجيل، لا الأسلاك. قم بإسقاط الملف وسيلتقطه إطار العمل.

## ملف الوظيفة {#job-file}

<AnnotatedCode
  id="doc-block-1xuuw14"
  title="jobs/morning-digest.md"
  filename="jobs/morning-digest.md"
  language="markdown"
  code={
    '---\nschedule: "0 7 * * *"\nenabled: true\nrunAs: creator\n---\n\n# الملخص الصباحي\n\nتلخيص رسائل البريد الإلكتروني المستلمة خلال الليل. التجميع حسب مجال المرسل.\nقم بتثبيت أهم 3 سلاسل رسائل تبدو وكأنها تحتاج إلى رد اليوم في التصنيف\n"يلزم الرد". مسودة ردود على أي ردود واضحة.'
  }
  annotations={[
    {
      lines: "2",
      label: "متى",
      note: "كرون قياسي ذو 5 حقول — `0 7 * * *` كل يوم في الساعة 07:00.",
    },
    {
      lines: "3",
      label: "مفتاح الإيقاف المؤقت",
      note: "Flip to `false` to stop the job without deleting it.",
    },
    {
      lines: "4",
      label: "الهوية",
      note: "`creator` runs with the owner's identity and `ANTHROPIC_API_KEY`; `shared` uses the org's key.",
    },
    {
      lines: "7-12",
      label: "الموجه",
      note: "النص هو مجرد موجه — يقوم الوكيل بتشغيله عند كل إطلاق بكل أدواته العادية وسياق الوكيل.",
    },
  ]}
/>

هذا كل شيء. الجسم عبارة عن موجه يقوم العميل بتشغيله عند كل إطلاق مجدول. يتمتع الوكيل بحق الوصول إلى نفس الأدوات وسياق الوكيل الموجود في الدردشة التفاعلية — actions، skills، الذاكرة، خوادم MCP المتصلة، الوكلاء الفرعيون.

## المهمه الاماميه {#frontmatter}

| الحقل        | اكتب                          | الافتراضي   | الوصف                                                                                                   |
| ------------ | ----------------------------- | ----------- | ------------------------------------------------------------------------------------------------------- |
| `schedule`   | تعبير كرون                    | _(مطلوب)_   | كرون قياسي ذو 5 حقول. `"0 7 * * *"` = كل يوم الساعة 07:00؛ `"0 */4 * * *"` = كل 4 ساعات.                |
| `enabled`    | منطقية                        | `true`      | انتقل إلى `false` للإيقاف مؤقتًا دون حذف المهمة.                                                        |
| `runAs`      | `"creator"` \| `"shared"`     | `"creator"` | يتم تشغيل `"creator"` باستخدام هوية مالك الوظيفة و`ANTHROPIC_API_KEY`. يستخدم `"shared"` مفتاح المؤسسة. |
| `createdBy`  | البريد الإلكتروني             | _(تلقائي)_  | يتم نشره عند إنشاء الوظيفة من خلال موارد الوكيل UI أو بواسطة الوكيل.                                    |
| `orgId`      | سلسلة                         | _(تلقائي)_  | نطاق المؤسسة؛ موروثة من مؤسسة المنشئ النشطة.                                                            |
| `appId`      | سلسلة                         | _(تلقائي)_  | التطبيق الذي يشغّل مجدوله الوظيفة. يتخطى المجدول أي وظيفة تُسمّي تطبيقًا آخر.                           |
| `lastRun`    | الطابع الزمني ISO             | _(مُدار)_   | يكتبه المجدول بعد كل تشغيل.                                                                             |
| `lastStatus` | `"success"` \| `"error"` \| … | _(مُدار)_   | أحدث النتائج.                                                                                           |
| `lastError`  | سلسلة                         | _(مُدار)_   | رسالة خطأ في حالة فشل التشغيل الأخير.                                                                   |
| `nextRun`    | الطابع الزمني ISO             | _(مُدار)_   | محسوب من `schedule`؛ يستخدمه المجدول لتحديد موعد الإطلاق التالي.                                        |
| `mcpTools`   | مصفوفة أسماء أدوات MCP        | _(لا شيء)_  | قائمة سماح صريحة اختيارية مثل `mcp__server__tool`؛ تبقى بيانات الاعتماد في منحة MCP المتصلة.            |

تتم كتابة الحقول `last*` و`nextRun` بواسطة المجدول. يمكنك قراءتها لرؤية السجل، لكن لا تقم بتحريرها يدويًا - سيتم استبدالها في المرة التالية.

## توصيل أدوات MCP بمهمة {#connected-mcps}

يمكن للمهام المتكررة استخدام أدوات MCP بعيدة أو محلية متصلة بالفعل بالتطبيق. اطلب من الوكيل اكتشاف الأسماء الدقيقة باستخدام `tool-search`، ثم اربط فقط الأدوات التي تحتاجها المهمة باستخدام `mcpTools`:

```md
---
schedule: "0 * * * *"
enabled: true
mcpTools:
  ["mcp__meeting-notes__list_recordings", "mcp__meeting-notes__get_transcript"]
---

ابحث عن تسجيلات جديدة منذ آخر تشغيل ناجح. استخرج فقط المتابعات القابلة للتنفيذ، ثم استدعِ إجراء الاستيراد المحدود للتطبيق مرة واحدة مع معرّفات مصدر وخارجية ثابتة، واقتباس قصير، ورابط التسجيل. لا تستورد النص الكامل للتفريغ.
```

تخزن المهمة أسماء الأدوات، لا عناوين URL الخاصة بـ MCP أو رموز الوصول أو رموز تحديث OAuth. في وقت التشغيل، يحل الإطار المنحة المتصلة في سياق طلب منشئ المهمة أو مؤسستها ولا يعرض إلا الأدوات المدرجة في قائمة السماح. حافظ على القائمة محدودة، واستخدم إجراء تطبيق متكررًا بأمان للاستيراد النهائي كي لا تنشئ عمليات التشغيل المتداخلة سجلات مكررة. راجع [عملاء MCP](/docs/mcp-clients) لإعداد الاتصال وOAuth.

## بناء جملة كرون {#cron}

كرون قياسي ذو 5 حقول (الدقيقة، الساعة، يوم من الشهر، شهر، يوم من الأسبوع):

| كرون           | المعنى                    |
| -------------- | ------------------------- |
| `*/5 * * * *`  | كل 5 دقائق                |
| `0 * * * *`    | كل ساعة على مدار الساعة   |
| `0 */4 * * *`  | كل 4 ساعات                |
| `0 7 * * *`    | كل يوم الساعة 07:00       |
| `0 9 * * 1`    | كل يوم اثنين الساعة 09:00 |
| `0 17 * * 1-5` | أيام الأسبوع الساعة 17:00 |
| `0 0 1 * *`    | اليوم الأول من كل شهر     |

يتضمن إطار العمل أدوات مساعدة cron (`isValidCron()` و`describeCron()`) للتحقق من صحة وعرض سلاسل cron، المستخدمة داخليًا بواسطة طبقات الموارد والمجدولة.

## إنشاء وظيفة {#creating}

### من واجهة Automations

افتح **Settings › Automations**، ثم أنشئ أتمتة من نوع **Scheduled**. الروابط القديمة `/agent#jobs` تعيد التوجيه إلى هناك.

### من علامة التبويب "موارد الوكيل"

`+` → **المهمة المجدولة** في لوحة موارد الوكيل. املأ المطالبة والجدول الزمني. يتم الحفظ باسم `jobs/<slug>.md` ويبدأ التشغيل عند علامة الاختيار المطابقة التالية.

### من خلال سؤال الوكيل

> "قم بإنشاء مهمة مجدولة تلخص رسائل البريد الإلكتروني غير المقروءة كل صباح الساعة 7."

يقوم الوكيل بكتابة الملف نيابةً عنك.

### باليد

أسقط ملف Markdown في `jobs/` عبر مورد إطار العمل APIs:

```ts
import { resourcePut } from "@agent-native/core/resources";

await resourcePut(
  ownerEmail,
  "jobs/morning-digest.md",
  `---
schedule: "0 7 * * *"
enabled: true
---
Summarize overnight emails.`,
);
```

## كيفية تشغيل المجدول {#how-scheduler-runs}

في كل نبضة، يعثر المجدول (روتين `processRecurringJobs()` الداخلي) على المهام المستحقة ويشغّلها. يعتمد ما يُطلق النبضة على مكان تشغيل التطبيق:

| المضيف                                                           | ما يُطلق النبضة                                             | المتطلبات والقيود                                                                                          |
| ---------------------------------------------------------------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| خادم طويل التشغيل (Node.js، Docker، Fly، Render، خادم VPS)       | مؤقت داخل العملية كل 60 ثانية، يبدأ بعد 10 ثوانٍ من الإقلاع | يعمل ما دامت العملية قيد التشغيل.                                                                          |
| [Netlify](/docs/netlify)                                         | دالة مجدولة يُصدرها البناء، كل دقيقة                        | عمليات النشر المنشورة فقط، وليس Deploy Previews أو عمليات نشر الفروع أبدًا. يحتاج البناء إلى `A2A_SECRET`. |
| [Vercel](/docs/vercel#vercel-scheduled-work)                     | مهمة cron في Vercel يضيفها البناء، كل دقيقة افتراضيًا       | نشر الإنتاج فقط. يحتاج إلى `CRON_SECRET`. يمكن لمشاريع Hobby تشغيلها مرة واحدة يوميًا على الأكثر.          |
| [Cloudflare Workers](/docs/cloudflare#cloudflare-scheduled-work) | Cron Trigger يضيفه البناء إلى `wrangler.json`، كل دقيقة     | يحتاج إلى `A2A_SECRET` كسرّ للـ Worker.                                                                    |
| AWS Lambda                                                       | لا شيء                                                      | لا تنطلق الأتمتة المجدولة.                                                                                 |
| التطوير المحلي                                                   | لا شيء، ما لم تفعّله بنفسك                                  | راجع التنبيه أدناه.                                                                                        |

على Netlify وVercel وCloudflare، تُفرغ النبضة نفسها أيضًا قائمة انتظار الأتمتة المُشغَّلة بالأحداث، وتنظّف عمليات التشغيل التي انقطعت دالتها، وتشغّل عمليات المسح الخاصة بالتطبيقات مثل التأجيل وجدولة الإرسال في Mail. أما النشر على serverless بلا مُشغِّل فلا يحصل على شيء من ذلك: تنتظر الأتمتة المُشغَّلة بالأحداث في قائمة الانتظار، وتبقى عمليات التشغيل المنقطعة عالقة. تُرسَل الأتمتة المُشغَّلة عبر webhook و**Run now** بشكل مستقل، لذا تظل تعمل. عندما يتعذر على النشر إطلاق الجداول، تذكر صفحة **Automations** ذلك وتوضح السبب.

<Diagram id="doc-block-1y301ov" title={"علامة جدولة واحدة"} summary={"في كل نبضة، يعثر المجدول على المهام المستحقة، ثم يرسلها عبر دورة حياة التنفيذ في الخلفية نفسها التي تمر بها أتمتة الأحداث."}>

```html
<div class="sched">
  <div class="diagram-box accent">نبضة المجدول &bull; كل دقيقة &#8635;</div>
  <div class="diagram-arrow diagram-muted" aria-hidden="true">&darr;</div>
  <div class="diagram-card">
    <span class="diagram-pill">1 &middot; scan</span
    ><small class="diagram-muted"
      >list every enabled <code>jobs/*.md</code> across all owners</small
    >
  </div>
  <div class="diagram-arrow diagram-muted" aria-hidden="true">&darr;</div>
  <div class="diagram-card">
    <span class="diagram-pill">2 &middot; due?</span
    ><small class="diagram-muted">compare <code>nextRun</code> to now</small>
  </div>
  <div class="diagram-arrow diagram-muted" aria-hidden="true">&darr;</div>
  <div class="diagram-card accent">
    <span class="diagram-pill accent">3 &middot; run</span
    ><small class="diagram-muted"
      >يتحقق المشغل المشترك من الهوية ويحل النموذج وقائمة MCP والاستمرار
      والتسليم والاستخدام</small
    >
  </div>
  <div class="diagram-arrow diagram-muted" aria-hidden="true">&darr;</div>
  <div class="diagram-card ok">
    <span class="diagram-pill ok">4 &middot; record</span
    ><small class="diagram-muted"
      >write <code>lastRun</code> / <code>lastStatus</code> /
      <code>lastError</code>, recompute <code>nextRun</code></small
    >
  </div>
</div>
```

```css
.sched {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 520px;
}
.sched .diagram-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
}
.sched .diagram-box {
  align-self: flex-start;
}
.sched .diagram-arrow {
  font-size: 18px;
  align-self: center;
}
```

</Diagram>

<Callout id="doc-block-j6yn07" tone="risk">

**المثيل الدافئ لا يشغّل الجداول.** لا تبدأ مضيفات serverless المؤقت داخل العملية أبدًا، لذا لا تؤدي طلبات keep-alive إلى انطلاق المهام. وحده مُشغِّل المنصة الوارد في الجدول أعلاه يفعل ذلك. وعلى AWS Lambda لا يوجد ما يُطلقها حتى الآن، لذا شغّل الأتمتة المجدولة على مضيف طويل التشغيل (Fly، Render، خادم VPS) بدلًا من ذلك.

</Callout>

<Callout id="doc-block-rj2" tone="warning">

**معطّل افتراضيًا في التطوير المحلي.** لا تبدأ حلقة `setInterval` الخاصة بالمجدول أبدًا عندما تكون قيمة `NODE_ENV` هي `development` أو `test`، أو عندما يشير عنوان URL للتطبيق إلى `localhost` / `127.0.0.1` / `*.localhost` — وهو ما يغطي معظم إعدادات التطوير المحلي. اضبط `AGENT_NATIVE_ENABLE_LOCAL_RECURRING_JOBS=1` لتشغيل المجدول محليًا رغم ذلك. ولإيقاف المهام المجدولة على أي مضيف، استخدم `AGENT_NATIVE_DISABLE_RECURRING_JOBS=1` الموضح فيما يلي.

</Callout>

<Callout id="doc-block-rj3" tone="warning">

**تتم قراءة `AGENT_NATIVE_DISABLE_RECURRING_JOBS` في نطاقين.** على Netlify وVercel وCloudflare، تكون بيئة **البناء** هي الحاسمة: يستمر مُشغِّل المنصة في الانطلاق لتفريغ أتمتة الأحداث وتنظيف عمليات التشغيل، لكن البناء الذي يكون فيه المفتاح مفعّلًا يتخطى المهام المجدولة، بغض النظر عما تقوله البيئة المنشورة. وعلى خادم طويل التشغيل، تتحكم بيئة **وقت التشغيل** في المؤقت داخل العملية. اضبطه حيث يقرؤه مضيفك. يسجّل البناء قراره، حتى تتمكن صفحة **Automations** من الإشارة إلى أن الجداول لن تعمل أبدًا بدلًا من عرض موعد تشغيل تالٍ لن يلتزم به شيء.

</Callout>

### تشغيل الوظائف ضمن `appId` آخر {#additional-job-app-ids}

يشغّل المجدول الوظيفة عندما يطابق `appId` الخاص بالوظيفة `appId` الخاص بالتطبيق. ولتشغيل ملفات الوظائف الموسومة بـ `appId` مختلف أيضًا، أدرج الوسوم الإضافية في `additionalJobAppIds`:

```ts filename="server/plugins/agent-chat.ts"
export default createAgentChatPlugin({
  appId: "my-app",
  additionalJobAppIds: ["my-app-reports"],
  // ...
});
```

يتخطى أي بناء لا يُدرج الوسم هذه الملفات دون أن يحجزها أو يشغّلها أو يكتب فيها، وهذا ما يتيح لعمليتي نشر على قاعدة بيانات واحدة أن تقسّما وظائفهما. ولا يوسّع الخيار إلا نطاق الملفات التي يلتقطها هذا التطبيق. تبقى lease المجدول وسجل التشغيل وصفوف الصحة ضمن `appId`، لذلك تتناوب عمليات النشر التي تشترك في قاعدة البيانات نفسها على lease واحد. وإذا وضع التطبيق **Run now** لهذه الوظائف في قائمة الانتظار، فمرّر القائمة نفسها بوصفها `additionalJobAppIds` إلى `queueAutomationRunNow`.

## تصحيح أخطاء المهمة {#debugging}

- افتح تفاصيل الأتمتة في **Settings › Automations**، أو افحص `jobs/<name>.md` في موارد الوكيل - تعرض المادة الأمامية `lastRun`، `lastStatus`، `lastError`، `nextRun`.
- **اختبره دون انتظار:** انقر **Run now** في **Settings › Automations**، أو اطلب من الوكيل تشغيلها (`manage-automations` مع `action=run-now`). تعمل مطالبة المهمة فورًا مع آثارها الجانبية الحقيقية، ولا يتغير `nextRun`. الاستثناء هو مهمة أوقفها إطار العمل مؤقتًا: يعيد التشغيل الناجح تفعيلها ويعيد حساب `nextRun`. لا ينتظر Run now نبضة المجدول، لذا يعمل أيضًا على localhost دون `AGENT_NATIVE_ENABLE_LOCAL_RECURRING_JOBS` وعلى المضيفات التي لا تملك مُشغِّلًا للمجدول.
- **إيقاف مؤقت:** اقلب `enabled: false`. يبقى الملف في مكانه، ويتوقف عن التشغيل.

## أداة الوكيل {#agent-tool}

يتم تسجيل أداة `manage-jobs` واحدة في كل قالب. تحدد المعلمة `action` العملية:

| الإجراء  | المعلمات                                                                   | الغرض                                                           |
| -------- | -------------------------------------------------------------------------- | --------------------------------------------------------------- |
| `create` | `name`، `schedule`، `instructions` (مطلوب)؛ `scope`، `runAs`، `mcpTools`   | إنشاء مهمة متكررة جديدة                                         |
| `list`   | `scope` (`personal`، `shared`، أو الكل)                                    | سرد كافة المهام ذات الحالة (جدول، ممكّن، التشغيل الأخير/التالي) |
| `update` | `name` (مطلوب)؛ `schedule`، `instructions`، `enabled`، `runAs`، `mcpTools` | تحرير مهمة موجودة                                               |
| `delete` | `name` (مطلوب)                                                             | حذف مهمة - قم دائمًا بالتأكيد مع المستخدم أولاً                 |

**النطاق الشخصي مقابل النطاق المشترك.** توجد كل وظيفة إما في النطاق الشخصي (يتم تشغيله ويكون مرئيًا للمنشئ فقط) أو النطاق المشترك/المؤسسي (يتم تشغيله نيابة عن المنشئ ولكنه مرئي لأعضاء المؤسسة). يمكن لمسؤولي المؤسسة تحديث أو حذف أي تعريف مشترك، لكن لا يمكنهم تغيير هوية المنشئ. يتحقق الإطار من وجود المنشئ وعضويته قبل كل تشغيل للمؤسسة.

## تختلف عن حزمة الجدولة {#vs-scheduling-package}

لا تخلط بين المهام المتكررة و`@agent-native/scheduling`:

- **المهام المتكررة (هذه الصفحة)** — _prompts_ المجدولة لـ cron التي يقوم الوكيل بتشغيلها في الخلفية. مستوى الإطار. يعيش في موارد الوكيل. يُطلَق على أي مضيف يتوفر فيه مجدول (راجع [كيفية تشغيل المجدول](#how-scheduler-runs)).
- **`@agent-native/scheduling`** — حزمة نطاق قابلة لإعادة الاستخدام لإنشاء ميزات التقويم/الحجز (أنواع الأحداث، ونوافذ التوفر، والحجوزات). لتشغيل قالب `calendar` وأسطح الجدولة المخصصة.

المهام المتكررة هي "كيف أجعل الوكيل يتصرف من تلقاء نفسه؟" حزمة الجدولة هي "كيف يمكنني إنشاء تطبيق تقويم؟" مخاوف مختلفة.

## ما هي الخطوة التالية

- [**Automations**](/docs/automations) - إضافة مشغلات وشروط الأحداث إلى تنسيق `jobs/` نفسه
- [**موارد الوكيل**](/docs/agent-resources) — حيث توجد الوظائف جنبًا إلى جنب مع skills والذاكرة والوكلاء المخصصين
- [**Actions**](/docs/actions-overview) — الأدوات التي تتطلبها الوظيفة
- [**Agent Teams**](/docs/agent-teams) — غالبًا ما تنتج الوظائف وكلاء فرعيين للقيام بأعمال موازية
rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
academy-guideanthropics/skillsStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
claude-apianthropics/skillsReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).Stars: 198kUpdated Claude CodeCodexUnverifiedInstall
doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.Stars: 198kUpdated Claude CodeCodexVerifiedInstall