AI agents
Building systems where models plan and call tools in a loop to complete tasks.
Bookmark
Bookmarks are kept in your free account, so you can find this page again on any device.
Sign in to bookmarkOn this page
Overview
An agent is a model running in a loop: it reads the task and context, decides on an action, calls a tool, looks at the result and repeats until it is done or hits a limit. Coding agents, research agents and support agents all follow this pattern.
Building agents well is mostly about the environment you give the model: a small set of well-described tools, clear instructions, a way to check its own work (tests, validators), sensible limits on steps and spend, and human approval for risky actions. Start with the simplest design that works, often a fixed workflow with one or two model calls, and add autonomy only where it pays off.
What you will practise
- Implement a basic tool-calling loop with step and cost limits
- Give an agent a way to check its own work
- Require human approval for risky actions
- Choose a fixed workflow over an agent when the steps are known
Learning paths
- Agents and MCP
An AI agents and MCP course for developers: build a tool-using agent with a clear stop condition, then expose your own data and actions with an MCP server.
- MCP in production
An MCP course for production use: connect clients, build and test servers for a team, secure remote servers and keep up with changes to the MCP specification.
- Production AI agents: approval, multi-agent and evals
For engineers moving past single-agent demos: add code-level approval gates, context isolation, multi-agent patterns and automated evals you can trust in CI.
Tutorials
- Build a voice agent you can talk to
Stream your microphone to a realtime speech model, call a tool mid-conversation, measure latency and let the user interrupt it.
- Build an agent with the Claude Agent SDK
Built-in tools, a custom tool, a permission callback, a subagent and a project skill, tested before you spend tokens.
- Connect two agents with the A2A protocol
Publish an agent card, send a task from one local agent to another with the official Python SDK, and see where MCP fits.
- Design tools an AI agent can use well
Take one badly designed agent tool, fix its names, descriptions, arguments, errors and output size, and measure the difference with a small eval you can rerun.
- Make an agent survive crashes and restarts with durable execution
Build a durable AI agent with Temporal in Python: tool calls as activities, a worker you kill mid-run that resumes, retries and human approval as a signal.
- Run AI-generated code in a sandbox
Run model-written Python in a throwaway Docker container, then in an E2B sandbox, with time, memory, network and file limits, and a test suite of hostile code.
- Add human approval to agent actions
Pause risky tool calls, show the exact arguments, resume on approve or reject, then log and test it.
- Evaluate AI agents: outcomes, trajectories and tool use
Build an agent eval harness that checks the final state, the tool-call trajectory and a judged transcript, run each task several times and read the traces.
- Trace an agent with OpenTelemetry
Instrument an agent loop with OpenTelemetry GenAI spans, one per model call and tool call, and send the traces to Langfuse or Arize Phoenix.
- Build your first agent in Python
Three tools, a hard turn limit, a clear stop condition and a log of every tool call it makes.
- Build your first agent in TypeScript
Tools that search and read notes, a step limit, a clear stop condition and logged steps.
- Prompt injection basics for builders
How direct and indirect prompt injection work, why agents with tools raise the stakes, and the design choices that limit the damage when no complete fix exists.
Workflow recipes
- Schedule a recurring task for a coding agent
Schedule Claude Code tasks and Codex runs: write a self-contained prompt, cut connectors and network to the minimum, test with Run now, and know how to stop it.
Articles
- AI browsers and agent mode: what they can do and how to use them safely
What AI browsers such as Comet, Gemini in Chrome and Claude in Chrome can reach, why prompt injection is still open, and a setup that limits the damage.
- What is OpenClaw, and should you let it run your computer?
OpenClaw is an open-source personal AI agent you message from chat apps. What it can reach, why ClawHub skills are the big risk, and a safer way to try it.
- Multi-agent systems: when one agent is not enough
Orchestrator-workers, subagents and handoffs compared on context, cost and failure modes.
- Agent frameworks compared: Claude Agent SDK, OpenAI Agents SDK, LangGraph, Pydantic AI, Mastra, Google ADK
Six agent frameworks on one fixed table: language, durable execution, tracing, MCP support and lock-in, with notes on which kind of project each one fits.
- Agent observability: what to log and why
What to record for AI agents in production: traces and spans, tool calls, cost per task and the signals that catch failures before users report them.
- Context rot: why long contexts fail and what to do
Why models get worse as their context fills up, from lost-in-the-middle to distractors and poisoned context, and the practical fixes for agents and RAG.
- What is an AI agent? A plain explanation
An AI agent is a language model that uses tools in a loop until a task is done. What that means in practice, what agents are good at and where they go wrong.
- Workflows vs agents: start with the simplest thing that works
Most LLM features should be a fixed workflow, not an agent. How to tell which one you need, when an agent earns its cost, and the useful patterns in between.
Tools for this skill
9 of 33 tools tagged with this skill.
A2A (Agent2Agent protocol)
Open protocol for agents on different systems to share tasks.
Agent Development Kit (ADK)
Google's code-first framework for building, evaluating and deploying agents.
Agno
Python framework for agents, teams and workflows, served as APIs with AgentOS.
AI SDK
TypeScript toolkit for streaming, tool calls and agents across model providers.
Amazon Bedrock
AWS service for foundation models, RAG and agents.
Browser Use
Open-source library and cloud service for AI agents that operate websites.
Claude Agent SDK
Build agents on the same harness that powers Claude Code.
CrewAI
Python framework for role-based teams of agents, with a paid platform for running them.
Deep Agents
LangChain harness with planning, files and subagents.
Key terms
Words you will meet while learning this, defined in the glossary.
- Agent
A system where a model decides which actions or tools to use, in a loop, until a goal or stop condition is met, rather than following fixed steps.
- Agent harness
The software around a model that turns it into an agent: the loop, tools, prompts, context management, permissions and limits.
- Agent loop
The repeating cycle of model call, tool call, observation and next decision that drives an agent until the task is done or a limit is hit.
- Agentic workflow
A mostly predefined sequence of LLM calls and tool steps, where the developer fixes the path and the model fills in each step.
- Parallelisation (agent pattern)
A workflow pattern that runs several model calls at once, on parts or copies of one task, and combines their outputs in code.
- ReAct
A prompting pattern where a model alternates between writing out its reasoning and taking an action, then reads the observation before the next step.
- Routing (agent pattern)
A workflow pattern where a first step classifies the input and sends it on to a specialised prompt, tool or model for that type.