What Are AI Agents?
The agent loop, autonomy levels, and when to use agents vs simple prompts
Written by the RadarTrek editorial team · June 2026
An AI agent is a model that can take actions and observe results — repeatedly — until it achieves a goal. The defining characteristic is the loop: perceive state → reason → act → observe new state → repeat. This is fundamentally different from a single prompt-response cycle. Understanding when to use agents and when not to is the first skill of agent engineering.
The agent loop
- Perceive — The agent receives context: the task, current state, available tools, and any results from previous steps.
- Reason — The model decides what to do next: which tool to call, what to compute, whether the task is complete. This reasoning happens in the model's "thinking".
- Act — The model calls a tool or produces output. Tools might be web search, code execution, database queries, API calls, or spawning sub-agents.
- Observe — The tool result is appended to context. The loop repeats with this new information. Loops continue until the agent signals completion or hits a step limit.
Autonomy levels
- Level 0: Single prompt — One input → one output. No tool use, no loops. Appropriate for well-defined transformation tasks.
- Level 1: Tool use (one round) — The model calls one or more tools, gets results, produces final output. Most AI features are here.
- Level 2: Agentic loop (multi-step) — The model runs multiple tool calls in sequence, reasoning between steps. Appropriate for research, code generation with testing, and multi-step workflows.
- Level 3: Multi-agent (hierarchical) — An orchestrator agent delegates to specialist sub-agents. Each sub-agent has its own tools and context. Appropriate for complex, long-horizon tasks.
When NOT to use agents
- When a single prompt is sufficient — If the task has a clear input and a clear output with no need for multiple steps or tool calls, an agent adds complexity without benefit.
- When latency is critical — Each loop iteration adds latency. A 5-step agent with 1 second per step is 5+ seconds. If the user needs an answer in under 2 seconds, use a single prompt.
- When determinism is required — Agents make autonomous decisions. If every step must be predictable and auditable, use structured orchestration code rather than agent reasoning.
- When cost is constrained — Multi-step agents consume tokens at every step — and usually more than linearly, because each step re-sends the growing conversation (the task, earlier tool calls and their results). A 10-step agent can easily cost well over 10x a single prompt. Prompt caching softens this, but calculate before committing.
Start simple — add agent loops only when needed
The best agent systems start as simple prompt chains and graduate to loops only when the problem genuinely requires autonomous decision-making. Premature agentification is the main source of unpredictable, expensive, hard-to-debug AI systems.
Try this
Take a task you are considering building as an agent. Map it as: what is the input, what are the steps, what decisions require AI reasoning vs deterministic code? If fewer than 3 steps require genuine AI reasoning, you probably do not need an agent loop — a prompt chain will do.
Lesson quiz
4 questions. Get 3 right to pass. Passing every lesson quiz unlocks the course certificate.
1. What defines an AI agent?
2. What happens in the “observe” step?
3. When does an agent loop stop?
4. What is Level 0 autonomy?