The OODA loop and the four pillars
The architecture. Four software components in a continuous cycle — and the reason it is a cycle rather than a pipeline.
In 60 seconds
The OODA loop and the four pillars
The architecture. Four software components in a continuous cycle — and the reason it is a cycle rather than a pipeline.
Tap any box in the diagram
Ingests whatever the system can see: text, code, files, API responses, screen pixels, logs, tool output. Its only job is to turn the world into tokens the core can read. Security note: this is also the single place untrusted content enters your system. Everything in Module 8 attaches right here.
Why it must be a loop
- 1
Acting changes the world
After step one, the situation is different. A plan made before acting is stale the moment it starts executing. - 2
Errors are information
A pipeline treats a failure as an ending. A loop treats it as the most useful thing it has learned so far. - 3
Goals decompose as you go
You cannot fully plan a task you do not yet understand. The loop lets the system discover the sub-goals by attempting the work. - 4
Stopping needs a decision
A pipeline stops when it runs out of steps. A loop stops when the goal is met, the budget is spent, or a human intervenes — and you must implement all three.
The four pillars as actual software
| Pillar | What it is in code | Common mistake |
|---|---|---|
| Perception | Parsers, loaders, API clients, OCR | Trusting what it ingests |
| Working memory | Postgres for state, pgvector for retrieval | Only building retrieval, no state |
| Cognitive core | Model call + verifier + parser | Assuming this is the whole system |
| Action loop | Tool registry, executor, sandbox, budget | No limits, no logs, no undo |
Watch and read more
Lab
An OODA loop where you can point at every stage in the code.
The problem
def observe(env) -> Observation: ...
def orient(obs, state) -> Context: ...
def decide(ctx) -> Action: ...
def act(action) -> Result: ...You are done when
Hard questions
Try to answer before you reveal. If you can answer these, you understood the lesson.
Q1Which of the four stages should be hardest to change in production, and why?Reveal
Questions people ask
Is OODA better than ReAct or Plan-and-Execute?
They are the same shape with different emphasis. ReAct interleaves reasoning and acting turn by turn; Plan-and-Execute plans first then runs; OODA names the orient stage explicitly, which is its real contribution — it forces you to ask where state lives.
Where does planning fit?
Inside Decide. Long plans are fragile because of the compounding-error problem (Module 30), so the durable pattern is: plan a few steps, execute one, observe, re-plan. Commit to the next action, not to the whole route.
How is this different from a normal program?
A normal program's decide step is code you wrote and can read. Here it is a model whose next decision you cannot predict. Everything else — the loop, the state, the tools — is ordinary software, which is precisely why that is where your controls belong.
Do I need a vector database?
Not to start. Begin with a plain state table and a list. Add retrieval when you can point at the specific thing the system forgot. Vector stores are frequently the first thing built and the last thing needed.
Lesson test
5 questions. Get 3 right (60%) to pass and complete this lesson.
Sign in with your phone number to take the test and save your progress