01

What Are AI Agents?

See the difference — click "Run as agent"
LLM Call
Question
Answer
One-shot. Done.
AI Agent
Input
Plan
Act
Observe
→ loops until done

"An agent isn't smarter than an LLM — it's an LLM that can take actions, observe results, and keep going until a job is done."

A traditional LLM call is stateless: you send a prompt, you get a response. Done. An AI agent is different: it can take multiple steps, use tools to interact with external systems, observe what happened, and decide what to do next — all autonomously. Agents are LLMs given a loop, memory, and hands. They can browse the web, write and execute code, send emails, query databases, and chain these actions together.

AI agent: An LLM-powered system that can autonomously execute multi-step tasks by calling tools, observing results, and deciding on next actions without human intervention at each step.
02

The Agent Loop

Step through the loop — run 4 cycles to reach 100%
Perceive
Waiting for input…
Reason
Idle
Act
Idle
Observe
Idle
Goal Progress 0%

"Every agent runs the same basic loop, no matter how complex the task: perceive, reason, act, observe, repeat."

The agent loop is the core operating pattern for all AI agents. Perceive: the agent receives input (user request, tool result, environment state). Reason: the LLM thinks through what to do next (often with chain-of-thought). Act: the agent executes an action — calling a tool, writing output, or terminating. Observe: the result is fed back into context. This loop continues until the task is complete or a stopping condition is met.

Agent loop: The core operational cycle of AI agents: Perceive → Reason → Act → Observe, repeated until the task goal is achieved or a stop condition is triggered.
03

Tool Use

Click a tool to see it in action
🔍
web_search
run_code
📧
send_email
Select a tool above to see the call and response.

"Tools are how AI gets hands — without them, an agent can only think. With them, it can act."

Tool use (also called function calling) lets agents interact with the outside world. A tool has a name, a description (so the LLM knows when to use it), and defined input/output schemas. When the LLM decides to use a tool, it generates a structured tool call; the runtime executes it and returns the result. Common tools: web_search, run_python, read_file, send_email, query_database, call_api.

Tool use / function calling: The mechanism by which AI agents call external functions with structured parameters, receive results, and incorporate them into their reasoning — giving AI the ability to take real-world actions.
04

Multi-step Orchestration

Click a node to learn what it does, then run pipeline
📥
Get Data
⚙️
Process
✍️
Generate
📤
Deliver
Click a node above to see what it does, or run the pipeline.

"Complex AI tasks aren't one big prompt — they're pipelines where each step feeds the next."

Orchestration is about coordinating multiple LLM calls, tool uses, and decision points into a coherent workflow. Simple orchestration: prompt A → result → prompt B. Advanced: parallel steps, conditional branching, retry logic, and human checkpoints. Frameworks like LangChain, LlamaIndex, and Anthropic's agent SDK help manage this complexity. The key insight: break big problems into small, verifiable steps.

Orchestration: Coordinating multiple AI calls, tool invocations, and decision logic into a structured workflow, managing the flow of data and control between steps.
05

Agents vs Simple Prompts

Click a row to toggle who wins that scenario
Simple Prompt
Agent
Click any row to highlight the better choice

"Not everything needs an agent. Reach for a simple prompt first — add an agent only when you need memory, tools, or multiple steps."

Agents are powerful but expensive, slow, and harder to debug. Use a simple prompt when: the task is one step, doesn't need external data, and can be done in a single LLM call. Use an agent when: the task requires multiple steps, needs real-time data or tool use, benefits from iteration and self-correction, or has conditional branches. The biggest mistake in AI engineering is over-agentification — using agents where a well-crafted prompt would work better.

Over-agentification: The common mistake of building AI agents for tasks that could be solved more reliably and cheaply with a single, well-designed prompt and deterministic code.
06

Building Your First Flow

Configure your flow, then build it
1
Trigger
2
AI Action
3
Output

"The best way to learn orchestration is to build one small flow and make it production-ready before adding complexity."

Start with a simple three-step flow: Trigger (something happens) → Process (Claude does something intelligent) → Deliver (result goes somewhere useful). Example: new Slack message → Claude summarizes the thread and identifies action items → sends a structured digest to a Notion database. Use Zapier or Make if you don't code. Use Python + Anthropic SDK if you do. Measure how well it works before adding steps.

AI flow: A minimal viable automation: a trigger, one AI processing step, and one output destination — the simplest unit of useful AI orchestration.
07

Multi-agent Pipelines

Watch specialized agents hand off work
🔍
Research Agent
Searches & collects sources
Waiting
↓ passes sources
✍️
Writing Agent
Synthesizes & drafts content
Waiting
↓ passes draft
Review Agent
Checks errors & citations
Waiting
Pipeline output will appear here after all agents complete.

"One generalist agent trying to do everything is worse than three specialized agents that each do one thing well."

Multi-agent pipelines split complex tasks across specialized agents. A research pipeline might have: Agent 1 (searches the web, collects sources), Agent 2 (reads and synthesizes sources), Agent 3 (writes the final output), Agent 4 (reviews for errors and citations). Each agent is smaller, faster, cheaper, and easier to evaluate than one monolithic agent. Communication between agents can be direct or through shared memory/databases.

Multi-agent pipeline: An orchestration pattern where a complex task is split across multiple specialized AI agents, each handling a distinct subtask, with outputs passed between them.
08

Pitfalls & Fixes

Click each card to reveal the pitfall & fix
⚠️
Pitfall 1 — click to reveal
Infinite Loops
The agent keeps calling tools repeatedly without making real progress toward the goal. Often caused by unclear termination conditions.
Add step limits and goal-checking logic that terminates the loop when no measurable progress is detected.
⚠️
Pitfall 2 — click to reveal
Tool Call Failures
External APIs return errors, rate limits, or timeouts. An unhandled failure crashes the entire agent run.
Add retry logic with exponential backoff and graceful fallbacks for every tool call.
⚠️
Pitfall 3 — click to reveal
Context Overflow
Long-running agents accumulate too much history in the context window, degrading performance or causing errors.
Periodically summarize earlier history and keep only the most recent relevant context in the active window.
⚠️
Pitfall 4 — click to reveal
Hallucinated Tool Calls
The LLM invents tool names or parameters that don't exist, causing runtime failures and confusing error messages.
Enforce strict tool schema validation and only expose the tools the agent actually needs for the task.
⚠️
Pitfall 5 — click to reveal
Cost Runaway
An agent makes far more API calls than expected, racking up unexpected costs — especially with parallel sub-agents.
Set hard budget limits per run, alert on cost spikes, and add circuit breakers that stop runaway loops.

"Every production agent breaks in a way you didn't anticipate. The fix is always: more structure, better tools, tighter evals."

The five most common agent failure modes: (1) Infinite loops — the agent keeps calling tools without making progress. Fix: add step limits and goal-checking. (2) Tool call failures — the API returns an error. Fix: add retry logic and graceful fallbacks. (3) Context overflow — too much history fills the context window. Fix: summarize history periodically. (4) Hallucinated tool calls — the agent invents tools that don't exist. Fix: strict tool schema enforcement. (5) Cost runaway — too many API calls. Fix: budget limits per run.

Agent failure modes: Recurring patterns of agent malfunction — loops, overflows, hallucinations, and cost spirals — each requiring specific architectural safeguards to prevent in production.

You've completed all 6 topics!

You've gone from AI basics all the way to building real agent flows. That's the full picture.

Go back to the homepage