AI Agent
A chatbot answers one message at a time. A workflow runs fixed steps that a developer wrote in advance. An agent picks its own next step. Anthropic's engineering guide Building effective agents draws the line this way: workflows orchestrate models and tools through predefined code paths, while agents are systems where the model directs its own process and tool usage.
Under the hood most agents run the same loop. The model reads the goal and the current state, chooses a tool such as a search, a database query or an email draft, reads the result, and decides again. That loop is the idea behind the ReAct pattern, and Qurtoo's article on the plan-and-execute pattern shows a common variation. What makes an agent safe to use is everything around the loop: which tools it can reach, what it may do without asking, and where a person approves its work (human in the loop).
Example
Goal: Find every unpaid invoice older than 60 days and draft a polite reminder for each customer.
Tools you may use: list_invoices(status, older_than_days), get_customer(id), create_email_draft(to, subject, body)
Rules:
- Create drafts only. Never send anything.
- Stop after 25 drafts and report how many invoices remain.
- If a customer has no email address on file, list them at the end instead of guessing one.
When you're done, reply with a table: customer, invoice number, days overdue, draft created (yes or no).When to use it
- The task takes several steps and the next step depends on what the last one found
- The work needs tools: search, files, a CRM, a calendar
- You can limit what the agent is allowed to do and check its results
When not to use it
- The steps are fixed and known in advance; a workflow or a prompt chain is cheaper and easier to test
- One good answer is all you need
- You can't restrict its permissions or review what it did
Articles that use this
- Gemini Spark Skills Are Just Trigger-Condition Prompts: How to Write Always-On Agent Instructions That Don't Go RogueAgentic
- Prompt Architecture for Managed Agent Runtimes: What Changes When You Stop Owning the Orchestration LoopAgentic
- Agent Handoff Protocols: How to Transfer State Between Specialized Agents Without Losing ContextAgentic
- Writing Claude Code Routines That Don't Drift: Prompt Patterns for the New AI Cron JobsDevelopment
- Red Teaming Your AI Agents With Prompt Chains Before Attackers DoSecurity

