# Stanford CS329Z Introduction — What Are Agentic Systems?

## Executive summary

This lecture provides a comprehensive introduction to agentic AI systems, defining them as complex systems built upon Large Language Models (LLMs) that can perceive, reason, plan, and take actions in an environment. The architecture of an agent is detailed, comprising an LLM core, planning/reasoning modules, memory systems (episodic, semantic, procedural), and external tools. The discussion contrasts traditional fixed-step workflows with flexible, self-directing agents, emphasizing that while LLMs show rapid capability improvements, key challenges remain in reliability, safety, and robust evaluation.

## Key takeaways

- Agent Architecture Components: An agent is conceptually composed of an LLM core, planning/reasoning capabilities (e.g., Chain of Thought), memory (episodic, semantic, procedural), tool use, and an environment for action/observation. The system must manage these components in a continuous loop.
- Workflow vs. Agentic Systems: A 'workflow' follows a fixed, predefined sequence of steps (e.g., a script), whereas an 'agent' uses the LLM to autonomously decide the next steps, making it more flexible and responsible.
- The Agent Loop (ReAct): The ReAct framework formalizes the agent loop: the model must cycle through thinking (reasoning), taking an action, observing the result, and then using that observation to inform the next thought, enabling self-correction.
- Key Challenges in Agent Development: Despite impressive capabilities, agents face critical challenges, including reliability (gap between capability and reliability), safety (e.g., unauthorized actions), and privacy (handling sensitive personal information).

## Technical details

- Agent Memory Types: Memory systems are crucial for long-horizon tasks. Types include: Episodic (storing all raw logs/events), Semantic (synthesizing key events into summaries), and Procedural (storing abstract skills or procedures, like in a skill library).
- Tool Use Protocols: Tool use allows agents to interact with external APIs. Early methods included Toolformer, while Gorilla demonstrated training LLMs on a vast set of APIs (over 1,600) to enable complex, factual generation by delegating tasks to external tools.
- Model Context Protocol (MCP): MCP is presented as a standard protocol designed to facilitate scalable connections between diverse AI applications (e.g., IDEs, code editors) and various data sources/tools (e.g., databases, Google Drive).
- Advanced Reasoning Techniques: Techniques like Chain of Thought (CoT) and Reflexion improve reasoning. CoT prompts the model to reason step-by-step, while Reflexion allows the agent to self-reflect on its own trajectory using natural language feedback, significantly reducing errors and hallucination.

## Practical implications

- When designing automated systems, it is critical to determine if a fixed, scripted workflow is sufficient, or if the system requires the flexibility and self-correction capabilities of a true agent.
- Focusing on the three layers—System, Data, and Evaluation—provides a principled approach to debugging and improving agent performance. If an agent fails, the problem may lie in the system architecture, the training data/prompting, or the evaluation metrics.
- For building robust agents, implementing mechanisms for self-reflection and external tool calls (via protocols like MCP) is necessary to mitigate hallucination and improve factual accuracy.

## Topics

Agentic AI, LLM Architecture, System Design, Reasoning and Planning, Memory Systems, Tool Integration, CS329Z: Engineering AI Agents, Stanford Online Agentic AI Course

Source: https://www.youtube.com/watch?v=DGI4vucR71w
