← All chapters
Agentic AI Foundations & Architectures
Core building blocks of autonomous AI agents — agent loops, roles, and system shapes.
26 terms
Action SpaceThe action space is the set of all actions an agent is permitted to take at any given step. It typically includes tool calls, sub-agent invocations, and terminal actions such as returning a final answer or requesting human input. Constraining the action space is a key safety lever: a narrower space reduces the surface area for unintended or harmful behavior.Agent EnvironmentThe agent environment encompasses everything external to the model that the agent can observe and affect. It includes file systems, APIs, databases, web browsers, or any other interface through which the agent reads information and commits changes. The environment's state changes as the agent acts, and those changes may be irreversible, which makes careful action selection critical.Agent EvaluationAgent evaluation measures whether an agent reliably achieves its goals across a representative set of tasks and edge cases. Unlike single-call evals, agent evals must account for multi-step behavior: intermediate action quality, tool use correctness, step efficiency, and final outcome accuracy all matter. Trajectory replay, sandbox execution, and LLM-as-judge scoring are common evaluation techniques.Agent HandoffAn agent handoff is the transfer of task control from one agent to another in a multi-agent pipeline. The handing-off agent packages the current task context, completed work, and remaining objectives into a structured message that the receiving agent can pick up without loss of continuity. Clean handoffs require well-defined interface contracts so the receiving agent does not need to re-derive context from scratch.Agent LoopThe agent loop is the repeating cycle an agent runs: it reads the current context, decides on the next action (often a tool call or a message), executes that action, and feeds the observation back into context. The loop continues until a stopping condition is met, such as reaching the goal, exhausting a step budget, or hitting a guardrail.Agent MemoryAgent memory covers the mechanisms by which an agent retains and retrieves information across turns and sessions. In-context memory lives in the active prompt window and is lost when the context resets. External memory stores facts in a vector database or key-value store that the agent can query as needed. The choice of memory architecture affects recall accuracy, latency, and the agent's ability to maintain long-horizon coherence.Agent ObservabilityAgent observability refers to the tooling and practices that give operators visibility into an agent's runtime behavior — including which tools were called, what arguments were used, how long each step took, and where errors occurred. Good observability surfaces structured traces, logs, and metrics so engineers can diagnose failures, audit decisions, and optimize performance without rerunning the entire task from scratch.Agent PersonaAn agent persona is the identity, tone, and behavioral constraints assigned to an agent through its system prompt. Personas establish how the agent introduces itself, what communication style it adopts, and what boundaries it respects. In multi-agent systems, distinct personas help differentiate agents by function — for example, a cautious reviewer versus an exploratory researcher — and can improve task specialization.Agent RuntimeThe agent runtime is the infrastructure layer that hosts and drives the agent loop. It manages prompt assembly, tool dispatch, state persistence, retry logic, and stopping conditions. The runtime sits between the raw language model API and the rest of the system, translating model outputs into real function calls and feeding observations back into the next prompt turn.Agent SandboxAn agent sandbox is an isolated execution environment that confines what an agent's tools can touch — restricting filesystem, network, and secret access to an allowed boundary. Even if the agent generates malicious or buggy code, the sandbox prevents it from reaching sensitive host resources. Sandboxing is a foundational containment control for agents that run code or interact with untrusted inputs.Agent StateAgent state is the information the agent carries across loop iterations to maintain continuity. It can include the conversation history, scratchpad notes, tool outputs, task status, and any accumulated facts. Because language models are stateless by default, the runtime must explicitly serialize and inject state into each prompt so the agent can reason coherently across many steps.Agent TrajectoryAn agent trajectory is the complete sequence of states, actions, and observations that an agent produces while working toward a goal. Capturing trajectories is essential for debugging, evaluation, and training: they reveal exactly which steps the agent took, where it diverged from the expected path, and whether its reasoning was coherent at each decision point.Agentic RAGAgentic RAG extends basic retrieval-augmented generation by giving an agent control over when, what, and how to retrieve information. Rather than a single retrieval step before generation, the agent can issue multiple targeted queries, evaluate retrieved passages, decide whether more retrieval is needed, and synthesize across multiple sources across many loop iterations — making retrieval an active, iterative part of reasoning rather than a one-shot lookup.Agentic WorkflowAn agentic workflow is a pipeline in which one or more AI agents, rather than hard-coded logic, drive the sequencing and execution of steps toward a goal. The workflow may include planning, tool use, branching on observations, and self-correction. Compared to a fixed automation, an agentic workflow can adapt dynamically to unexpected intermediate results without requiring explicit rule authoring for every scenario.AI AgentAn AI agent is a system that pursues a goal by repeatedly deciding on actions, executing them through tools or the environment, and observing the results to inform its next step. Unlike a single model call, an agent runs a loop — perceive, decide, act — and maintains enough state to make progress across many steps toward an objective.Autonomy LevelAutonomy level describes how much independent decision-making authority an agent has before a human must review or approve its actions. A fully automated agent acts end-to-end without human approval; lower autonomy levels insert checkpoints where a human confirms plans, approves high-risk tool calls, or validates intermediate outputs before the agent proceeds.Deterministic vs Non-Deterministic Agent BehaviorA deterministic agent produces the same sequence of actions given the same inputs and state, making it reproducible and easier to test. A non-deterministic agent — which arises from sampling-based language model inference — may take different paths on identical inputs. Production systems often reduce temperature or use structured outputs to increase determinism while accepting that some variability is unavoidable with generative models.Dry-Run ModeDry-run mode lets an agent plan and log the actions it intends to take while suppressing execution of any side-effecting tools. Operators can review the proposed trajectory — the sequence of tool calls and arguments — before enabling live execution. This containment technique is valuable during development and rollout, surfacing unsafe or incorrect behavior without risking real-world consequences like sent emails or deleted files.Guardrailed AgentA guardrailed agent operates under a set of enforced constraints that prevent it from taking harmful, out-of-scope, or policy-violating actions. Guardrails can be implemented at the prompt level, in the runtime as action filters, or as a separate validation model that reviews proposed actions before execution. Unlike soft instructions, effective guardrails reject or flag disallowed actions regardless of what the reasoning trace requests.Human-in-the-LoopHuman-in-the-loop refers to design patterns where a human operator is inserted into an otherwise automated agent pipeline at defined checkpoints. The human may review proposed actions, approve sensitive tool calls, resolve ambiguities, or correct errors before the agent continues. HITL trades throughput for safety and is essential in high-stakes deployments where unchecked autonomous action carries significant risk.Least-Privilege AgentA least-privilege agent is granted only the minimum tool permissions and data access required for its current task, and nothing more. By narrowing the action space, this design limits the blast radius if the agent is compromised, confused, or manipulated by a prompt injection. Permissions are scoped per task rather than granted broadly, so a misbehaving agent cannot reach resources outside its intended boundary.Orchestration vs Single-AgentA single-agent architecture uses one model instance to reason, plan, and act across all subtasks. An orchestrated architecture uses a coordinating agent to decompose tasks and delegate work to specialized sub-agents. Orchestration enables parallelism and specialization but introduces coordination overhead, failure propagation risks, and more complex debugging. The right choice depends on task complexity and latency requirements.ReAct AgentA ReAct agent interleaves explicit reasoning traces with concrete actions in a single generation pass. The model writes a thought explaining its current reasoning, then emits an action to execute, then observes the result — all as natural-language text. This thought-action-observation pattern makes the agent's decision process transparent and often improves performance on multi-step tasks.Self-Healing AgentA self-healing agent detects when a tool call or step has failed and attempts recovery on its own — retrying with adjusted arguments, choosing an alternative tool, or replanning around the obstacle. Rather than halting on the first error, it treats failures as feedback within the agent loop. This resilience improves task completion rates but must be bounded by a step budget to avoid endless retry loops.Step BudgetA step budget is a hard upper limit on the number of loop iterations or tool calls an agent is allowed to make during a single task run. It prevents runaway loops from consuming unbounded compute or accumulating costs. When the budget is exhausted, the runtime typically returns the best answer found so far or raises an error signaling that the task could not be completed within the allowed steps.Tool-Calling AgentA tool-calling agent is an AI agent that extends a language model's capabilities by invoking external functions — such as web search, code execution, or database queries — and incorporating the results into its reasoning. The model emits a structured tool-call request, a runtime executes the function, and the returned observation is appended to context before the model continues.