Agents
Agents are tools that run in a loop — how they work, how they change your role, and the art of delegation.
An agent is an AI system that can work toward a goal by repeatedly reasoning, using tools, and updating its plan.
Instead of giving the model one prompt and receiving one answer, you give the agent a task. The agent can inspect files, run commands, make edits, observe failures, and try again.
The agent loop
Most coding agents follow a loop like this:
- Understand the goal.
- Gather context.
- Decide the next action.
- Use a tool or edit a file.
- Observe the result.
- Repeat until the task is done or blocked.
This loop is powerful because the agent can learn from feedback. A failing test is not just an error; it is information for the next step.
Your role changes
With agents, your job shifts from typing every line to directing and verifying work.
You still need engineering judgment. You decide what should be built, what constraints matter, which tradeoffs are acceptable, and whether the result is correct.
The agent can produce code quickly. You are responsible for making sure it is the right code.
Delegation is a skill
Good delegation is specific:
- Define the outcome.
- Name the relevant files or areas.
- State constraints.
- Ask for verification.
- Keep the task small enough to review.
Weak delegation sounds like:
Improve the dashboard.Strong delegation sounds like:
Add an empty state to the billing dashboard when there are no invoices.
Use the existing EmptyState component.
Do not change the invoice API.
Add or update a focused component test.The stronger prompt gives the agent a target and boundaries.
Agents are not autonomous teammates
Agents can do a lot, but they do not own product judgment, production risk, or team conventions unless you give them enough context and review their work.
Treat agents as powerful collaborators that need direction, feedback, and verification.
In the next section, we will apply these fundamentals to coding agents specifically.