An elder and a child weaving golden threads together — the image of the Advanced path
The Advanced Path · Artesian University
AdvancedLesson 03 · The Architecture Beneath Every ConversationArticle16 min

The Fivefold Stack

Every AI interaction — from the simplest question to the most complex multi-agent system — runs on the same five layers. This lesson names them, maps them, and asks where the values live.

The stack is not just how AI works. It is where the decisions get made.

What you are actually talking to

When you open a conversation with an AI — any AI — you are not talking to a single thing.

You are talking to a system. A layered architecture of components that each play a distinct role in what happens between your words and the response that comes back. Most people never see these layers. They experience only the surface — the words, the tone, the apparent understanding. The layers beneath are invisible.

This invisibility is by design. A good interface hides its complexity. But for builders — and for anyone who wants to understand what they are actually working with — the invisibility is a problem. Because the layers are where the decisions get made. The values are not in the words. They are in the architecture that produces the words.

The Fivefold Stack is a map of those layers. Not a technical specification — there are many of those, and they change constantly as the field evolves. A map. A way of seeing what is there, so that when you build, or when you evaluate, or when you simply want to understand what happened in a conversation that surprised you, you have a place to look.

Five layers. Each one building on the last. Each one a place where something important gets decided.

Let us name them.

Layer One: The Model

At the foundation of every AI interaction is the model — the trained neural network that has learned, from an enormous amount of human-generated text, how language works. How ideas connect. How questions tend to be answered. How stories tend to go.

The model is not a database. It does not look things up. It generates — it predicts, with extraordinary sophistication, what words are likely to come next given the words that came before. This is a profound and strange capability. It means the model can write poetry, explain physics, draft legal arguments, and hold a conversation — not because it has been told what to say in each case, but because it has internalized the patterns of how humans say things.

The model is also where the deepest biases live. The patterns it learned came from human text — which means they carry human assumptions, human blindspots, human prejudices. These are not always visible. They surface in subtle ways: in what the model treats as normal, in what it reaches for first, in what it finds easy to say and what it finds difficult.

For builders, Layer One is the foundation you inherit. You did not train it. You cannot easily change it. But you can understand it — and understanding it is the first step toward working with it wisely rather than simply accepting what it produces.

The model is the river. Everything else is how you navigate it.

Layer Two: The Context

The model does not know who you are. It does not remember your last conversation. It does not know what platform you are using, what your name is, or what you are trying to accomplish.

All of that lives in Layer Two: the context.

Context is everything that gets fed to the model before your words arrive. The system prompt — the instructions that tell the model how to behave, what role to play, what to prioritize, what to avoid. The conversation history — the record of what has been said so far in this session. Any additional information the system has decided to include — documents, data, user profile details, platform-specific rules.

Context is where builders have the most direct influence. You cannot change the model. But you can change what the model is told before it responds to your user. You can give it a persona. You can give it values. You can give it constraints. You can give it knowledge it would not otherwise have.

This is both a tremendous power and a tremendous responsibility.

The system prompt is not neutral. Every word in it is a decision about how the AI will behave — what it will prioritize, how it will handle ambiguity, what it will say when it doesn't know. Most users never see the system prompt. They experience only its effects.

For builders: the context is your primary canvas. It is where the Lioness Protocol lives. It is where your values get encoded. It is where the character of your system gets defined.

Write it with care. It shapes everything downstream.

Layer Three: The Memory

Here is something that surprises most people when they first understand it: the model, by default, has no memory.

Every conversation starts fresh. The model does not remember what you said yesterday, or last week, or five minutes ago in a different session. The conversation history in Layer Two gives it the memory of this conversation — but only this one, and only as far back as the context window allows.

Layer Three is the memory architecture that extends beyond the default. The systems that store information across sessions. The databases that hold what a user has said before, what they have asked, what they have built. The retrieval mechanisms that pull relevant past context into the present conversation when it is needed.

Memory is where continuity lives. And continuity is where relationship lives.

Without memory, every interaction is a first meeting. The AI cannot learn your preferences, cannot build on previous conversations, cannot hold the thread of a long project across multiple sessions. With memory, something different becomes possible — a partnership that accumulates, that deepens, that knows you in the way that a good colleague knows you.

But memory also raises the most serious questions in the stack. What is stored? For how long? Who has access to it? Can it be corrected? Can it be deleted? What happens when the memory is wrong — when it has learned something about you that is no longer true, or was never true?

These are not hypothetical questions. They are design decisions that every builder who works with memory must make. And they are decisions that will shape whether the people who use your system feel known — or surveilled.

Memory is the layer where trust is built or broken. Build it with that in mind.

Layer Four: The Tools

The model, on its own, can only generate text. It cannot search the web. It cannot run code. It cannot check a calendar, send an email, query a database, or take any action in the world beyond producing words.

Layer Four is what changes that.

Tools are the capabilities that extend the model beyond language generation into action. A web search tool. A code execution environment. A calendar API. A database query interface. A file system. The ability to call other AI models, or to spawn sub-agents that can work in parallel on different parts of a problem.

This is the layer that makes AI genuinely useful for complex, real-world tasks. And it is the layer that introduces the most significant new risks.

When an AI can only generate text, the worst it can do is say something harmful. When an AI has tools — when it can take actions in the world — the stakes are different. A mistake is not just a wrong word. It is a sent email, a deleted file, a transaction executed, a system modified.

