مكتبة الوكلاء الفرعيين

save()

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

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

always the accounttools and model optionaldescription decides
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

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"),
});
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.",
    ]),
)
namestringمطلوب

أحرف و أرقام و إنتقالات

descriptionstringمطلوب

خط واحد في النظام سريع، يحدد متى يقوم الوكيل بتفويضه إليه.

contentstringمطلوب

تعليماته، تصل إلى 100 ألف حرف

toolsstring[]

اختياره، و عدم وجوده يرث الوالد

modelstring

نموذجها، و لا يرث الوالدان

كتابة واحدة جيدة

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

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

لا تكتب إلى القرص

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