# الخطة

Canonical URL: https://developers.iagenify.com/ar/sdk/agent/modes/plan/
Language: ar

`mode: "plan"`

القراءة فقط، والعميل يعرف ذلك: يُطلب منه التحقيق وتقديم خطة بدلاً من محاولة التغيير. الطريقة الوحيدة التي تغير طريقة تفكيره، وليس فقط ما هو مطلوب.

Status: nothing is changed · refused before the callback · todo_write is the output

Every category but `read`, `memory` and `task` is refused outright — the callback is not even consulted, since there is nothing to decide. The refusal names the mode and says the user will switch it to execute.

```javascript
// What the model receives when it tries to write in plan mode
"Refused: plan mode is read-only. Present the plan; the user will switch mode to execute it."
```

## التعليم هو السمة الحقيقية {#instruction}

> **الرفض بعد المحاولة يكلف بدوره؛ الإيعاز قبله لا يكلف شيئاً**
>
> النظام الناظم الحث السريع للعامل في نمط الخطة للتحقيق ثم تقديم خطة واضحة مع todo_writeلذا فهو ينفق خطواته في القراءة والتفكير بدلاً من اكتشاف رفض واحد في وقت واحد

## ما يمكن القيام به {#available}

- إقرأ، إقرأ، القائمة، إشحذ و إقفز مساحة العمل بأكملها
- افتح صفحات الإنترنت و افتحها.
- اقر قراءة مُوصِف `query_storage`.
- واقرأ مذكراتها الطويلة الأجل، وابحث في الجلسات السابقة مع: `recall`.
- مندوب تحقيق إلى الكوادر `task` و أطفالها في وضعية التخطيط أيضاً
- اكتب خطة مع `todo_write`.

## ثانيا - نمط الطورين {#pattern}

```javascript
const agent = api.agents.create({
  runtime: "local", machine: pc, model: "gemini-3.5-flash",
  memory: true,                // so the plan survives into the second phase
  mode: "plan",
});

const plan = await agent.run({ inputs: "Migrate the date handling to UTC everywhere." });
console.log(plan.text, plan.todos);

// The person reads it and agrees
agent.setMode("auto");
await agent.run({ inputs: "Do it." });
```

مع مع مع `memory: true` الجولة الثانية تحمل كل شيء يقرأه الأول لذا الخطة تنفذ بدون إعادة التحقيق

## لا شيء يُنفَق فوق الدوران {#money}

`money` و رفض مثل البقية لذا خطة مخططة لا يمكن أن تشتري مساحة *في نص* - البحث، وصفحة التقاط - هي: `read` و ما زال يحدث، لذا فإنّ التخطيط ليس مجانياً.

- [todo_write](/ar/sdk/agent/tools/todo-write): حيث يتم كتابة الخطة.
- [تشغيل تشغيل](/ar/sdk/agent/modes/auto): النسق المعتاد للتحول إلى.
- [الجلسات](/ar/sdk/agent/sessions): إبقاء التحقيق بين الركضتين

```python
# What the model receives when it tries to write in plan mode
"Refused: plan mode is read-only. Present the plan; the user will switch mode to execute it."
```

```python
agent = api.agents.create(
    runtime="local", machine=pc, model="gemini-3.5-flash",
    memory=True,                 # so the plan survives into the second phase
    mode="plan",
)

plan = agent.run(inputs="Migrate the date handling to UTC everywhere.")
print(plan["text"], plan["todos"])

# The person reads it and agrees
agent.set_mode("auto")
agent.run(inputs="Do it.")
```
