docs: add modern standard arabic translation of all documentation

This commit is contained in:
Greyson LaLonde
2026-03-25 15:44:02 +08:00
committed by GitHub
parent b890ac0dd0
commit f5b3b2a355
242 changed files with 47411 additions and 0 deletions

View File

@@ -0,0 +1,188 @@
---
title: أداة استدعاء وكيل Bedrock
description: تتيح لوكلاء CrewAI استدعاء وكلاء Amazon Bedrock والاستفادة من قدراتهم ضمن سير العمل الخاص بك
icon: aws
mode: "wide"
---
# `BedrockInvokeAgentTool`
تتيح `BedrockInvokeAgentTool` لوكلاء CrewAI استدعاء وكلاء Amazon Bedrock والاستفادة من قدراتهم ضمن سير العمل الخاص بك.
## التثبيت
```bash
uv pip install 'crewai[tools]'
```
## المتطلبات
- بيانات اعتماد AWS مُهيأة (إما من خلال متغيرات البيئة أو AWS CLI)
- حزمتا `boto3` و `python-dotenv`
- الوصول إلى وكلاء Amazon Bedrock
## الاستخدام
إليك كيفية استخدام الأداة مع وكيل CrewAI:
```python {2, 4-8}
from crewai import Agent, Task, Crew
from crewai_tools.aws.bedrock.agents.invoke_agent_tool import BedrockInvokeAgentTool
# Initialize the tool
agent_tool = BedrockInvokeAgentTool(
agent_id="your-agent-id",
agent_alias_id="your-agent-alias-id"
)
# Create a CrewAI agent that uses the tool
aws_expert = Agent(
role='AWS Service Expert',
goal='Help users understand AWS services and quotas',
backstory='I am an expert in AWS services and can provide detailed information about them.',
tools=[agent_tool],
verbose=True
)
# Create a task for the agent
quota_task = Task(
description="Find out the current service quotas for EC2 in us-west-2 and explain any recent changes.",
agent=aws_expert
)
# Create a crew with the agent
crew = Crew(
agents=[aws_expert],
tasks=[quota_task],
verbose=2
)
# Run the crew
result = crew.kickoff()
print(result)
```
## معاملات الأداة
| المعامل | النوع | مطلوب | الافتراضي | الوصف |
|:---------|:-----|:---------|:--------|:------------|
| **agent_id** | `str` | نعم | None | المعرّف الفريد لوكيل Bedrock |
| **agent_alias_id** | `str` | نعم | None | المعرّف الفريد لاسم الوكيل المستعار |
| **session_id** | `str` | لا | الطابع الزمني | المعرّف الفريد للجلسة |
| **enable_trace** | `bool` | لا | False | ما إذا كان سيتم تفعيل التتبع لأغراض التصحيح |
| **end_session** | `bool` | لا | False | ما إذا كان سيتم إنهاء الجلسة بعد الاستدعاء |
| **description** | `str` | لا | None | وصف مخصص للأداة |
## متغيرات البيئة
```bash
BEDROCK_AGENT_ID=your-agent-id # Alternative to passing agent_id
BEDROCK_AGENT_ALIAS_ID=your-agent-alias-id # Alternative to passing agent_alias_id
AWS_REGION=your-aws-region # Defaults to us-west-2
AWS_ACCESS_KEY_ID=your-access-key # Required for AWS authentication
AWS_SECRET_ACCESS_KEY=your-secret-key # Required for AWS authentication
```
## الاستخدام المتقدم
### سير عمل متعدد الوكلاء مع إدارة الجلسات
```python {2, 4-22}
from crewai import Agent, Task, Crew, Process
from crewai_tools.aws.bedrock.agents.invoke_agent_tool import BedrockInvokeAgentTool
# Initialize tools with session management
initial_tool = BedrockInvokeAgentTool(
agent_id="your-agent-id",
agent_alias_id="your-agent-alias-id",
session_id="custom-session-id"
)
followup_tool = BedrockInvokeAgentTool(
agent_id="your-agent-id",
agent_alias_id="your-agent-alias-id",
session_id="custom-session-id"
)
final_tool = BedrockInvokeAgentTool(
agent_id="your-agent-id",
agent_alias_id="your-agent-alias-id",
session_id="custom-session-id",
end_session=True
)
# Create agents for different stages
researcher = Agent(
role='AWS Service Researcher',
goal='Gather information about AWS services',
backstory='I am specialized in finding detailed AWS service information.',
tools=[initial_tool]
)
analyst = Agent(
role='Service Compatibility Analyst',
goal='Analyze service compatibility and requirements',
backstory='I analyze AWS services for compatibility and integration possibilities.',
tools=[followup_tool]
)
summarizer = Agent(
role='Technical Documentation Writer',
goal='Create clear technical summaries',
backstory='I specialize in creating clear, concise technical documentation.',
tools=[final_tool]
)
# Create tasks
research_task = Task(
description="Find all available AWS services in us-west-2 region.",
agent=researcher
)
analysis_task = Task(
description="Analyze which services support IPv6 and their implementation requirements.",
agent=analyst
)
summary_task = Task(
description="Create a summary of IPv6-compatible services and their key features.",
agent=summarizer
)
# Create a crew with the agents and tasks
crew = Crew(
agents=[researcher, analyst, summarizer],
tasks=[research_task, analysis_task, summary_task],
process=Process.sequential,
verbose=2
)
# Run the crew
result = crew.kickoff()
```
## حالات الاستخدام
### التعاون الهجين متعدد الوكلاء
- إنشاء سير عمل حيث يتعاون وكلاء CrewAI مع وكلاء Bedrock المُدارة التي تعمل كخدمات في AWS
- تمكين سيناريوهات حيث تتم معالجة البيانات الحساسة داخل بيئة AWS الخاصة بك بينما تعمل وكلاء أخرى خارجياً
- ربط وكلاء CrewAI المحلية مع وكلاء Bedrock السحابية لسير عمل ذكاء موزع
### سيادة البيانات والامتثال
- الحفاظ على سير عمل الوكلاء الحساسة للبيانات داخل بيئة AWS الخاصة بك مع السماح لوكلاء CrewAI الخارجية بتنسيق المهام
- الحفاظ على الامتثال لمتطلبات إقامة البيانات من خلال معالجة المعلومات الحساسة فقط داخل حساب AWS الخاص بك
- تمكين التعاون الآمن متعدد الوكلاء حيث لا يمكن لبعض الوكلاء الوصول إلى البيانات الخاصة بمؤسستك
### التكامل السلس مع خدمات AWS
- الوصول إلى أي خدمة AWS من خلال Amazon Bedrock Actions دون كتابة كود تكامل معقد
- تمكين وكلاء CrewAI من التفاعل مع خدمات AWS من خلال طلبات اللغة الطبيعية
- الاستفادة من قدرات وكلاء Bedrock المبنية مسبقاً للتفاعل مع خدمات AWS مثل Bedrock Knowledge Bases و Lambda والمزيد
### هياكل وكلاء هجينة قابلة للتوسع
- تفريغ المهام الحسابية المكثفة إلى وكلاء Bedrock المُدارة بينما تعمل المهام الخفيفة في CrewAI
- توسيع معالجة الوكلاء من خلال توزيع أعباء العمل بين وكلاء CrewAI المحلية ووكلاء Bedrock السحابية
### التعاون بين المؤسسات
- تمكين التعاون الآمن بين وكلاء CrewAI الخاصة بمؤسستك ووكلاء Bedrock الخاصة بالمؤسسات الشريكة
- إنشاء سير عمل حيث يمكن دمج الخبرة الخارجية من وكلاء Bedrock دون كشف البيانات الحساسة
- بناء أنظمة وكلاء تمتد عبر حدود المؤسسات مع الحفاظ على الأمان والتحكم في البيانات

