mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-05 06:59:23 +00:00
* feat: adopt directory-based docs versioning with Edge channel Switch docs.crewai.com from navigation-only versioning (every version selector entry rendered the same docs/<lang>/* source files) to Mintlify's directory-based versioning so each version selector entry renders its own snapshot. Add an "Edge" channel under docs/edge/<lang>/* that always reflects main HEAD for unreleased work, eliminating pre-release leakage onto frozen release labels. External links to canonical /<lang>/* URLs are preserved via wildcard redirects that always land on the current default version. Layout: - docs/edge/<lang>/* rolling source (you edit here) - docs/edge/enterprise-api.*.yaml - docs/v<X.Y.Z>/<lang>/* frozen, immutable snapshots - docs/v<X.Y.Z>/enterprise-api.*.yaml - docs/images/ shared, append-only - docs/docs.json nav + redirects URLs follow the Mintlify-idiomatic shape: /edge/<lang>/<page> for Edge, /v<X.Y.Z>/<lang>/<page> for every frozen snapshot. The wildcard redirects /<lang>/:slug* -> /<default>/<lang>/:slug* keep stale links working, and every freeze rewrites them (plus all per-section/per-page redirects) so destinations always resolve to the current default without depending on a second redirect hop. Release flow integration (devtools release): - New module crewai_devtools.docs_versioning.freeze() materialises docs/v<X.Y.Z>/ from docs/edge/, rewrites openapi: refs inside the snapshot, inserts the version into every language block in docs.json, and refreshes all redirect destinations. - _update_docs_and_create_pr() in cli.py now calls that freeze during Phase 2 of devtools release. Edge changelogs are updated first (so the snapshot freeze picks them up), then the snapshot is staged alongside docs.json, branched as docs/freeze-v<X.Y.Z>, and the PR is titled [docs-freeze] docs: snapshot and changelog for v<X.Y.Z> — the title prefix the new CI guard reads. - The PR still gates tag, GitHub release, PyPI publish, and the enterprise release as before; no new PRs are added. - Pre-releases (1.X.YaN, 1.X.YbN, ...) skip the snapshot — they ride Edge — and the docs PR title omits the [docs-freeze] prefix. - docs_check (AI-generated docs scaffolding) writes to docs/edge/<lang>/* so newly-generated unreleased docs land in Edge and never accidentally touch a frozen snapshot. Migration scripts (one-shot): - scripts/docs/freeze_historical_versions.py reconstructs all 16 historical snapshots (v1.10.0 .. v1.14.7) from git tags via git archive | tar, rewriting openapi: MDX refs so each snapshot reads its own enterprise-api YAML rather than the live one. - scripts/docs/prefix_version_paths.py one-shot-migrates docs.json: rewrites every page path in 16 versioned blocks to point under docs/v<X.Y.Z>/, inserts a new Edge entry per language, tags v1.14.7 as Latest (default), prunes pages whose target file doesn't exist in the snapshot (e.g. docs/ar/ didn't exist before v1.12.0), and writes the wildcard + per-section redirects. - scripts/docs/freeze_current_edge.py is now a thin CLI wrapper around docs_versioning.freeze for manual one-off freezes (e.g. retroactively snapshotting a forgotten release). CI guards (.github/workflows/docs-snapshots.yml): - Frozen snapshots under docs/v[0-9]*/ are immutable; only PRs whose title contains [docs-freeze] (i.e. release-cut PRs generated by devtools release or the manual wrapper) may modify them. - Images under docs/images/ are append-only since snapshots share a single image directory. Deleting or renaming an image breaks every historical snapshot that still references it. Restored docs/images/crewai-otel-export.png from PR #3673; it was deleted in PR #4908 but v1.10.0 / v1.10.1 snapshots still reference it. Restoring instead of editing the snapshots preserves historical rendering fidelity and validates the new append-only rule retroactively. Tests: - lib/devtools/tests/test_docs_versioning.py covers the freeze: file copy, openapi rewrite, version insertion, default demotion, redirect upserts, per-section redirect rewriting, idempotency, and invalid inputs. Verified locally with mintlify broken-links: 0 broken links across the full site (Edge + 16 frozen versions, 4 locales). AGENTS.md (repo root) is the contributor guide for the new model; RELEASING.md is the release-cut runbook; README's Contribution section links to both. Co-authored-by: Cursor <cursoragent@cursor.com> * style: resolve linter issues --------- Co-authored-by: Cursor <cursoragent@cursor.com>
158 lines
9.0 KiB
Plaintext
158 lines
9.0 KiB
Plaintext
---
|
|
title: "أتمتة Webhook"
|
|
description: "أتمتة سير عمل CrewAI AMP باستخدام webhooks مع منصات مثل ActivePieces وZapier وMake.com"
|
|
icon: "webhook"
|
|
mode: "wide"
|
|
---
|
|
|
|
يتيح لك CrewAI AMP أتمتة سير عملك باستخدام webhooks. ستوجهك هذه المقالة خلال عملية إعداد واستخدام webhooks لبدء تنفيذ طاقمك، مع التركيز على التكامل مع ActivePieces، وهي منصة أتمتة سير العمل مشابهة لـ Zapier وMake.com.
|
|
|
|
## إعداد Webhooks
|
|
|
|
<Steps>
|
|
<Step title="الوصول إلى واجهة البدء">
|
|
- انتقل إلى لوحة تحكم CrewAI AMP
|
|
- ابحث عن قسم `/kickoff`، الذي يُستخدم لبدء تنفيذ الطاقم
|
|
<Frame>
|
|
<img src="/images/enterprise/kickoff-interface.png" alt="واجهة البدء" />
|
|
</Frame>
|
|
</Step>
|
|
|
|
<Step title="تكوين محتوى JSON">
|
|
في قسم محتوى JSON، ستحتاج إلى تقديم المعلومات التالية:
|
|
|
|
- **inputs**: كائن JSON يحتوي على:
|
|
- `company`: اسم الشركة (مثال: "tesla")
|
|
- `product_name`: اسم المنتج (مثال: "crewai")
|
|
- `form_response`: نوع الاستجابة (مثال: "financial")
|
|
- `icp_description`: وصف موجز لملف العميل المثالي
|
|
- `product_description`: وصف قصير للمنتج
|
|
- `taskWebhookUrl`، `stepWebhookUrl`، `crewWebhookUrl`: عناوين URL لنقاط نهاية webhook المختلفة (ActivePieces أو Zapier أو Make.com أو منصة أخرى متوافقة)
|
|
</Step>
|
|
|
|
<Step title="التكامل مع ActivePieces">
|
|
في هذا المثال سنستخدم ActivePieces. يمكنك استخدام منصات أخرى مثل Zapier وMake.com
|
|
|
|
للتكامل مع ActivePieces:
|
|
|
|
1. أنشئ تدفقًا جديدًا في ActivePieces
|
|
2. أضف مشغلًا (مثال: جدول `Every Day`)
|
|
<Frame>
|
|
<img src="/images/enterprise/activepieces-trigger.png" alt="مشغل ActivePieces" />
|
|
</Frame>
|
|
|
|
3. أضف خطوة إجراء HTTP
|
|
- عيّن الإجراء إلى `Send HTTP request`
|
|
- استخدم `POST` كطريقة
|
|
- عيّن عنوان URL إلى نقطة نهاية بدء CrewAI AMP
|
|
- أضف الترويسات اللازمة (مثال: `Bearer Token`)
|
|
<Frame>
|
|
<img src="/images/enterprise/activepieces-headers.png" alt="ترويسات ActivePieces" />
|
|
</Frame>
|
|
|
|
- في النص، ضمّن محتوى JSON كما تم تكوينه في الخطوة 2
|
|
<Frame>
|
|
<img src="/images/enterprise/activepieces-body.png" alt="نص ActivePieces" />
|
|
</Frame>
|
|
|
|
- سيبدأ الطاقم بعد ذلك في الوقت المحدد مسبقًا.
|
|
</Step>
|
|
|
|
<Step title="إعداد Webhook">
|
|
1. أنشئ تدفقًا جديدًا في ActivePieces وسمّه
|
|
<Frame>
|
|
<img src="/images/enterprise/activepieces-flow.png" alt="تدفق ActivePieces" />
|
|
</Frame>
|
|
|
|
2. أضف خطوة webhook كمشغل:
|
|
- اختر `Catch Webhook` كنوع المشغل
|
|
- سيولّد هذا عنوان URL فريدًا سيستقبل طلبات HTTP ويشغل تدفقك
|
|
<Frame>
|
|
<img src="/images/enterprise/activepieces-webhook.png" alt="Webhook ActivePieces" />
|
|
</Frame>
|
|
|
|
- كوّن البريد الإلكتروني لاستخدام نص جسم webhook الخاص بالطاقم
|
|
<Frame>
|
|
<img src="/images/enterprise/activepieces-email.png" alt="بريد ActivePieces الإلكتروني" />
|
|
</Frame>
|
|
</Step>
|
|
|
|
</Steps>
|
|
|
|
## أمثلة مخرجات Webhook
|
|
|
|
**ملاحظة:** أي كائن `meta` مُقدم في طلب البدء الخاص بك سيتم تضمينه في جميع حمولات webhook، مما يتيح لك تتبع الطلبات والحفاظ على السياق عبر دورة حياة تنفيذ الطاقم بالكامل.
|
|
|
|
<Tabs>
|
|
<Tab title="Step Webhook">
|
|
`stepWebhookUrl` - رد نداء يتم تنفيذه عند كل فكرة داخلية للوكيل
|
|
|
|
```json
|
|
{
|
|
"prompt": "Research the financial industry for potential AI solutions",
|
|
"thought": "I need to conduct preliminary research on the financial industry",
|
|
"tool": "research_tool",
|
|
"tool_input": "financial industry AI solutions",
|
|
"result": "**Preliminary Research Report on the Financial Industry for crewai Enterprise Solution**\n1. Industry Overview and Trends\nThe financial industry in ....\nConclusion:\nThe financial industry presents a fertile ground for implementing AI solutions like crewai, particularly in areas such as digital customer engagement, risk management, and regulatory compliance. Further engagement with the lead is recommended to better tailor the crewai solution to their specific needs and scale.",
|
|
"kickoff_id": "97eba64f-958c-40a0-b61c-625fe635a3c0",
|
|
"meta": {
|
|
"requestId": "travel-req-123",
|
|
"source": "web-app"
|
|
}
|
|
}
|
|
```
|
|
</Tab>
|
|
<Tab title="Task Webhook">
|
|
`taskWebhookUrl` - رد نداء يتم تنفيذه عند انتهاء كل مهمة
|
|
|
|
```json
|
|
{
|
|
"description": "Using the information gathered from the lead's data, conduct preliminary research on the lead's industry, company background, and potential use cases for crewai. Focus on finding relevant data that can aid in scoring the lead and planning a strategy to pitch them crewai.",
|
|
"name": "Industry Research Task",
|
|
"expected_output": "Detailed research report on the financial industry",
|
|
"summary": "The financial industry presents a fertile ground for implementing AI solutions like crewai, particularly in areas such as digital customer engagement, risk management, and regulatory compliance. Further engagement with the lead is recommended to better tailor the crewai solution to their specific needs and scale.",
|
|
"agent": "Research Agent",
|
|
"output": "**Preliminary Research Report on the Financial Industry for crewai Enterprise Solution**\n1. Industry Overview and Trends\nThe financial industry in ....\nConclusion:\nThe financial industry presents a fertile ground for implementing AI solutions like crewai, particularly in areas such as digital customer engagement, risk management, and regulatory compliance.",
|
|
"output_json": {
|
|
"industry": "financial",
|
|
"key_opportunities": ["digital customer engagement", "risk management", "regulatory compliance"]
|
|
},
|
|
"kickoff_id": "97eba64f-958c-40a0-b61c-625fe635a3c0",
|
|
"meta": {
|
|
"requestId": "travel-req-123",
|
|
"source": "web-app"
|
|
}
|
|
}
|
|
```
|
|
</Tab>
|
|
<Tab title="Crew Webhook">
|
|
`crewWebhookUrl` - رد نداء يتم تنفيذه عند انتهاء تنفيذ الطاقم
|
|
|
|
```json
|
|
{
|
|
"kickoff_id": "97eba64f-958c-40a0-b61c-625fe635a3c0",
|
|
"result": "**Final Analysis Report**\n\nLead Score: Customer service enhancement and compliance are particularly relevant.\n\nTalking Points:\n- Highlight how crewai's AI solutions can transform customer service\n- Discuss crewai's potential for sustainability goals\n- Emphasize compliance capabilities\n- Stress adaptability for various operation scales",
|
|
"result_json": {
|
|
"lead_score": "Customer service enhancement, and compliance are particularly relevant.",
|
|
"talking_points": [
|
|
"Highlight how crewai's AI solutions can transform customer service with automated, personalized experiences and 24/7 support, improving both customer satisfaction and operational efficiency.",
|
|
"Discuss crewai's potential to help the institution achieve its sustainability goals through better data analysis and decision-making, contributing to responsible investing and green initiatives.",
|
|
"Emphasize crewai's ability to enhance compliance with evolving regulations through efficient data processing and reporting, reducing the risk of non-compliance penalties.",
|
|
"Stress the adaptability of crewai to support both extensive multinational operations and smaller, targeted projects, ensuring the solution grows with the institution's needs."
|
|
]
|
|
},
|
|
"token_usage": {
|
|
"total_tokens": 1250,
|
|
"prompt_tokens": 800,
|
|
"completion_tokens": 450
|
|
},
|
|
"meta": {
|
|
"requestId": "travel-req-123",
|
|
"source": "web-app"
|
|
}
|
|
}
|
|
```
|
|
</Tab>
|
|
|
|
</Tabs>
|