# The model plans the steps

Ask "which PRs are blocked?" and the agent lists open PRs, notices two are old, and fetches their reviews. You never wrote that sequence.

AI developers · Part 04: Agents · Card 6 of 11 · Last updated 2026-10-13

## Analogy

You wrote the endpoints; the agent wrote the client code on the fly.

## In an agent

That runtime planning is exactly what separates an agent from a workflow.

## Practice

### Flashcards

- **Interview: what is an AI agent?** An LLM in a loop with tools. It picks the next tool at runtime from the results so far, until the goal is met.

### Interview questions

**What is an AI agent?**

- An LLM running in a loop with access to tools.
- It decides at runtime which tool to call, looks at the result, and continues until the goal is met.
- Example: DevPilot lists open PRs on its own, then fetches reviews only for the stale ones.

## Questions people ask

### What does it mean that the model plans the steps?

You give the agent a goal and tools, not a sequence. Asked which pull requests are blocked, it might list open PRs, notice two are old, and fetch reviews only for those. You never wrote that order. The model chose it at runtime from what it saw, which is what makes it an agent.

### How do I control an agent if the model chooses the steps?

You control the boundaries, not the sequence. Decide which tools it may use, write precise tool descriptions and a clear system prompt, validate every argument, set a step limit, and require approval for risky actions. Then watch traces and evals to see what paths it actually takes.

## Related concepts

- [Agent](https://studyvisually.com/learn/tech/ai-developers/agents/agent)
- [The agent loop](https://studyvisually.com/learn/tech/ai-developers/agents/agent-loop)
- [Stop conditions](https://studyvisually.com/learn/tech/ai-developers/agents/stop-conditions)
- [Agent vs workflow](https://studyvisually.com/learn/tech/ai-developers/agents/agent-vs-workflow)

Web page: https://studyvisually.com/learn/tech/ai-developers/agents/model-plans-the-steps
Study this card in the app: https://studyvisually.com/app/learn?category=ai-developers&card=model-plans-the-steps
