The AI Agent’s Context
What is Context?
I want to talk about the importance of Context when working with AI agents. Context is an AI agent’s memory. For example, if I start a new conversation with an agent and ask:
“How can I upload an image from my local laptop to a remote client to which I have an SSH connection?”
AI responds to this prompt by suggesting Secure Copy and giving a generic example
“scp /path/to/image.jpg username@remote_host:/path/to/destination/“
Note that the response is not entirely generic. The AI agent saw from my prompt that I wanted to send an image, so it used image.jpg.
My next prompt was:
“I get this error : myname@192.168.0.1: Permission denied (publickey).”
(Not the actual IP address)
The AI agent used its Context to know that the error I received was a result of running the SCP command. I did not need to write it in the prompt. The agent came back with a response that explained the error was due to SSH keys. It suggested several possible fixes. Those fixes no longer used ”username@remote_host”, because it now knew the user name and address of the remote server.
I tried one of the suggested fixes, which gave another error. The agent diagnosed the correct fix. The next time I used the agent, I started a new conversation as I did not need the context built up around this problem.
The Problem with Never-Ending Conversations
Starting new conversations works fine if each prompt you provide is completely independent from any other conversation. However, in real life, we frequently need our AI agent to remember details from other related conversations. The naive solution would be to have a single never-ending conversation. Let me show why that does not work.
The core problem is that the size of context is finite. In a long conversation with many prompts, the agent will exhaust context; it runs out of memory. AI agents address this by silently discarding the oldest pieces of context. This is a logical approach, but it comes with problems. Let me give you an example from my personal use of AI.
The Better Solution: Projects
I enjoy making cocktails. I have several excellent recipe books. These allow me to find new cocktails to try. The problem is that many of the recipes require ingredients that I do not have. I turned to an AI agent. I gave it a list of the spirits, mixers, bitters, and liqueurs that I owned. I also provided a list of my favorite cocktails, so the agent knows what I like and avoids suggesting styles that are not to my taste.
I could have continued a single conversation, returning to it when I wanted to try a different drink. However, in time I would exhaust the context and the oldest information would be discarded. The oldest information in this case is the most important, my bar list and my favorite drinks.
The solution is to use what is commonly called “Projects”. This is the term used by Claude, ChatGPT, and Grok. A project is a way to create a starting context. Any conversation started in that project will share this context. Moreover, the agent can change that context. So, in a conversation I can say “I bought Averna, please add to my bar.” Or “I ran out of Aperol, please remove from my bar.” With Projects your core context is not forgotten.
Note, however, that Agents do not access context from other conversations in a project. For example, I was in a restaurant with a fine cocktail list. I ordered one which I enjoyed and wanted to recreate at home. I took a photograph of the menu. I uploaded the picture to a new chat in the Cocktails project and asked the agent for a suggested ratio of the ingredients for this drink, “Lady Whistledown”. The agent read the name and ingredients from the photo and provided a suggested recipe. If I were to start a new conversation and ask the agent to create a riff on “Lady Whistledown”, the agent would have no context - since it is not a commonly known drink. If I want to talk with the agent about this drink I have two options: use the same conversation or ask the agent to add details of the drink to the project context.
Mastering context is one of the most valuable skills you can develop when working with AI agents. While individual conversations give you fresh, focused interactions, Projects provide the persistent memory that real-life use requires. By understanding the finite nature of context windows and using Projects to protect what matters most, you turn the AI from a helpful assistant into a reliable long-term collaborator. Whether you’re troubleshooting technical problems or building a personal knowledge base like a cocktail inventory, thoughtful context management is the key to dramatically better results.