Agent questions test whether you'd trust a model with real actions, and how you'd limit it.
An agent is a loop: the model picks an action, your code runs it, and the result goes back. It repeats until it answers or you stop it.
If you can write the steps down in advance, use a plain workflow. It's cheaper and easier to test.
Safety lives in code: allow lists, step and cost limits, approval for writes, idempotency keys, and traces.
- What is an agent, in one sentence?
- A loop in which a model chooses actions, your code runs them, and the results go back to the model.
- When should you use a workflow instead?
- When you can write the steps down in advance.
- Name four stop conditions.
- A step limit, a repeat limit, a time limit and a cost limit.
- Why give write tools an idempotency key?
- A retry after a network failure shouldn't perform the action twice.
- What should a tool failure do?
- Return an error the model can read, so it can try another way or tell the user.
- Where does 'never refund over $100' belong?
- In the tool's code. A rule in the prompt can be talked around.