View File

@@ -0,0 +1,276 @@
---
title: أداة تشغيل أتمتة CrewAI
description: تتيح لوكلاء CrewAI استدعاء أتمتة منصة CrewAI والاستفادة من خدمات الأطقم الخارجية ضمن سير العمل الخاص بك.
icon: robot
---
# `InvokeCrewAIAutomationTool`
توفر `InvokeCrewAIAutomationTool` تكاملاً مع واجهة برمجة تطبيقات منصة CrewAI مع خدمات الأطقم الخارجية. تتيح لك هذه الأداة استدعاء أتمتة منصة CrewAI والتفاعل معها من داخل وكلاء CrewAI، مما يمكّن التكامل السلس بين سير عمل الأطقم المختلفة.
## التثبيت
```bash
uv pip install 'crewai[tools]'
```
## المتطلبات
- الوصول إلى واجهة برمجة تطبيقات منصة CrewAI
- رمز حامل صالح للمصادقة
- الوصول الشبكي إلى نقاط نهاية أتمتة منصة CrewAI
## الاستخدام
إليك كيفية استخدام الأداة مع وكيل CrewAI:
```python {2, 4-9}
from crewai import Agent, Task, Crew
from crewai_tools import InvokeCrewAIAutomationTool
# Initialize the tool
automation_tool = InvokeCrewAIAutomationTool(
crew_api_url="https://data-analysis-crew-[...].crewai.com",
crew_bearer_token="your_bearer_token_here",
crew_name="Data Analysis Crew",
crew_description="Analyzes data and generates insights"
)
# Create a CrewAI agent that uses the tool
automation_coordinator = Agent(
role='Automation Coordinator',
goal='Coordinate and execute automated crew tasks',
backstory='I am an expert at leveraging automation tools to execute complex workflows.',
tools=[automation_tool],
verbose=True
)
# Create a task for the agent
analysis_task = Task(
description="Execute data analysis automation and provide insights",
agent=automation_coordinator,
expected_output="Comprehensive data analysis report"
)
# Create a crew with the agent
crew = Crew(
agents=[automation_coordinator],
tasks=[analysis_task],
verbose=2
)
# Run the crew
result = crew.kickoff()
print(result)
```
## معاملات الأداة
| المعامل | النوع | مطلوب | الافتراضي | الوصف |
|:---------|:-----|:---------|:--------|:------------|
| **crew_api_url** | `str` | نعم | None | عنوان URL الأساسي لواجهة برمجة تطبيقات أتمتة منصة CrewAI |
| **crew_bearer_token** | `str` | نعم | None | رمز حامل لمصادقة API |
| **crew_name** | `str` | نعم | None | اسم أتمتة الطاقم |
| **crew_description** | `str` | نعم | None | وصف ما تفعله أتمتة الطاقم |
| **max_polling_time** | `int` | لا | 600 | الحد الأقصى للوقت بالثواني للانتظار حتى اكتمال المهمة |
| **crew_inputs** | `dict` | لا | None | قاموس يحدد حقول مخطط المدخلات المخصصة |
## متغيرات البيئة
```bash
CREWAI_API_URL=https://your-crew-automation.crewai.com # Alternative to passing crew_api_url
CREWAI_BEARER_TOKEN=your_bearer_token_here # Alternative to passing crew_bearer_token
```
## الاستخدام المتقدم
### مخطط مدخلات مخصص مع معاملات ديناميكية
```python {2, 4-15}
from crewai import Agent, Task, Crew
from crewai_tools import InvokeCrewAIAutomationTool
from pydantic import Field
# Define custom input schema
custom_inputs = {
"year": Field(..., description="Year to retrieve the report for (integer)"),
"region": Field(default="global", description="Geographic region for analysis"),
"format": Field(default="summary", description="Report format (summary, detailed, raw)")
}
# Create tool with custom inputs
market_research_tool = InvokeCrewAIAutomationTool(
crew_api_url="https://state-of-ai-report-crew-[...].crewai.com",
crew_bearer_token="your_bearer_token_here",
crew_name="State of AI Report",
crew_description="Retrieves a comprehensive report on state of AI for a given year and region",
crew_inputs=custom_inputs,
max_polling_time=15 * 60 # 15 minutes timeout
)
# Create an agent with the tool
research_agent = Agent(
role="Research Coordinator",
goal="Coordinate and execute market research tasks",
backstory="You are an expert at coordinating research tasks and leveraging automation tools.",
tools=[market_research_tool],
verbose=True
)
# Create and execute a task with custom parameters
research_task = Task(
description="Conduct market research on AI tools market for 2024 in North America with detailed format",
agent=research_agent,
expected_output="Comprehensive market research report"
)
crew = Crew(
agents=[research_agent],
tasks=[research_task]
)
result = crew.kickoff()
```
### سير عمل أتمتة متعدد المراحل
```python {2, 4-35}
from crewai import Agent, Task, Crew, Process
from crewai_tools import InvokeCrewAIAutomationTool
# Initialize different automation tools
data_collection_tool = InvokeCrewAIAutomationTool(
crew_api_url="https://data-collection-crew-[...].crewai.com",
crew_bearer_token="your_bearer_token_here",
crew_name="Data Collection Automation",
crew_description="Collects and preprocesses raw data"
)
analysis_tool = InvokeCrewAIAutomationTool(
crew_api_url="https://analysis-crew-[...].crewai.com",
crew_bearer_token="your_bearer_token_here",
crew_name="Analysis Automation",
crew_description="Performs advanced data analysis and modeling"
)
reporting_tool = InvokeCrewAIAutomationTool(
crew_api_url="https://reporting-crew-[...].crewai.com",
crew_bearer_token="your_bearer_token_here",
crew_name="Reporting Automation",
crew_description="Generates comprehensive reports and visualizations"
)
# Create specialized agents
data_collector = Agent(
role='Data Collection Specialist',
goal='Gather and preprocess data from various sources',
backstory='I specialize in collecting and cleaning data from multiple sources.',
tools=[data_collection_tool]
)
data_analyst = Agent(
role='Data Analysis Expert',
goal='Perform advanced analysis on collected data',
backstory='I am an expert in statistical analysis and machine learning.',
tools=[analysis_tool]
)
report_generator = Agent(
role='Report Generation Specialist',
goal='Create comprehensive reports and visualizations',
backstory='I excel at creating clear, actionable reports from complex data.',
tools=[reporting_tool]
)
# Create sequential tasks
collection_task = Task(
description="Collect market data for Q4 2024 analysis",
agent=data_collector
)
analysis_task = Task(
description="Analyze collected data to identify trends and patterns",
agent=data_analyst
)
reporting_task = Task(
description="Generate executive summary report with key insights and recommendations",
agent=report_generator
)
# Create a crew with sequential processing
crew = Crew(
agents=[data_collector, data_analyst, report_generator],
tasks=[collection_task, analysis_task, reporting_task],
process=Process.sequential,
verbose=2
)
result = crew.kickoff()
```
## حالات الاستخدام
### تنسيق الأطقم الموزعة
- تنسيق أتمتة أطقم متخصصة متعددة للتعامل مع سير عمل معقدة ومتعددة المراحل
- تمكين عمليات التسليم السلسة بين خدمات الأتمتة المختلفة لتنفيذ شامل للمهام
- توسيع المعالجة من خلال توزيع أعباء العمل عبر أتمتة منصة CrewAI المتعددة
### التكامل عبر المنصات
- ربط وكلاء CrewAI مع أتمتة منصة CrewAI لسير عمل محلي-سحابي هجين
- الاستفادة من الأتمتة المتخصصة مع الحفاظ على التحكم والتنسيق المحلي
- تمكين التعاون الآمن بين الوكلاء المحليين وخدمات الأتمتة السحابية
### خطوط أنابيب أتمتة المؤسسات
- إنشاء خطوط أنابيب أتمتة بمستوى المؤسسة تجمع بين الذكاء المحلي وقوة المعالجة السحابية
- تنفيذ سير عمل أعمال معقدة تمتد عبر خدمات أتمتة متعددة
- تمكين عمليات قابلة للتوسع ومتكررة لتحليل البيانات وإعداد التقارير واتخاذ القرارات
### تركيب سير العمل الديناميكي
- تركيب سير العمل ديناميكياً من خلال تسلسل خدمات أتمتة مختلفة بناءً على متطلبات المهمة
- تمكين المعالجة التكيفية حيث يعتمد اختيار الأتمتة على خصائص البيانات أو قواعد العمل
- إنشاء مكونات أتمتة مرنة وقابلة لإعادة الاستخدام يمكن دمجها بطرق مختلفة
### المعالجة المتخصصة بالمجال
- الوصول إلى أتمتة خاصة بالمجال (التحليل المالي، البحث القانوني، التوثيق التقني) من وكلاء ذات أغراض عامة
- الاستفادة من أتمتة أطقم متخصصة مبنية مسبقاً دون إعادة بناء منطق المجال المعقد
- تمكين الوكلاء من الوصول إلى قدرات مستوى الخبراء من خلال خدمات أتمتة مستهدفة
## مخطط المدخلات المخصص
عند تعريف `crew_inputs`، استخدم كائنات Pydantic Field لتحديد معاملات المدخلات:
```python
from pydantic import Field
crew_inputs = {
"required_param": Field(..., description="This parameter is required"),
"optional_param": Field(default="default_value", description="This parameter is optional"),
"typed_param": Field(..., description="Integer parameter", ge=1, le=100) # With validation
}
```
## معالجة الأخطاء
توفر الأداة معالجة شاملة للأخطاء للسيناريوهات الشائعة:
- **أخطاء اتصال API**: مشكلات الاتصال الشبكي مع منصة CrewAI
- **أخطاء المصادقة**: رموز حامل غير صالحة أو منتهية الصلاحية
- **أخطاء المهلة**: المهام التي تتجاوز الحد الأقصى لوقت الاستقصاء
- **فشل المهام**: أتمتة الأطقم التي تفشل أثناء التنفيذ
- **أخطاء التحقق من المدخلات**: معاملات غير صالحة مُمررة إلى نقاط نهاية الأتمتة
## نقاط نهاية API
تتفاعل الأداة مع نقطتي نهاية API رئيسيتين:
- `POST {crew_api_url}/kickoff`: بدء مهمة أتمتة طاقم جديدة
- `GET {crew_api_url}/status/{crew_id}`: التحقق من حالة مهمة قيد التشغيل
## ملاحظات
- تقوم الأداة تلقائياً باستقصاء نقطة نهاية الحالة كل ثانية حتى الاكتمال أو انتهاء المهلة
- تُرجع المهام الناجحة النتيجة مباشرة، بينما تُرجع المهام الفاشلة معلومات الخطأ
- يجب الحفاظ على أمان رموز الحامل وعدم ترميزها بشكل ثابت في بيئات الإنتاج
- فكر في استخدام متغيرات البيئة للتكوينات الحساسة مثل رموز الحامل
- يجب أن تكون مخططات المدخلات المخصصة متوافقة مع المعاملات المتوقعة لأتمتة الطاقم المستهدف

