Section 1.5 · How Agents Decide What To Do Next
The observe → decide → act → learn loop.

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
- 1Look at the current state: goal, memory, observations, tool results, policies, constraints.
- 2Decide via a loop: is the goal complete? need info? need a tool? need memory? need a human?
- 3The decision engine (LLM + rules + heuristics) picks the next action.
- 4Act, update the state, and loop again.
- 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.
More in Agent Brain Deep-Dive
Section 1 · Inside the Agent Brain
How AI agents break down complex problems.
Section 2 · Reasoning Patterns
ReAct, Plan-Execute, Reflection, Tree-of-Thoughts, Self-Consistency.
Section 3 · Planning Graphs Instead of Prompts
Stateful graphs that plan, decide and act.
Section 4 · Memory in AI Agents
Working, long-term, semantic and episodic memory.
Section 5 · Reasoning Engine
Think, observe, reflect and refine until confident.