# Najpierw plan, potem wykonanie (plan-and-execute)

EN: **Plan-and-execute agents** · id `planexecute` · aliases: plan-and-execute, plan-then-execute, planner-executor, planista i wykonawca

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Aplikacje LLM i agenci](https://aiatlasgraph.com/t/applications.md) › [Agenci i orkiestracja](https://aiatlasgraph.com/t/agentsnode.md) › [Pętle działania agenta (myśl–działaj–obserwuj)](https://aiatlasgraph.com/t/agentloops.md) › Najpierw plan, potem wykonanie (plan-and-execute)

## Description

- PL: Architektura agenta oddzielająca planistę, który z góry tworzy listę zależnych kroków, od wykonawcy realizującego je narzędziami i modułu składającego wyniki.
- EN: An agent architecture separating a planner that writes dependent steps upfront from a worker that executes them with tools and a module that combines the results.

## In one sentence

- PL: Agent najpierw rozpisuje cały plan zadania, a potem wykonuje kolejne punkty, wracając do planowania tylko wtedy, gdy coś pójdzie nie tak.
- EN: The agent first writes out a full plan, then carries out each item, returning to planning only when something goes wrong.

## Problem it solves

- PL: Agent zastanawiający się od nowa przy każdym kroku działa wolno, drogo i łatwo gubi główny cel.
- EN: An agent that rethinks everything at every step is slow, expensive and easily loses sight of the main goal.

## What it does

- PL: Jak kierownik budowy, który rozpisuje harmonogram, rozdaje zadania ekipom i zbiera wyniki zamiast samemu kłaść każdą cegłę.
- EN: Like a site manager who drafts a schedule, hands tasks to crews and collects results instead of laying every brick himself.

## Everyday example

- PL: Prosisz o porównanie trzech ofert ubezpieczenia; asystent planuje trzy wyszukiwania i tabelę, wykonuje je, a potem składa wnioski.
- EN: You ask for a comparison of three insurance offers; the assistant plans three lookups and a table, runs them, then writes conclusions.

## This concerns you if you…

- PL: płacisz za każde wywołanie modelu i chcesz ich mniej
- PL: twoje zadania mają przewidywalne etapy
- PL: chcesz zobaczyć plan agenta przed jego wykonaniem
- EN: pay for every model call and want fewer of them
- EN: have tasks with predictable stages
- EN: want to see an agent's plan before it runs

## Keywords

ReWOO · plan-and-execute · planner-worker-solver · evidence placeholders · foreseeable reasoning · tool-failure robustness

## How it works

- PL: Planista generuje plan z zależnościami i zmiennymi na przyszłe wyniki, np. #E1, #E2. Wykonawca uruchamia wywołania narzędzi i wypełnia zmienne dowodami, a moduł rozwiązujący łączy plan z dowodami w odpowiedź. W ReWOO plan powstaje przed obserwacjami, co ogranicza powtarzanie historii, lecz utrudnia reakcję na nieprzewidziane środowisko.
- EN: A planner generates a plan with dependencies and placeholders for future results, such as #E1 and #E2. A worker runs tool calls and fills the placeholders with evidence, and a solver combines plan and evidence into an answer. In ReWOO the plan is written before observations, reducing repeated history but making unforeseen environments harder to handle.

## Limits

- PL: Plan tworzony bez obserwacji zawodzi w nieznanym środowisku, gdzie kroków nie da się przewidzieć. Planista może zakładać, że narzędzie zwróci informację, której nie ma; nadmiar dostępnych narzędzi obniża trafność planu.
- EN: A plan made without observations fails in unfamiliar environments where steps cannot be foreseen. The planner may assume a tool returns information it does not; too many available tools lower plan accuracy.

## Key terms

- PL: **planista**: Model lub moduł, który rozpisuje kroki zadania przed ich wykonaniem.
- PL: **wykonawca**: Moduł uruchamiający zaplanowane wywołania narzędzi i zbierający wyniki.
- PL: **moduł rozwiązujący**: Moduł łączący plan i zebrane dowody w odpowiedź końcową.
- EN: **planner**: A model or module that writes out task steps before they run.
- EN: **worker**: A module that runs planned tool calls and collects results.
- EN: **solver**: A module combining the plan and collected evidence into the final answer.

## Know first

- [Planowanie automatyczne (PDDL) (Automated planning (PDDL))](https://aiatlasgraph.com/t/classicalplanning.md)
- [Łańcuchy promptów (Prompt chaining)](https://aiatlasgraph.com/t/promptchaining.md)

## Sources

- [ReWOO: Decoupling Reasoning from Observations for Efficient Augmented Language Models](<https://arxiv.org/abs/2305.18323>) `xu-rewoo-2023` · by Binfeng Xu, Zhiyuan Peng, Bowen Lei, Subhabrata Mukherjee, Yuchen Liu, Dongkuan Xu

---

AI Atlas revision 124 (2026-10-31) · HTML: https://aiatlasgraph.com/t/planexecute · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-31
