Skip to content

Commit 10da3ad

Browse files
Merge branch 'main' into tfreire/cor-170-inputs-id-to-restore-from-state-id-doc
2 parents 7bdba94 + ba523f4 commit 10da3ad

33 files changed

Lines changed: 1772 additions & 178 deletions

File tree

.github/workflows/vulnerability-scan.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ jobs:
4646
- name: Run pip-audit
4747
run: |
4848
uv run pip-audit --desc --aliases --skip-editable --format json --output pip-audit-report.json \
49-
--ignore-vuln CVE-2026-3219
49+
--ignore-vuln CVE-2026-3219 \
50+
--ignore-vuln GHSA-r374-rxx8-8654
5051
# Ignored CVEs:
51-
# CVE-2026-3219 - pip 26.0.1 (GHSA-58qw-9mgm-455v): no fix available, archive handling issue
52+
# CVE-2026-3219 - pip 26.0.1 (GHSA-58qw-9mgm-455v): no fix available, archive handling issue
53+
# GHSA-r374-rxx8-8654 - paramiko 4.0.0 (SHA-1 in rsakey.py): no fix available; transitive via composio-core
5254
continue-on-error: true
5355

5456
- name: Display results

docs/ar/changelog.mdx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,28 @@ description: "تحديثات المنتج والتحسينات وإصلاحات
44
icon: "clock"
55
mode: "wide"
66
---
7+
<Update label="9 مايو 2026">
8+
## v1.14.5a4
9+
10+
[عرض الإصدار على GitHub](https://github.com/crewAIInc/crewAI/releases/tag/1.14.5a4)
11+
12+
## ما الذي تغير
13+
14+
### الميزات
15+
- تحديث قوائم LLM
16+
17+
### إصلاحات الأخطاء
18+
- إصلاح مشكلة الاعتماد من خلال نقل `textual` إلى `crewai-cli` وإضافة `certifi`
19+
20+
### الوثائق
21+
- تحديث سجل التغييرات والإصدار لـ v1.14.5a3
22+
23+
## المساهمون
24+
25+
@cgoeppinger, @greysonlalonde
26+
27+
</Update>
28+
729
<Update label="7 مايو 2026">
830
## v1.14.5a3
931

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
---
2+
title: "ترقية CrewAI"
3+
description: "كيفية ترقية CrewAI في مشروعك والتكيّف مع التغييرات الجذرية بين الإصدارات."
4+
icon: "arrow-up-circle"
5+
---
6+
7+
## نظرة عامة
8+
9+
تجلب إصدارات CrewAI قدرات جديدة بانتظام. يرشدك هذا الدليل خلال الخطوات العملية للحفاظ على تثبيتك محدّثًا — سواء أداة سطر الأوامر أو البيئة الافتراضية لمشروعك.
10+
11+
إذا كنت تبدأ من الصفر، راجع [التثبيت](/ar/installation). إذا كنت قادمًا من إطار عمل آخر، راجع [الترحيل من LangGraph](/ar/guides/migration/migrating-from-langgraph).
12+
13+
---
14+
15+
## الشيئان اللذان قد ترغب في ترقيتهما
16+
17+
يوجد CrewAI في مكانين على جهازك، ويتم ترقيتهما بشكل مستقل:
18+
19+
| ماذا | كيف يُثبَّت | كيف تتم الترقية |
20+
|---|---|---|
21+
| **أداة سطر الأوامر العامة `crewai`** | `uv tool install crewai` | `uv tool install crewai --upgrade` |
22+
| **بيئة venv للمشروع** (حيث يعمل الكود) | `crewai install` / `uv sync` | `uv add "crewai[...]>=X.Y.Z"` ثم `crewai install` |
23+
24+
يمكن لهما — وغالبًا ما يحدث — أن يخرجا عن التزامن. تشغيل `crewai --version` يُظهر إصدار سطر الأوامر. تشغيل `uv pip show crewai` داخل مشروعك يُظهر إصدار venv. إذا اختلفا، فهذا طبيعي؛ ما يهم بالنسبة للكود قيد التشغيل هو إصدار venv.
25+
26+
## لماذا لا يقوم `crewai install` وحده بالترقية
27+
28+
`crewai install` هو غلاف رفيع حول `uv sync`. يُثبّت بالضبط ما يقوله ملف `uv.lock` الحالي — وهو **لا** يرفع أي قيود إصدار.
29+
30+
إذا كان `pyproject.toml` يقول `crewai>=1.11.1` وقد قام ملف القفل بحلّه إلى `1.11.1`، فإن تشغيل `crewai install` سيُبقيك على `1.11.1` للأبد، حتى وإن كان الإصدار `1.14.4` متاحًا.
31+
32+
للترقية فعلًا، عليك:
33+
34+
1. تحديث قيد الإصدار في `pyproject.toml`
35+
2. إعادة حلّ ملف القفل
36+
3. مزامنة venv
37+
38+
`uv add` يقوم بالثلاثة في خطوة واحدة.
39+
40+
## كيفية ترقية مشروعك
41+
42+
```bash
43+
# يرفع القيد ويعيد القفل في أمر واحد
44+
uv add "crewai[tools]>=1.14.4"
45+
46+
# يزامن venv (crewai install يستدعي uv sync تحت الغطاء)
47+
crewai install
48+
49+
# تحقّق
50+
uv pip show crewai
51+
# → Version: 1.14.4
52+
```
53+
54+
استبدل `[tools]` بأي إضافات يستخدمها مشروعك (مثلًا `[tools,anthropic]`). تحقّق من قائمة `dependencies` في `pyproject.toml` إن لم تكن متأكدًا.
55+
56+
<Note>
57+
يحدّث `uv add` كلا من `pyproject.toml` **و** `uv.lock` بشكل ذرّي. إذا قمت بتحرير `pyproject.toml` يدويًا، فإنك لا تزال بحاجة إلى تشغيل `uv lock --upgrade-package crewai` لإعادة حلّ ملف القفل قبل أن يلتقط `crewai install` الإصدار الجديد.
58+
</Note>
59+
60+
## ترقية أداة سطر الأوامر العامة
61+
62+
أداة سطر الأوامر العامة منفصلة عن مشروعك. قم بترقيتها عبر:
63+
64+
```bash
65+
uv tool install crewai --upgrade
66+
```
67+
68+
إذا حذّرك الـ shell بشأن `PATH` بعد الترقية، قم بتحديثه:
69+
70+
```bash
71+
uv tool update-shell
72+
```
73+
74+
هذا **لا** يمسّ بيئة venv الخاصة بمشروعك — لا تزال بحاجة إلى `uv add` + `crewai install` داخل المشروع.
75+
76+
## التحقق من تزامن الاثنين
77+
78+
```bash
79+
# إصدار سطر الأوامر العام
80+
crewai --version
81+
82+
# إصدار venv للمشروع
83+
uv pip show crewai | grep Version
84+
```
85+
86+
ليس من الضروري أن يتطابقا — لكن إصدار venv للمشروع هو ما يهم لسلوك التشغيل.
87+
88+
<Note>
89+
يتطلب CrewAI `Python >=3.10, <3.14`. إذا كان `uv` مثبَّتًا مقابل مفسّر أقدم، فأعد إنشاء venv للمشروع باستخدام إصدار Python مدعوم قبل تشغيل `crewai install`.
90+
</Note>
91+
92+
---
93+
94+
## التغييرات الجذرية وملاحظات الترحيل
95+
96+
تتطلب معظم الترقيات تعديلات صغيرة فقط. المناطق أدناه هي تلك التي تنكسر بصمت أو بتتبعات مكدّس مربكة.
97+
98+
### مسارات الاستيراد: tools و`BaseTool`
99+
100+
الموقع الرسمي لاستيراد الـ tools هو `crewai.tools`. لا تزال المسارات القديمة تظهر في الدروس لكن يجب تحديثها.
101+
102+
```python
103+
# قبل
104+
from crewai_tools import BaseTool
105+
from crewai.agents.tools import tool
106+
107+
# بعد
108+
from crewai.tools import BaseTool, tool
109+
```
110+
111+
كلٌ من المُزخرف `@tool` والفئة الفرعية `BaseTool` يقعان في `crewai.tools`. `AgentFinish` والرموز الأخرى الداخلية للوكيل لم تعد جزءًا من السطح العام — إذا كنت تستوردها، فانتقل إلى event listeners أو callbacks الـ `Task` بدلًا منها.
112+
113+
### تغييرات معاملات `Agent`
114+
115+
```python
116+
from crewai import Agent
117+
118+
agent = Agent(
119+
role="Researcher",
120+
goal="Find authoritative sources on {topic}",
121+
backstory="You are a careful, source-driven researcher.",
122+
llm="gpt-4o-mini", # اسم نموذج كسلسلة نصية أو كائن LLM
123+
verbose=True, # bool وليس مستوى عددي صحيح
124+
max_iter=15, # تغيّر الافتراضي بين الإصدارات — حدّده بشكل صريح
125+
allow_delegation=False,
126+
)
127+
```
128+
129+
- يقبل `llm` إما اسم نموذج كسلسلة نصية (يُحلَّ عبر المزوّد المهيّأ) أو كائن `LLM` للتحكم الدقيق.
130+
- `verbose` هو `bool` بسيط. تمرير عدد صحيح لم يعد يبدّل مستويات السجل.
131+
- تغيّرت افتراضات `max_iter` بين الإصدارات. إذا توقف وكيلك بصمت عن التكرار بعد أول استدعاء tool، فحدّد `max_iter` صراحةً.
132+
133+
### معاملات `Crew`
134+
135+
```python
136+
from crewai import Crew, Process
137+
138+
crew = Crew(
139+
agents=[...],
140+
tasks=[...],
141+
process=Process.sequential, # أو Process.hierarchical
142+
memory=True,
143+
cache=True,
144+
embedder={"provider": "openai", "config": {"model": "text-embedding-3-small"}},
145+
)
146+
```
147+
148+
- يتطلب `process=Process.hierarchical` إما `manager_llm=` أو `manager_agent=`. بدون أحدهما، يرفع kickoff خطأً عند التحقّق.
149+
- `memory=True` مع مزوّد embedding غير افتراضي يحتاج إلى قاموس `embedder` — راجع [إعداد الذاكرة وembedder](#memory-embedder-config) أدناه.
150+
151+
### الإخراج المُهيكل لـ `Task`
152+
153+
استخدم `output_pydantic` أو `output_json` أو `output_file` لإلزام نتيجة المهمة بشكل مكتوب الأنواع:
154+
155+
```python
156+
from pydantic import BaseModel
157+
from crewai import Task
158+
159+
class Article(BaseModel):
160+
title: str
161+
body: str
162+
163+
write = Task(
164+
description="Write an article about {topic}",
165+
expected_output="A short article with a title and body",
166+
agent=writer,
167+
output_pydantic=Article, # الفئة، وليس مثيلًا منها
168+
output_file="output/article.md",
169+
)
170+
```
171+
172+
`output_pydantic` يأخذ **الفئة** نفسها. تمرير `Article(title="", body="")` خطأ شائع ويفشل بخطأ تحقّق مربك.
173+
174+
### إعداد الذاكرة وembedder {#memory-embedder-config}
175+
176+
إذا كان `memory=True` وأنت لا تستخدم embeddings الافتراضية الخاصة بـ OpenAI، فيجب أن تمرّر `embedder`:
177+
178+
```python
179+
crew = Crew(
180+
agents=[...],
181+
tasks=[...],
182+
memory=True,
183+
embedder={
184+
"provider": "ollama",
185+
"config": {"model": "nomic-embed-text"},
186+
},
187+
)
188+
```
189+
190+
ضع بيانات اعتماد المزوّد المعنيّة (`OPENAI_API_KEY`, `OLLAMA_HOST`, إلخ) في ملف `.env`. مسارات تخزين الذاكرة محلية بالنسبة للمشروع افتراضيًا — احذف مجلد ذاكرة المشروع إذا غيّرت embedders، لأن الأبعاد لا تختلط.

docs/ar/tools/ai-ml/daytona.mdx

Lines changed: 64 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The Daytona sandbox tools give CrewAI agents access to isolated, ephemeral compu
1313

1414
- **`DaytonaExecTool`** — run any shell command inside a sandbox.
1515
- **`DaytonaPythonTool`** — execute a block of Python source code inside a sandbox.
16-
- **`DaytonaFileTool`** — read, write, append, list, delete, and inspect files inside a sandbox.
16+
- **`DaytonaFileTool`** — read, write, append, list, delete, and inspect files inside a sandbox; also supports `move`, `find` (content grep), `search` (filename glob), `chmod` (permissions), `replace` (bulk find-and-replace), and `exists`.
1717

1818
All three tools share the same sandbox lifecycle controls, so you can mix and match them while keeping state in a single persistent sandbox.
1919

@@ -55,25 +55,30 @@ from crewai_tools import DaytonaPythonTool
5555
tool = DaytonaPythonTool()
5656
result = tool.run(code="print(sum(range(10)))")
5757
print(result)
58-
# {"exit_code": 0, "result": "45\n", "artifacts": None}
58+
# {"exit_code": 0, "result": "45\n", "artifacts": ExecutionArtifacts(stdout="45\n", charts=[])}
5959
```
6060

6161
### Multi-step shell session (persistent)
6262

6363
```python Code
6464
from crewai_tools import DaytonaExecTool, DaytonaFileTool
6565

66+
# Create the persistent sandbox via the first tool, then attach the second
67+
# tool to it so both share state (installed packages, files, env vars).
6668
exec_tool = DaytonaExecTool(persistent=True)
67-
file_tool = DaytonaFileTool(persistent=True)
68-
69-
# Install a package, then write and run a script — all in the same sandbox
7069
exec_tool.run(command="pip install httpx -q")
71-
file_tool.run(action="write", path="/workspace/fetch.py", content="import httpx; print(httpx.get('https://httpbin.org/get').status_code)")
72-
exec_tool.run(command="python /workspace/fetch.py")
70+
file_tool = DaytonaFileTool(sandbox_id=exec_tool.active_sandbox_id)
71+
72+
file_tool.run(
73+
action="write",
74+
path="workspace/script.py",
75+
content="import httpx; print(f'httpx loaded, version {httpx.__version__}')",
76+
)
77+
exec_tool.run(command="python workspace/script.py")
7378
```
7479

7580
<Note>
76-
Each tool instance maintains its own persistent sandbox. To share **one** sandbox across two tools, create the first tool, grab its sandbox id via `tool._persistent_sandbox.id`, and pass it to the second tool via `sandbox_id=...`.
81+
By default, each tool with `persistent=True` lazily creates its **own** sandbox on first use. The pattern above shares a single sandbox across multiple tools by reading the first tool's `active_sandbox_id` after a `.run()` call and passing it to the others via `sandbox_id=...`. With `persistent=False` (the default), every `.run()` call gets a fresh sandbox that's deleted at the end of that call.
7782
</Note>
7883

7984
### Attach to an existing sandbox
@@ -82,7 +87,7 @@ Each tool instance maintains its own persistent sandbox. To share **one** sandbo
8287
from crewai_tools import DaytonaExecTool
8388

8489
tool = DaytonaExecTool(sandbox_id="my-long-lived-sandbox")
85-
result = tool.run(command="ls /workspace")
90+
result = tool.run(command="ls workspace")
8691
```
8792

8893
### Custom sandbox parameters
@@ -102,6 +107,41 @@ tool = DaytonaExecTool(
102107
)
103108
```
104109

110+
### Searching, moving, and modifying files
111+
112+
```python Code
113+
from crewai_tools import DaytonaFileTool
114+
115+
file_tool = DaytonaFileTool(persistent=True)
116+
117+
# Find every TODO in the source tree (grep file contents recursively)
118+
file_tool.run(action="find", path="workspace/src", pattern="TODO:")
119+
120+
# Find all Python files (glob match on filenames)
121+
file_tool.run(action="search", path="workspace", pattern="*.py")
122+
123+
# Make a script executable
124+
file_tool.run(action="chmod", path="workspace/run.sh", mode="755")
125+
126+
# Rename or move a file
127+
file_tool.run(
128+
action="move",
129+
path="workspace/draft.md",
130+
destination="workspace/final.md",
131+
)
132+
133+
# Bulk find-and-replace across multiple files
134+
file_tool.run(
135+
action="replace",
136+
paths=["workspace/src/a.py", "workspace/src/b.py"],
137+
pattern="old_function",
138+
replacement="new_function",
139+
)
140+
141+
# Quick existence check before a destructive op
142+
file_tool.run(action="exists", path="workspace/cache.db")
143+
```
144+
105145
### Agent integration
106146

107147
```python Code
@@ -121,7 +161,7 @@ coder = Agent(
121161
)
122162

123163
task = Task(
124-
description="Write a Python script that prints the first 10 Fibonacci numbers, save it to /workspace/fib.py, and run it.",
164+
description="Write a Python script that prints the first 10 Fibonacci numbers, save it to workspace/fib.py, and run it.",
125165
expected_output="The first 10 Fibonacci numbers printed to stdout.",
126166
agent=coder,
127167
)
@@ -168,12 +208,22 @@ All three tools accept these parameters at initialization:
168208

169209
| Parameter | Type | Required | Description |
170210
|-----------|------|----------|-------------|
171-
| `action` | `str` || One of: `read`, `write`, `append`, `list`, `delete`, `mkdir`, `info`. |
172-
| `path` | `str` || Absolute path inside the sandbox. |
173-
| `content` | `str \| None` | | Content to write or append. Required for `append`. |
211+
| `action` | `str` || One of: `read`, `write`, `append`, `list`, `delete`, `mkdir`, `info`, `exists`, `move`, `find`, `search`, `chmod`, `replace`. |
212+
| `path` | `str \| None` | for all actions except `replace` | Absolute path inside the sandbox. |
213+
| `content` | `str \| None` | ✓ for `append` | Content to write or append. |
174214
| `binary` | `bool` | | If `True`, `content` is base64 on write; returns base64 on read. |
175215
| `recursive` | `bool` | | For `delete`: remove directories recursively. |
176-
| `mode` | `str` | | For `mkdir`: octal permission string (default `"0755"`). |
216+
| `mode` | `str \| None` | | For `mkdir`: octal permissions for the new directory (defaults to `"0755"`). For `chmod`: octal permissions to apply to the target. |
217+
| `destination` | `str \| None` | ✓ for `move` | Destination path for `move`. |
218+
| `pattern` | `str \| None` | ✓ for `find`, `search`, `replace` | For `find`: substring matched against file CONTENTS. For `search`: glob matched against file NAMES (e.g. `*.py`). For `replace`: text to replace inside files. |
219+
| `replacement` | `str \| None` | ✓ for `replace` | Replacement text for `pattern`. |
220+
| `paths` | `list[str] \| None` | ✓ for `replace` | List of file paths in which to replace text. |
221+
| `owner` | `str \| None` | | For `chmod`: new file owner. |
222+
| `group` | `str \| None` | | For `chmod`: new file group. |
223+
224+
<Note>
225+
For `chmod`, pass at least one of `mode`, `owner`, or `group` — any field left as `None` is left unchanged on the target.
226+
</Note>
177227

178228
<Tip>
179229
For files larger than a few KB, create the file first with `action="write"` and empty content, then send the body via multiple `action="append"` calls of ~4 KB each to stay within tool-call payload limits.

0 commit comments

Comments
 (0)