Skip to content
Start ReadingGitHub
Section overviewPass 1: Agent Foundations

Agent foundations

Define agentic systems by observable behavior and system structure, not by product labels.

Pass 1: Agent Foundations · 5 published chapters

Follow the chapters in order. Each one combines a clear explanation, local illustrations, traceable sources, and runnable examples where code helps.

Prerequisites

Prerequisites.

Learning outcomes

The reader can define an agent, trace a perception-decision-action loop, distinguish deterministic workflows from model-directed agents, identify autonomy levels, and state termination conditions.

Define model, agent, environment, observation, action, goal, and policy. Build a manual loop. Distinguish its internal perceive-decide-act cycle from the external operating workflow sometimes called loop engineering. Compare fixed and model-selected paths. Add autonomy levels, feedback, errors, budgets, and stop conditions.

Chapter 1 Main path

What is an agent

Defines an agent as an autonomous software system combining a reasoning model with tools, environment observations, and goal-directed control loops.

Key Topics:
  • Distinguish a standalone language model from a complete agent system.
  • Identify the core components of an agent: model, environment, goal, policy, actions, and observations.
  • Differentiate between rigid deterministic workflows and model-directed autonomous agent loops.
Chapter 2 Main path

The agent loop

Explains the internal mechanics of the agent execution loop, detailing how models perceive environment feedback, decide actions, and execute tools across iterative turns.

Key Topics:
  • Trace the step-by-step lifecycle of a single turn in an agent execution loop.
  • Differentiate between the inner reasoning cycle and outer runtime wrappers.
  • Implement a framework-free agent loop with step budgets, schema validation, and error recovery.
Chapter 3 Main path

Workflows versus agents

Compares deterministic code-orchestrated workflows with model-directed autonomous agents, establishing clear criteria for when each architectural pattern should be used.

Key Topics:
  • Classify an AI system as a prompt chain, routing workflow, parallel pipeline, or autonomous agent.
  • Select between workflows and agents based on predictability, latency, cost, and task ambiguity.
  • Analyze the security and operational trade-offs of giving models control over execution paths.
Chapter 4 Main path

Goals, policies, environments, and autonomy

Details how agent goals, operational policies, environment characteristics, and autonomy levels interact to govern agent behavior and safety.

Key Topics:
  • Define agent goals and differentiate declarative end-states from procedural instructions.
  • Construct deterministic policies and guardrails that restrict tool capabilities.
  • Classify software environments by observability, determinism, dynamism, and continuity.
Chapter 5 Main path

Run lifecycle and termination

Defines the complete lifecycle of an agent run from initialization to termination, detailing execution states, pause mechanisms, and multi-layered stopping conditions.

Key Topics:
  • Map the state transitions of an agent run across initialization, execution, suspension, and termination.
  • Implement layered stopping criteria including step limits, token budgets, and stuck-loop detection.
  • Manage asynchronous pauses, human-in-the-loop approvals, and clean resource teardown.

Security & Threat Model Connections (Pass 2 Preview)

Section titled “Security & Threat Model Connections (Pass 2 Preview)”

Link the security preview to threat modeling and end-to-end goal, action, and termination risks.