Move beyond single-turn generation. Learn how agents choose tools, maintain state, plan steps, recover from errors and operate within bounded permissions.
Complete 12 of 24 practices (50%) and enter your name to unlock the Certificate of Participation.
An agent uses a model inside a loop that observes state, chooses actions or tools, receives results and decides what to do next.
The difference from a chatbot is not personality; it is controlled action over multiple steps.
while not done:
action = decide(state)
state = act(action, state)Use agents when the task genuinely benefits from iterative tool use or multi-step decisions.
Tools let agents read data, call APIs, search, calculate or create side effects. Their contracts should be explicit and narrow.
The tool boundary is where model suggestions become real system actions.
tool = {'name':'get_order','args_schema':OrderQuery}Treat tool calls as structured API requests that require validation.
Agents repeatedly inspect the current state, choose the next step, execute it and incorporate the result.
Reliability comes from a disciplined loop with explicit stop conditions, not endless reasoning.
for step in range(MAX_STEPS):
action = policy(state)
if action == 'done': breakEvery agent needs step, time or cost limits plus a clear stop condition.
Agents need working state: current goal, completed steps, tool results, constraints and sometimes durable memory.
Not every past message belongs in active state; keep only what the next decision needs.
state = {'goal':goal,'facts':{},'completed':[]}State should be explicit, minimal and inspectable enough to debug decisions.
Agents perform better when tools expose precise inputs, outputs, allowed values and errors.
Ambiguous tools create ambiguous actions.
def schedule(date:str, attendee_id:str)->Result: ...A well-designed tool looks like a reliable API contract, not free-form text.
Tools can timeout, return partial data or reject requests. Agents need bounded retries, fallback paths and escalation rules.
Retrying the same failing action forever is not recovery.
for attempt in range(3):
try: return tool()
except Timeout: backoff()Recovery policy should be explicit and observable.
Agents should pause for confirmation when actions are expensive, irreversible, sensitive or uncertain.
The best approval point is before the side effect.
proposal = agent.propose()
approve(proposal)
execute(proposal)Human approval is a control boundary, not an after-the-fact notification.
Production agents need traces, tool-call logs, budgets, evals, guardrails and clear ownership.
If you cannot reconstruct why an agent acted, you cannot operate it safely.
trace(step, tool, args, result, latency)
assert cost < budgetOperate agents like production systems, not autonomous black boxes.
Open each item after answering it in your own words.
An agent is a bounded action loop, not merely a conversational tone.
Use explicit schemas and least privilege for agent tools.
Use bounded loops with explicit stopping criteria.
Keep agent state structured and limited to what drives decisions.
Define narrow typed tool contracts and structured results.
| Layer | Purpose |
|---|---|
| What Makes an Agent an Agent? | An agent is a bounded action loop, not merely a conversational tone. |
| Tools as Controlled Capabilities | Use explicit schemas and least privilege for agent tools. |
| The Agent Loop: Observe, Decide, Act | Use bounded loops with explicit stopping criteria. |
| State and Memory | Keep agent state structured and limited to what drives decisions. |
| Tool Schemas and Reliable Interfaces | Define narrow typed tool contracts and structured results. |
| Failure Recovery and Retries | Use bounded retries and distinct fallback or escalation behavior. |
| Human-in-the-Loop Agents | Pause high-impact actions before execution and require approval. |
| Production Agent Operations | Trace, evaluate and bound agent behavior in production. |
Complete at least 12 of the 24 practice cases (50%) and enter your name.
Agentic systems can create side effects. Constrain tools, permissions, budgets and stopping conditions, and evaluate task success plus failure recovery.