Skip to content

Chapter 1 of 8

Foundations of AI Agents

An AI agent is an autonomous software system that perceives its environment, reasons about goals, and takes actions without continuous human intervention. Unlike a simple chatbot that merely responds to individual prompts, an AI agent can autonomously plan, use tools, maintain state across interactions, and execute multi-step actions to achieve a higher-level objective. The four core capabilities that distinguish an agent are perception (sensing the environment), reasoning (planning and deciding), action (executing tasks), and learning (improving over time based on experience).

The heartbeat of every agent is the observe-think-act loop, a cycle in which the agent observes its environment, reasons about what to do, acts on that decision, observes the result, and then repeats. This loop is implemented at runtime by an agent executor that receives LLM outputs, executes any tool calls, and feeds results back into the model. The degree to which the agent can make decisions and take actions without requiring human approval at each step is referred to as its autonomy. Grounding, the practice of connecting responses to real-world data sources and verified information, is essential to reducing hallucination and ensuring the agent's outputs are trustworthy.

An agent's cognitive architecture is composed of several key components: an LLM backbone, tool integrations, a memory system, a planning module, an execution engine, and safety guardrails. The agent operates within an action space — the set of all possible actions it can take, including tool calls, API requests, code execution, and text generation. Throughout execution, the agent maintains a working memory area called a scratchpad, where it records intermediate thoughts, observations, and tool results. Compared to a fixed pipeline that always follows the same sequence of steps, an agent dynamically decides what steps to take based on intermediate results, allowing it to adapt to new information as it emerges.

All chapters
  1. 1Foundations of AI Agents
  2. 2Reasoning, Planning, and Tool Use
  3. 3Agent Memory and Knowledge
  4. 4Multi-Agent Systems and Inter-Agent Protocols
  5. 5Frameworks for Building Agents
  6. 6GitHub Copilot and AI Coding Tools
  7. 7Safety, Alignment, and Security
  8. 8Evaluation, Benchmarking, and Production Operations

Drill it

Reading is not remembering. These come from the AI Agents deck:

Q

What is a standalone AI agent?

An autonomous software system that perceives its environment, reasons about goals, and takes actions without continuous human intervention.

Q

What are the four core capabilities of an AI agent?

Perception (sensing environment), Reasoning (planning and deciding), Action (executing tasks), and Learning (improving over time).

Q

What distinguishes an AI agent from a simple chatbot?

An AI agent can autonomously plan, use tools, maintain state across interactions, and take multi-step actions, whereas a chatbot typically only responds to indi...

Q

What is the agent loop (observe-think-act)?

A cycle where the agent observes the environment, thinks/reasons about what to do, acts on that decision, then observes the result and repeats.