AI agent engineering, explained
Short, plain-English explainers of the core ideas behind building AI agents. Start here, then learn them hands-on — level by level — in Way of the Agent.
- Agent architectureThe tool-use loopThe tool-use loop is the core cycle an AI agent runs: the model decides on an action, a tool executes it, the result is fed back, and the model decides again — repeating until the task is done.
- PromptingSystem promptA system prompt is the standing instruction given to an AI model before the conversation starts — it sets the model’s role, rules, tone, and the tools and constraints it must follow.
- Model fundamentalsContext windowThe context window is the maximum amount of text — measured in tokens — that a model can consider at once, covering the system prompt, the conversation so far, tool results, and the reply it is generating.
- Knowledge & memoryRetrieval-augmented generation (RAG)Retrieval-augmented generation (RAG) is a pattern where relevant documents are fetched from an external store at query time and inserted into the prompt, so the model answers from that fresh, specific material rather than from memory alone.
- Agent architectureFunction callingFunction calling (also called tool calling) is the mechanism by which a model requests a specific, defined function with structured arguments instead of replying in prose — the bridge that lets an agent actually do things.
- SafetyPrompt injectionPrompt injection is an attack where malicious instructions hidden in content the model reads — a web page, a file, a tool result — try to override the agent’s real instructions and make it act against the user.
- Agent architectureThe ReAct patternReAct (Reason + Act) is an agent pattern where the model interleaves explicit reasoning with tool actions — thinking about what to do, acting, observing the result, then thinking again.
- Tooling & interoperabilityModel Context Protocol (MCP)The Model Context Protocol (MCP) is an open standard for connecting AI agents to external tools and data through a common interface, so any compliant client can use any compliant server.
- Knowledge & memoryAgent memoryAgent memory is how an agent retains information beyond a single context window — from short-term working state within a task to long-term stores it can search and reuse across sessions.
- EvaluationEvals for AI agentsEvals are systematic tests that measure how well an AI agent performs a task — a test suite for non-deterministic systems, used to catch regressions and compare changes.
- Model fundamentalsHallucinationA hallucination is when a model states something false or fabricated with confidence — inventing facts, sources, or details that were never in its input or true in that form.
- Knowledge & memoryEmbeddingsAn embedding is a numeric vector that represents the meaning of a piece of text or image, positioned so that similar meanings sit close together — the mechanism behind semantic search and retrieval.