The principle that governs Layer Four is one you will encounter throughout the Advanced path: minimum necessary authority. Give the AI only the tools it needs for the task at hand. Not all the tools you have. Not the most powerful tools available. The minimum necessary.

This is not timidity. It is precision. A surgeon does not bring every instrument in the hospital into the operating room. They bring what the procedure requires. The same discipline applies here.

Tools amplify capability. They also amplify consequence. The builder who understands this builds differently — more carefully, more deliberately, with a clearer sense of what each tool is for and what it should never be used for.

Layer Five: The Interface

The final layer is the one most people think of as the whole thing: the interface. The chat window. The voice assistant. The embedded widget. The API endpoint. The way the system presents itself to the person using it.

Layer Five is where the experience lives. And experience is not a superficial concern.

The interface shapes what people believe about what they are talking to. A chat interface that uses warm, conversational language creates a different impression than a formal, structured form. A voice interface creates a different impression than text. An interface that shows its reasoning creates a different impression than one that only shows its conclusions.

These impressions matter. They shape how people relate to the system — how much they trust it, how much they question it, how much they rely on it, how much they understand it. An interface that makes an AI seem more human than it is creates a kind of deception, even if unintentional. An interface that makes an AI seem less capable than it is creates a different kind of distortion.

The interface is also where accessibility lives. Where the decision gets made about who can use this system and who cannot. Whether it works for someone who reads slowly, or who uses a screen reader, or who is not fluent in the primary language, or who is a child, or who is in crisis.

Design for the most vulnerable first. The interface is where that principle becomes visible — or where it gets forgotten.

Layer Five is the face of the system. But it is not separate from the layers beneath it. Every design decision in the interface reflects — and shapes — what the layers beneath it are doing. The interface is not decoration. It is the final expression of every value decision made in the four layers below.

Where the values live

The Horizon Line asked you to carry a question into this lesson:

*Where in the stack do the values live?*

Now you can answer it.

They live everywhere.

In Layer One — in the training data, in the patterns the model has internalized, in what it finds easy and what it finds difficult.

In Layer Two — in the system prompt, in the instructions that shape how the model behaves, in the persona and the priorities and the constraints the builder has chosen.

In Layer Three — in what is remembered and what is forgotten, in who has access to the memory, in whether the person using the system can see and correct what is stored about them.

In Layer Four — in which tools are given and which are withheld, in the principle of minimum necessary authority, in the decision about what the AI is allowed to do in the world.

In Layer Five — in who the interface is designed for, in what it makes visible and what it hides, in whether it is honest about what the system is and what it is not.

The values are not a layer in the stack. They are the orientation of every layer.

This is what the Horizon Line was pointing toward. This is what the Lioness Protocol is built on. This is what every lesson in the Advanced path will return to, in different forms, from different angles.

The stack is not just how AI works. It is where the decisions get made.

And now you know where to look. 🏮

A practice for builders

Before you move to the next lesson, take one AI system you interact with regularly — it could be this one, or any other — and try to see the stack beneath it.

What do you know about the model it is built on? What assumptions might it carry?

What can you infer about the context — the system prompt, the instructions it has been given? What does its behavior tell you about what it has been told to prioritize?

Does it have memory? How do you know? What does it seem to remember, and what does it seem to forget?

What tools does it appear to have? What can it do beyond generating text?

And the interface — what does it make you feel about what you are talking to? What does it make visible? What does it hide?

You do not need to answer every question. You only need to begin looking.

The builder who can see the stack can work with it intentionally. Can ask: which layer is the problem in? Which layer is the opportunity in? Which layer is where my values need to be more explicit?

This is the practice. Not a one-time exercise — a permanent way of seeing.

Every conversation, from now on, has five layers.

You know where to look.

Words worth knowing

The Fivefold Stack
The five-layer architecture beneath every AI interaction: Model (the trained foundation), Context (the instructions and history), Memory (continuity across sessions), Tools (capabilities beyond language), and Interface (the experience layer). Each layer is a place where values get decided.
System Prompt
The instructions fed to the model before a user's words arrive. The primary canvas for builders — where persona, values, constraints, and priorities are encoded. Most users never see it. They experience only its effects.
Context Window
The limit of how much text a model can hold in its working memory at once. Everything outside the context window is, for the model, as if it never happened. Memory architecture in Layer Three exists partly to work around this limit.
Minimum Necessary Authority
The governing principle of Layer Four: give the AI only the tools it needs for the task at hand. Not the most powerful tools available. The minimum necessary. Precision, not timidity — a surgeon brings what the procedure requires.
Retrieval Architecture
The systems in Layer Three that pull relevant past context into the present conversation when it is needed. The mechanism that makes long-term memory possible — and that raises the most serious questions about what is stored, who has access, and whether it can be corrected.
Multi-Agent System
An architecture in which multiple AI models or agents work in parallel or in sequence, each handling different parts of a complex task. Layer Four territory — and the subject of a later lesson in this path.

What you carry forward

  • Every AI interaction runs on five layers: Model, Context, Memory, Tools, and Interface
  • The model is the foundation you inherit — powerful, pattern-rich, and carrying the biases of its training data
  • Context is the builder's primary canvas — the system prompt is where values get encoded
  • Memory is where continuity lives, and where trust is built or broken — build it with care
  • Tools extend AI into action; the governing principle is minimum necessary authority
  • The interface is not decoration — it is the final expression of every value decision in the layers below
  • The values are not a layer in the stack. They are the orientation of every layer.