AI Agent
An AI agent is a model-centered system that selects and executes actions in a feedback loop to pursue a goal within defined tools, permissions, and stopping conditions.
Download Markdown (.md)Soroush’s Product Wiki · https://wiki.soroush.uk/topic/ai-agent/
01What it means
An AI agent combines a model with instructions, state, tools, and an execution loop. The model observes context, chooses a next action, receives results from the environment, and continues until it finishes, fails, or reaches a stopping condition. This model-directed control distinguishes an agent from a fixed workflow whose steps are determined in code, though products often combine both.[1][2]
- 01ObserveGoal, state, tool results
- 02ChooseModel proposes next action
- 03ValidatePolicy, schema, permission, risk
- 04ActControlled tool execution
- 05EvaluateFinish, fail, stop, or continue
Budgets, stopping conditions, confirmations, and independent final-state verification bound the loop.
02Why it matters
Agents can handle open-ended tasks whose exact steps are hard to predefine, but model-directed action compounds errors and increases cost, latency, and security exposure. Product design must make scope, progress, permission, review, recovery, and accountability legible.
03When to use it
Use an agent when tasks are multi-step, outcomes are verifiable, tools can be tightly scoped, and flexibility adds measured value over a fixed workflow. Prefer deterministic orchestration for predictable processes, especially when actions are high impact or errors cannot be reversed.
04How it works
- Define the goal, success evidence, environment, allowed actions, budget, and stopping conditions.
- Expose narrow, well-described tools with least privilege, typed inputs, and deterministic validation.
- Let the model choose an action, then execute it in a controlled environment and return the observation.
- Apply checkpoints, confirmation, monitoring, and limits based on action risk and uncertainty.
- Verify the final state independently, record the trace, and support cancellation, rollback, and incident review.
05A practical example
A support agent investigates a delivery issue by reading an order and carrier status, then proposes a remedy. It may issue only low-value credits within policy; address changes and refunds require customer confirmation and deterministic authorization, and every tool call appears in an audit trail.
06Where it breaks
Errors can compound across steps, and success may be hard to observe. Agents consume more time and compute than single calls, can be manipulated through tool results or external content, and may act beyond user expectations. Human checkpoints can become rubber stamps.
Common mistakes
- Calling a fixed prompt or chatbot an agent without a model-directed action loop.
- Giving broad tools or credentials because the model is expected to follow instructions.
- Using autonomy where a short deterministic workflow would be easier to test and trust.
- Showing a completion message without independently checking the environment's final state.
07Sources
- Building Effective AgentsAnthropic · Official engineering guidanceBuilding Effective Agents
- ReAct: Synergizing Reasoning and Acting in Language ModelsInternational Conference on Learning Representations · Peer-reviewed researchReAct: Synergizing Reasoning and Acting in Language Models