The 3 Layers of AI: From Chatbots to Agents
Understand the evolution from standard Generative AI to Code Agents and fully autonomous Agentic AI.
The Journey to Autonomy
As you progress through this curriculum, you will build increasingly complex AI. A common interview question is to differentiate the three "Layers" of AI architecture. Understanding this early helps you know exactly what you are building.
The 3 Layers of AI Capabilities
Layer 1: Generative AI
This is what ChatGPT was at launch. The model is literally just an autocomplete engine predicting the next token over and over until the output is finished.
- Characteristics: Stateless, static, and straightforward.
- How it works: You inject a prompt, it generates text, code, or images. It has absolutely no memory aside from the exact words you fed into its current "Context Window".
- Analogy: A brilliant writer locked in a room who can only write an essay based exactly and entirely on the prompt you slip under the door.
Layer 2: Code Agents
Eventually, engineers realized: what if the AI could run the code it writes? What if it could browse the internet and read the results?
- Characteristics: Environment-aware, dynamic iteration.
- How it works: The AI sits inside a ReAct Loop (Reason -> Act -> Observe). It is given a "Scratchpad" (working memory) and access to APIs or Code Execution environments (like Docker). Instead of just answering purely from its brain, it can write a Python script, execute it, read the error log in the terminal, rewrite the script, and run it again.
- Analogy: The writer in the room is now given a laptop with Python and Google. If they don't know an answer, they search for it first, then write the essay.
Layer 3: Agentic AI (Multi-Agent Systems)
Why stop at one generalized agent? AI Engineering has moved toward creating full autonomous organizations of specialized agents.
- Characteristics: Goal-driven, asynchronous, highly autonomous.
- How it works: Instead of one solitary loop, this is a hierarchical network of multiple specialized agents. You have an Orchestrator that takes a complex goal and decomposes it. It assigns work to specific Executors, whose output is directly scrutinized by Critics. They all share long-term context via a Persistent Memory DB (Vector/Graph databases).
- Analogy: The room is now an entire engineering firm. There is a Senior Product Manager outlining features, a Junior Developer writing code, a QA Engineer reviewing the pull requests, and a permanent file cabinet retaining knowledge of all past projects. They run parallel workflows until the overarching goal is met.
Use Cases
Common Mistakes
Interview Insight
Relevance
High - System Design interviews increasingly require distinguishing between standard LLM wrappers, ReAct agents, and Multi-Agent DAGs.