View File

@@ -0,0 +1,367 @@
---
title: أداة معالج وكيل Merge
description: تتيح لوكلاء CrewAI الوصول بأمان إلى تكاملات الأطراف الثالثة مثل Linear و GitHub و Slack والمزيد من خلال منصة معالج الوكيل من Merge
icon: diagram-project
mode: "wide"
---
# `MergeAgentHandlerTool`
تتيح `MergeAgentHandlerTool` لوكلاء CrewAI الوصول بأمان إلى تكاملات الأطراف الثالثة من خلال منصة [معالج الوكيل من Merge](https://www.merge.dev/products/merge-agent-handler). يوفر معالج الوكيل موصلات جاهزة وآمنة لأدوات شائعة مثل Linear و GitHub و Slack و Notion ومئات غيرها - جميعها مع مصادقة وصلاحيات ومراقبة مدمجة.
## التثبيت
```bash
uv pip install 'crewai[tools]'
```
## المتطلبات
- حساب معالج وكيل Merge مع حزمة أدوات مُهيأة
- مفتاح API لمعالج الوكيل
- مستخدم مسجل واحد على الأقل مرتبط بحزمة الأدوات الخاصة بك
- تكاملات أطراف ثالثة مُهيأة في حزمة الأدوات الخاصة بك
## البدء مع معالج الوكيل
1. **التسجيل** في حساب معالج وكيل Merge على [ah.merge.dev/signup](https://ah.merge.dev/signup)
2. **إنشاء حزمة أدوات** وتكوين التكاملات التي تحتاجها
3. **تسجيل المستخدمين** الذين سيقومون بالمصادقة مع خدمات الأطراف الثالثة
4. **الحصول على مفتاح API** من لوحة تحكم معالج الوكيل
5. **تعيين متغير البيئة**: `export AGENT_HANDLER_API_KEY='your-key-here'`
6. **البدء بالبناء** مع MergeAgentHandlerTool في CrewAI
## ملاحظات
- يمكن العثور على معرّفات حزمة الأدوات ومعرّفات المستخدمين المسجلين في لوحة تحكم معالج الوكيل أو إنشاؤها عبر API
- تستخدم الأداة بروتوكول سياق النموذج (MCP) للتواصل مع معالج الوكيل
- يتم توليد معرّفات الجلسة تلقائياً ولكن يمكن تخصيصها لاستمرارية السياق
- يتم تسجيل جميع استدعاءات الأدوات وإمكانية مراجعتها من خلال منصة معالج الوكيل
- يتم اكتشاف معاملات الأدوات ديناميكياً من واجهة برمجة تطبيقات معالج الوكيل والتحقق منها تلقائياً
## الاستخدام
### استخدام أداة واحدة
إليك كيفية استخدام أداة محددة من حزمة الأدوات الخاصة بك:
```python {2, 4-9}
from crewai import Agent, Task, Crew
from crewai_tools import MergeAgentHandlerTool
# Create a tool for Linear issue creation
linear_create_tool = MergeAgentHandlerTool.from_tool_name(
tool_name="linear__create_issue",
tool_pack_id="134e0111-0f67-44f6-98f0-597000290bb3",
registered_user_id="91b2b905-e866-40c8-8be2-efe53827a0aa"
)
# Create a CrewAI agent that uses the tool
project_manager = Agent(
role='Project Manager',
goal='Manage project tasks and issues efficiently',
backstory='I am an expert at tracking project work and creating actionable tasks.',
tools=[linear_create_tool],
verbose=True
)
# Create a task for the agent
create_issue_task = Task(
description="Create a new high-priority issue in Linear titled 'Implement user authentication' with a detailed description of the requirements.",
agent=project_manager,
expected_output="Confirmation that the issue was created with its ID"
)
# Create a crew with the agent
crew = Crew(
agents=[project_manager],
tasks=[create_issue_task],
verbose=True
)
# Run the crew
result = crew.kickoff()
print(result)
```
### تحميل أدوات متعددة من حزمة أدوات
يمكنك تحميل جميع الأدوات المتاحة من حزمة الأدوات دفعة واحدة:
```python {2, 4-8}
from crewai import Agent, Task, Crew
from crewai_tools import MergeAgentHandlerTool
# Load all tools from the Tool Pack
tools = MergeAgentHandlerTool.from_tool_pack(
tool_pack_id="134e0111-0f67-44f6-98f0-597000290bb3",
registered_user_id="91b2b905-e866-40c8-8be2-efe53827a0aa"
)
# Create an agent with access to all tools
automation_expert = Agent(
role='Automation Expert',
goal='Automate workflows across multiple platforms',
backstory='I can work with any tool in the toolbox to get things done.',
tools=tools,
verbose=True
)
automation_task = Task(
description="Check for any high-priority issues in Linear and post a summary to Slack.",
agent=automation_expert
)
crew = Crew(
agents=[automation_expert],
tasks=[automation_task],
verbose=True
)
result = crew.kickoff()
```
### تحميل أدوات محددة فقط
تحميل الأدوات التي تحتاجها فقط:
```python {2, 4-10}
from crewai import Agent, Task, Crew
from crewai_tools import MergeAgentHandlerTool
# Load specific tools from the Tool Pack
selected_tools = MergeAgentHandlerTool.from_tool_pack(
tool_pack_id="134e0111-0f67-44f6-98f0-597000290bb3",
registered_user_id="91b2b905-e866-40c8-8be2-efe53827a0aa",
tool_names=["linear__create_issue", "linear__get_issues", "slack__post_message"]
)
developer_assistant = Agent(
role='Developer Assistant',
goal='Help developers track and communicate about their work',
backstory='I help developers stay organized and keep the team informed.',
tools=selected_tools,
verbose=True
)
daily_update_task = Task(
description="Get all issues assigned to the current user in Linear and post a summary to the #dev-updates Slack channel.",
agent=developer_assistant
)
crew = Crew(
agents=[developer_assistant],
tasks=[daily_update_task],
verbose=True
)
result = crew.kickoff()
```
## معاملات الأداة
### طريقة `from_tool_name()`
| المعامل | النوع | مطلوب | الافتراضي | الوصف |
|:---------|:-----|:---------|:--------|:------------|
| **tool_name** | `str` | نعم | None | اسم الأداة المحددة المراد استخدامها (مثل "linear__create_issue") |
| **tool_pack_id** | `str` | نعم | None | معرّف UUID لحزمة أدوات معالج الوكيل |
| **registered_user_id** | `str` | نعم | None | معرّف UUID أو origin_id للمستخدم المسجل |
| **base_url** | `str` | لا | "https://ah-api.merge.dev" | عنوان URL الأساسي لواجهة برمجة تطبيقات معالج الوكيل |
| **session_id** | `str` | لا | يتم توليده تلقائياً | معرّف جلسة MCP للحفاظ على السياق |
### طريقة `from_tool_pack()`
| المعامل | النوع | مطلوب | الافتراضي | الوصف |
|:---------|:-----|:---------|:--------|:------------|
| **tool_pack_id** | `str` | نعم | None | معرّف UUID لحزمة أدوات معالج الوكيل |
| **registered_user_id** | `str` | نعم | None | معرّف UUID أو origin_id للمستخدم المسجل |
| **tool_names** | `list[str]` | لا | None | أسماء أدوات محددة للتحميل. إذا كانت None، يتم تحميل جميع الأدوات المتاحة |
| **base_url** | `str` | لا | "https://ah-api.merge.dev" | عنوان URL الأساسي لواجهة برمجة تطبيقات معالج الوكيل |
## متغيرات البيئة
```bash
AGENT_HANDLER_API_KEY=your_api_key_here # Required for authentication
```
## الاستخدام المتقدم
### سير عمل متعدد الوكلاء مع صلاحيات أدوات مختلفة
```python {2, 4-20}
from crewai import Agent, Task, Crew, Process
from crewai_tools import MergeAgentHandlerTool
# Create specialized tools for different agents
github_tools = MergeAgentHandlerTool.from_tool_pack(
tool_pack_id="134e0111-0f67-44f6-98f0-597000290bb3",
registered_user_id="91b2b905-e866-40c8-8be2-efe53827a0aa",
tool_names=["github__create_pull_request", "github__get_pull_requests"]
)
linear_tools = MergeAgentHandlerTool.from_tool_pack(
tool_pack_id="134e0111-0f67-44f6-98f0-597000290bb3",
registered_user_id="91b2b905-e866-40c8-8be2-efe53827a0aa",
tool_names=["linear__create_issue", "linear__update_issue"]
)
slack_tool = MergeAgentHandlerTool.from_tool_name(
tool_name="slack__post_message",
tool_pack_id="134e0111-0f67-44f6-98f0-597000290bb3",
registered_user_id="91b2b905-e866-40c8-8be2-efe53827a0aa"
)
# Create specialized agents
code_reviewer = Agent(
role='Code Reviewer',
goal='Review pull requests and ensure code quality',
backstory='I am an expert at reviewing code changes and providing constructive feedback.',
tools=github_tools
)
task_manager = Agent(
role='Task Manager',
goal='Track and update project tasks based on code changes',
backstory='I keep the project board up to date with the latest development progress.',
tools=linear_tools
)
communicator = Agent(
role='Team Communicator',
goal='Keep the team informed about important updates',
backstory='I make sure everyone knows what is happening in the project.',
tools=[slack_tool]
)
# Create sequential tasks
review_task = Task(
description="Review all open pull requests in the 'api-service' repository and identify any that need attention.",
agent=code_reviewer,
expected_output="List of pull requests that need review or have issues"
)
update_task = Task(
description="Update Linear issues based on the pull request review findings. Mark completed PRs as done.",
agent=task_manager,
expected_output="Summary of updated Linear issues"
)
notify_task = Task(
description="Post a summary of today's code review and task updates to the #engineering Slack channel.",
agent=communicator,
expected_output="Confirmation that the message was posted"
)
# Create a crew with sequential processing
crew = Crew(
agents=[code_reviewer, task_manager, communicator],
tasks=[review_task, update_task, notify_task],
process=Process.sequential,
verbose=True
)
result = crew.kickoff()
```
### إدارة الجلسات المخصصة
الحفاظ على السياق عبر استدعاءات أدوات متعددة باستخدام معرّفات الجلسة:
```python {2, 4-17}
from crewai import Agent, Task, Crew
from crewai_tools import MergeAgentHandlerTool
# Create tools with the same session ID to maintain context
session_id = "project-sprint-planning-2024"
create_tool = MergeAgentHandlerTool(
name="linear_create_issue",
description="Creates a new issue in Linear",
tool_name="linear__create_issue",
tool_pack_id="134e0111-0f67-44f6-98f0-597000290bb3",
registered_user_id="91b2b905-e866-40c8-8be2-efe53827a0aa",
session_id=session_id
)
update_tool = MergeAgentHandlerTool(
name="linear_update_issue",
description="Updates an existing issue in Linear",
tool_name="linear__update_issue",
tool_pack_id="134e0111-0f67-44f6-98f0-597000290bb3",
registered_user_id="91b2b905-e866-40c8-8be2-efe53827a0aa",
session_id=session_id
)
sprint_planner = Agent(
role='Sprint Planner',
goal='Plan and organize sprint tasks',
backstory='I help teams plan effective sprints with well-defined tasks.',
tools=[create_tool, update_tool],
verbose=True
)
planning_task = Task(
description="Create 5 sprint tasks for the authentication feature and set their priorities based on dependencies.",
agent=sprint_planner
)
crew = Crew(
agents=[sprint_planner],
tasks=[planning_task],
verbose=True
)
result = crew.kickoff()
```
## حالات الاستخدام
### الوصول الموحد للتكاملات
- الوصول إلى مئات أدوات الأطراف الثالثة من خلال واجهة برمجة تطبيقات موحدة واحدة دون إدارة حزم SDK متعددة
- تمكين الوكلاء من العمل مع Linear و GitHub و Slack و Notion و Jira و Asana والمزيد من نقطة تكامل واحدة
- تقليل تعقيد التكامل من خلال السماح لمعالج الوكيل بإدارة المصادقة وإصدارات API
### سير عمل المؤسسات الآمنة
- الاستفادة من إدارة المصادقة والصلاحيات المدمجة لجميع تكاملات الأطراف الثالثة
- الحفاظ على معايير أمان المؤسسة مع التحكم المركزي في الوصول وتسجيل المراجعة
- تمكين الوكلاء من الوصول إلى أدوات الشركة دون كشف مفاتيح API أو بيانات الاعتماد في الكود
### الأتمتة عبر المنصات
- بناء سير عمل يمتد عبر منصات متعددة (مثل إنشاء مشكلات GitHub من مهام Linear، مزامنة صفحات Notion مع Slack)
- تمكين تدفق البيانات السلس بين الأدوات المختلفة في مجموعتك التقنية
- إنشاء أتمتة ذكية تفهم السياق عبر المنصات المختلفة
### اكتشاف الأدوات الديناميكي
- تحميل جميع الأدوات المتاحة أثناء التشغيل دون ترميز منطق التكامل بشكل ثابت
- تمكين الوكلاء من اكتشاف واستخدام أدوات جديدة عند إضافتها إلى حزمة الأدوات
- بناء وكلاء مرنة يمكنها التكيف مع تغير توفر الأدوات
### الوصول إلى الأدوات حسب المستخدم
- يمكن لمستخدمين مختلفين الحصول على صلاحيات ومستويات وصول مختلفة للأدوات
- تمكين سير عمل متعدد المستأجرين حيث تعمل الوكلاء نيابة عن مستخدمين محددين
- الحفاظ على الإسناد والصلاحيات المناسبة لجميع إجراءات الأدوات
## التكاملات المتاحة
يدعم معالج وكيل Merge مئات التكاملات عبر فئات متعددة:
- **إدارة المشاريع**: Linear، Jira، Asana، Monday.com، ClickUp
- **إدارة الكود**: GitHub، GitLab، Bitbucket
- **التواصل**: Slack، Microsoft Teams، Discord
- **التوثيق**: Notion، Confluence، Google Docs
- **إدارة علاقات العملاء**: Salesforce، HubSpot، Pipedrive
- **والمزيد...**
قم بزيارة [وثائق معالج وكيل Merge](https://docs.ah.merge.dev/) للحصول على قائمة كاملة بالتكاملات المتاحة.
## معالجة الأخطاء
توفر الأداة معالجة شاملة للأخطاء:
- **أخطاء المصادقة**: مفاتيح API غير صالحة أو مفقودة
- **أخطاء الصلاحيات**: المستخدم يفتقر إلى صلاحية الإجراء المطلوب
- **أخطاء API**: مشكلات في التواصل مع معالج الوكيل أو خدمات الأطراف الثالثة
- **أخطاء التحقق**: معاملات غير صالحة مُمررة لطرق الأداة
يتم تغليف جميع الأخطاء في `MergeAgentHandlerToolError` لمعالجة أخطاء متسقة.

View File

@@ -0,0 +1,76 @@
---
title: "نظرة عامة"
description: "ربط وكلاء CrewAI مع الأتمتة الخارجية وخدمات الذكاء الاصطناعي المُدارة"
icon: "face-smile"
mode: "wide"
---
تتيح أدوات التكامل لوكلائك تسليم العمل إلى منصات أتمتة أخرى وخدمات ذكاء اصطناعي مُدارة. استخدمها عندما يحتاج سير العمل إلى استدعاء نشر CrewAI موجود أو تفويض مهام متخصصة لمزودين مثل Amazon Bedrock.
## **الأدوات المتاحة**
<CardGroup cols={2}>
<Card title="أداة معالج وكيل Merge" icon="diagram-project" href="/ar/tools/integration/mergeagenthandlertool">
الوصول بأمان إلى مئات أدوات الأطراف الثالثة مثل Linear و GitHub و Slack والمزيد من خلال واجهة API الموحدة من Merge.
</Card>
<Card title="أداة تشغيل أتمتة CrewAI" icon="robot" href="/ar/tools/integration/crewaiautomationtool">
استدعاء أتمتة منصة CrewAI المباشرة، تمرير مدخلات مخصصة، واستقصاء النتائج مباشرة من وكيلك.
</Card>
<Card title="أداة استدعاء وكيل Bedrock" icon="aws" href="/ar/tools/integration/bedrockinvokeagenttool">
استدعاء وكلاء Amazon Bedrock من أطقمك، إعادة استخدام حواجز حماية AWS، وبث الاستجابات مرة أخرى إلى سير العمل.
</Card>
</CardGroup>
## **حالات الاستخدام الشائعة**
- **تسلسل الأتمتة**: بدء نشر CrewAI موجود من داخل طاقم أو تدفق آخر
- **تسليم المؤسسة**: توجيه المهام إلى وكلاء Bedrock التي تغلف بالفعل منطق الشركة وحواجز الحماية
- **سير العمل الهجين**: الجمع بين تفكير CrewAI والأنظمة اللاحقة التي تكشف واجهات برمجة تطبيقات الوكلاء الخاصة بها
- **المهام طويلة التشغيل**: استقصاء الأتمتة الخارجية ودمج النتائج النهائية مرة أخرى في التشغيل الحالي
## **مثال للبدء السريع**
```python
from crewai import Agent, Task, Crew
from crewai_tools import InvokeCrewAIAutomationTool
from crewai_tools.aws.bedrock.agents.invoke_agent_tool import BedrockInvokeAgentTool
# External automation
analysis_automation = InvokeCrewAIAutomationTool(
crew_api_url="https://analysis-crew.acme.crewai.com",
crew_bearer_token="YOUR_BEARER_TOKEN",
crew_name="Analysis Automation",
crew_description="Runs the production-grade analysis pipeline",
)
# Managed agent on Bedrock
knowledge_router = BedrockInvokeAgentTool(
agent_id="bedrock-agent-id",
agent_alias_id="prod",
)
automation_strategist = Agent(
role="Automation Strategist",
goal="Orchestrate external automations and summarise their output",
backstory="You coordinate enterprise workflows and know when to delegate tasks to specialised services.",
tools=[analysis_automation, knowledge_router],
verbose=True,
)
execute_playbook = Task(
description="Run the analysis automation and ask the Bedrock agent for executive talking points.",
agent=automation_strategist,
)
Crew(agents=[automation_strategist], tasks=[execute_playbook]).kickoff()
```
## **أفضل الممارسات**
- **تأمين بيانات الاعتماد**: قم بتخزين مفاتيح API ورموز الحامل في متغيرات البيئة أو مدير الأسرار
- **التخطيط لزمن الاستجابة**: قد تستغرق الأتمتة الخارجية وقتاً أطول - عيّن فترات استقصاء ومهلات مناسبة
- **إعادة استخدام الجلسات**: تدعم وكلاء Bedrock معرّفات الجلسة حتى تتمكن من الحفاظ على السياق عبر استدعاءات أدوات متعددة
- **التحقق من الاستجابات**: قم بتوحيد المخرجات عن بُعد (JSON، نص، رموز الحالة) قبل إعادة توجيهها إلى المهام اللاحقة
- **مراقبة الاستخدام**: تتبع سجلات المراجعة في منصة CrewAI أو AWS CloudWatch للبقاء على اطلاع بحدود الحصص والأعطال