In words
What it is, why it matters, and what it is like.
Why am I learning this?
When you use ChatGPT or any assistant, it remembers what you said earlier in the conversation. That memory is not magic — it is a design choice. In this page you will learn what the system actually stores and re-sends each turn, why it cannot keep everything, and how summarising, extracting facts and tracking pending actions work. This is the foundation for everything in AI agents — a system that plans, calls tools and iterates. Once you know conversation state, you can understand agent memory, the agent loop, and how frameworks like LangChain or AutoGen manage context. Without it, your agents will forget who the user is, repeat themselves, and fail at multi-step tasks.
The idea, in plain terms
Imagine you are a customer service agent at a company. A customer calls, and you have only a small notepad. As the conversation goes on, you write down the key points: 'Customer's name is Priya', 'Problem with order #12345', 'She wants a refund'. You cannot write the whole conversation — there is no space and you would drown in detail. So you write a summary, you note the important facts, and you keep a list of what needs to happen next. When the next person takes over the call, you hand them the notepad. That notepad is the conversation state. In AI systems, the 'notepad' is a data structure that stores the history of messages, a compressed summary, extracted facts, and a list of pending actions. Every time the model needs to respond, it reads the notepad and re-sends it along with the new message. The notepad has a size limit, so you must decide what to keep and what to throw away. If you throw away something important, the model can no longer reason about it — it is gone.
An analogy
Think of a conversation with an AI like a game of Chinese whispers with a twist. You and the AI are playing a game where the AI has to remember everything you said, but it has a tiny brain. It can't remember the whole conversation, so it keeps a running list of messages. But that list gets too long, so it starts writing summaries: 'She said she is vegetarian, wants a recipe for paneer, and is allergic to nuts.' It also extracts facts: 'Name: Priya, City: Mumbai, Allergic to: nuts.' And it keeps a to-do list: 'Send recipe, ask if she wants dessert ideas.' The AI's notepad is the conversation state. The game has a rule: every time you send a new message, the AI must read the entire notepad before responding. So if the notepad gets too long, the AI slows down and eventually cannot fit it in its head — the context window is full. So the AI compacts the notepad — it replaces the old detailed messages with a summary. Now, here is where the analogy breaks: a human can remember things that are not written down — they have intuition, they might remember the customer's tone of voice. An AI has nothing but the notepad. If it is not in the state, it does not exist for the model. That is why explicit state beats relying on the raw transcript — because the raw transcript might be truncated or lost, but a well-structured summary and fact list survives.
Definition
Conversation state is the data structure that stores everything the system needs to remember across turns of a conversation — the message history, a compressed summary, extracted facts and pending actions — and which is re-sent to the model on each turn so it can reason about the conversation as a whole.
Where this sits
You have not yet learned about AI agents, but this is the first concept in that family. Conversation state is the 'memory' part of the agent loop — the loop that goes 'receive context, decide an action, execute it, observe the result, repeat'. Without a good memory, the agent cannot act over multiple steps. This concept also connects to the context window, which you will learn later — the context window is the space the model has for the state you send it. And it connects to agent memory systems — different stores for different types of memory (working context, episodic history, semantic facts, procedural skills). Conversation state is the simplest form: what you explicitly put in the prompt.