Planning and Decomposition

Big goals fail in one shot. The fix is boring and reliable: split the goal into small tasks whose results are checkable, then work through them. Two styles dominate, and picking the wrong one is a common and expensive mistake.

The two planning styles

ReAct, decide as you goPlan first, then execute
HowOne step at a time. Each decision is made after seeing the last result.Write the whole task list up front, then run the list.
Good forMessy work where step three depends on what step two found.Predictable work you can review, cost, and parallelize before spending anything.
WeaknessWanders. Can loop. Hard to estimate before you run it.A plan written before the facts are in can be wrong from step one.
Cost shapeOne model call per step, unpredictable total.One call to plan, then cheap or parallel execution.
Use whenResearch, debugging, support triage.Migrations, reports, batch work, anything a human must approve first.

Most production systems are a hybrid: plan first so a human can approve the shape of the work, then allow a bounded ReAct loop inside each step.

Optional: load a real model

Plan first, then execute

Give it a goal. The planner writes a numbered task list, then each task runs as its own small agent with tools. Watch the handoff: the plan is data, and the executor never sees your original wording, only its one task.

The plan

The task list appears here first.

Execution

Then each task runs, one at a time.

How to split a goal so the pieces actually work

By source of truth

One task per system you have to ask: the catalog, the calendar, the spreadsheet. Each answer is checkable on its own.

By reversibility

Put every read-only task first and every write, send, or purchase last, behind one approval. Cheap to redo, expensive to undo, never in the same step.

By verifiability

If you cannot say what a correct result for a task looks like, it is not a task yet, it is a wish. Split it further.

By cost

Separate the one expensive step from the nine cheap ones so a failure does not force you to pay for the expensive one again.

Watch for the plan that ignores reality. A model asked to plan will happily produce a beautiful seven step plan for a system it has never seen. That is why the executor here uses real tools: each step either produces a checkable result or fails visibly. A plan nobody executes is just prose. Next: what changes when you use several agents.

Free from AI School - no signup, everything runs in your browser.