# save()

Canonical URL: https://developers.iagenify.com/ar/sdk/ref/agents/subagents/save/
Language: ar

`api.agents.subagents.save({ name, description, content, tools?, model? }) → Promise<Subagent>`

ينشئ أو يستبدل a يعمل حساب الوصف هو رئيسي عامل عند إلى تفويض.

Status: always the account · tools and model optional · description decides

```javascript
await api.agents.subagents.save({
  name: "explore",
  description: "Dig through files and data to answer a question, and report the facts.",
  tools: ["read", "list", "glob", "grep", "search", "fetch", "query_storage", "account"],
  model: "gemini-3.5-flash",
  content: [
    "Find what was asked. Quote exactly, with paths.",
    "Do not change anything.",
    "End with the facts, not with advice.",
  ].join("\n"),
});
```

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `name` | string | مطلوب | أحرف و أرقام و إنتقالات |
| `description` | string | مطلوب | خط واحد في النظام سريع، يحدد متى يقوم الوكيل بتفويضه إليه. |
| `content` | string | مطلوب | تعليماته، تصل إلى 100 ألف حرف |
| `tools` | string[] |  | اختياره، و عدم وجوده يرث الوالد |
| `model` | string |  | نموذجها، و لا يرث الوالدان |

## كتابة واحدة جيدة {#writing}

- اعطها اضيق مجموعة ادوات يمكنها ان تؤدي العمل — ان المحقق لا يحتاج الى الكتابة .
- فأخبرها بأن تبلغ الوقائع مع المسارات والاقتباسات: فالأبو لا يرى أي نتيجة من نتائج أداتها.
- قل ما عليك فعله عندما يتم منعه، لأنه لا يمكن أن يطلب من أي شخص.
- وكثيراً ما يكون النموذج الأرخص صحيحاً: إذ يقرأ أحد المندوبين الكثير ويقرر القليل.

> **يبدأ من لا شيء**
>
> فَٱلْمُسَاعِدُ ٱلْمُسْتَقْبَلُ لَا يَرَى جَمْعًا مِنَ ٱلْمَحَاكَمَةِ ، فَهُوَ يَتَمَكَّنُ مِنْ إِلَى ٱلْمَسْؤُولِيَّةِ وَٱلْمَسْلُومَةِ ٱلْمُهِمَّةِ أَنْ تَحْمِلَ ٱلْمَعْدُودَةَ وَٱلسَّبَبَاتِ وَٱلْمَسْلَمَاتِ ٱلْمُؤْمِنَةَةَ وَتَحْمِلَ ٱلْمَسِيحَةَ وَتَلْتَحِيَ ٱلْمَحَةَ ٱلْحَدِ .

## لا تكتب إلى القرص {#account}

نفس القاعدة كمهارات: القرص هو مصدر للقراءة فقط، و ملفات المطور تبقى لها.

- [%](/ar/sdk/agent/tools/task): كيف يتم استدعاؤها
- [remove()](/ar/sdk/ref/agents/subagents/remove): أخذ واحد بعيدا.

```python
api.agents.subagents.save(
    name="explore",
    description="Dig through files and data to answer a question, and report the facts.",
    tools=["read", "list", "glob", "grep", "search", "fetch", "query_storage", "account"],
    model="gemini-3.5-flash",
    content="\n".join([
        "Find what was asked. Quote exactly, with paths.",
        "Do not change anything.",
        "End with the facts, not with advice.",
    ]),
)
```
