Skip to content
Nitmonk
Agent Brain Deep-Dive

Section 1.5 · How Agents Decide What To Do Next

The observe → decide → act → learn loop.

Section 1.5 · How Agents Decide What To Do Next — infographic explaining The observe → decide → act → learn loop.
Section 1.5 · How Agents Decide What To Do Next — visual explainer by Nitmonk.

Every turn, an enterprise agent evaluates the current state and chooses the best next action. It's a continuous loop of observe → decide → act → learn. Agents don't guess — they use a decision engine driven by state, memory and policies.

In simple terms

Each turn the agent checks its state and decides the single best next action.

How it works

  1. 1Look at the current state: goal, memory, observations, tool results, policies, constraints.
  2. 2Decide via a loop: is the goal complete? need info? need a tool? need memory? need a human?
  3. 3The decision engine (LLM + rules + heuristics) picks the next action.
  4. 4Act, update the state, and loop again.
  5. 5Produce outputs: next action, new state, tool calls, memory updates, logs.

Key points

  • Inputs: state, goal, memory, observations, policies. Outputs: action, state update, learnings, logs.
  • Uses the right tool at the right time and adapts to new information.
  • Scales to complex, multi-step tasks and makes agents reliable in production.
  • Best practices: keep state small, validate tool outputs, add guardrails and human-in-loop.

Why it matters

The decision engine is the heart of an agent — every turn it weighs state, memory and policies to choose the best next step, which is what makes agents dependable rather than random.

Frequently asked questions

How does an agent decide what to do next?
It evaluates its current state against the goal, then chooses among answering, using a tool, recalling memory or asking a human.
What does the decision engine use?
The LLM plus rules and heuristics, informed by state, memory, observations and policies.