What is context for an AI agent?
Owners are often surprised by what an AI agent remembers and what it does not. It can recall a detail from ten messages ago, then seem to forget your opening hours in a new chat. Both come down to one idea: context. Here is what context means, why it runs out, and how to set things up so your agent always has what it needs in front of it when it replies to a customer.
In one sentence
Context is everything an AI agent can see at the moment it writes a reply: your instructions, the conversation so far, and anything a tool has just fetched for it. If something is not in its context, the agent does not know it, however many times it was mentioned in an earlier chat.
In more detail
Think of context as the papers on a desk. When someone sits down to answer a letter, they can read the letter, their notes and anything else laid out in front of them. They cannot read a file locked in a cabinet in another room. An AI agent works the same way. It writes its reply from what is on the desk right now.
There is a limit to how much fits on the desk. AI companies call it the context window, and it is measured in pieces of text called tokens. Modern models have large windows, so a typical customer conversation fits easily. A very long session, though, with hundreds of messages, files and tool results, can fill it. When that happens the app has to make room, usually by summarising or dropping the oldest material, and details can be lost.
Memory is a related but different idea. Some AI apps can save a few facts between chats, such as your name or a preference, and bring them back later. These features vary from app to app, can be switched off, and are not designed to hold a whole business's price list. It is safer to treat any built-in memory as a bonus rather than the place your facts live.
For customer messages, the important point is that a fresh chat with your AI app usually starts with an empty desk. If you explained your refund policy in a chat last Tuesday, a new chat today will not know it unless the policy is somewhere the agent reads every time. That place should be a set of notes the agent always loads, not a conversation you hope it remembers.
Good context has three layers. First, standing facts and rules about your business. Second, the conversation with this customer, including earlier messages. Third, anything freshly looked up, such as a booking slot from your calendar tool. The example below shows an agent picking up a returning customer, where the second and third layers matter. Names and details are examples.
An example
| Who | Message |
|---|---|
| Customer (Aisha, on Instagram, three weeks after her last visit) | Hi again! Can I book the same as last time? |
| AI agent (reads the earlier messages in this chat first) | Hi Aisha, lovely to hear from you. Last time you had a gel manicure with Mei. Would you like the same with Mei again? She has Saturday at 11:00 or 14:30. |
| Customer (Aisha) | Saturday 11 please |
| AI agent | Done, Saturday at 11:00 with Mei for a gel manicure. See you then! |
What is in your agent's context, and what is not
| Usually in context when it replies | Usually not in context unless you arrange it |
|---|---|
| The notes or instructions loaded for this session | Things you said in a different chat with the app |
| The customer's latest message | Older messages in the chat, until the agent fetches them |
| Earlier messages it has read in this session | Conversations on another channel with the same person |
| Results of tools it has just used | Your calendar, stock or orders, unless it has a tool for them |
| Your business brief, if it is told to read it first | Last month's price change that only lives in your head |
Most "it forgot" moments are a fact sitting in the right-hand column. Moving that fact into the left-hand column, usually by writing it into the notes the agent reads every time, fixes the problem for good.
Why long sessions can go wrong
An always-on agent may run for days in one long session. Each new message, tool result and reply adds to its desk. Eventually something has to give.
- The session starts with your notes at the top, clear and complete.
- Hundreds of conversations later, the desk is crowded with old chats and tool results.
- The app summarises or drops older material to make room.
- A detail from your notes gets squeezed, and a reply comes out slightly off, such as an old price.
The fix is simple. Keep your facts somewhere the agent re-reads before each reply, rather than relying on it remembering what it read at the start. Restarting a long-running agent now and then also gives it a clean desk.
A note that tells the agent where to look
You can write the habit into your agent's instructions. Here is an example of a few lines that make context reliable. Names and details are examples.
Before every reply:
1. Read the business brief again. It is the source of truth for hours,
prices, services and when to hand over. If anything you remember
disagrees with the brief, the brief wins.
2. Read the last 20 messages in this chat, so you know what was already
said and agreed.
3. If the customer refers to something you cannot find, ask them a short
question rather than guessing.
Never rely on memory from other chats for prices or promises.Common mistakes
- Teaching the agent facts in passing during a chat and expecting it to remember them next week. Put them in the notes.
- Keeping different versions of your prices in different apps. The agent reads whichever one it has, so keep one source.
- Pasting a whole website or catalogue into the notes. Long notes crowd the desk. Keep the facts customers actually ask about.
- Expecting the agent to know what was said on WhatsApp when the same person writes on Instagram. Treat them as separate unless you link them.
- Leaving an always-on agent running for weeks without a fresh start. Restart it occasionally so its context is clean.
Why it matters for your business
- Customers expect you to remember them. Reading the chat history first lets the agent pick up where things left off.
- Wrong answers often come from a missing fact, not a bad model. Knowing about context tells you where to put the fact.
- One shared set of notes stops two agents, or two sessions, giving different answers to the same question.
- Keeping notes short and focused leaves more room for the conversation itself.
- Understanding that context runs out explains why long-running agents need fresh starts and a source of truth they re-read.
How Spaces handles it
Spaces gives your agent the second layer of context directly. It can read the conversations on your connected accounts and page back through a chat's earlier messages, so it can see what a returning customer said last time before it answers. Chat tags and owners, and whether a person has taken a conversation over, come back with the chat list, so the agent also knows who is dealing with what.
For the first layer, Spaces keeps a business brief in your workspace: business name, what you sell, hours, locations, prices and links, common questions, tone, languages, what never to promise, when to hand over and an urgent contact. Your agent reads it before replying. Because the brief lives in Spaces, a new chat, a restarted agent or a second agent all start from the same facts, and you change a price in one place.
Spaces does not hold your calendar, stock or orders. If you want the agent to check those, give it its own tools for them. Spaces keeps the messaging side and its limits.
In short
Context is the desk your agent works from. It sees what is on the desk and nothing else, and the desk has a size limit.
Put your standing facts in notes it reads every time, let it read the chat history before replying, and give it tools for anything that changes by the hour. Do that and "it forgot" becomes rare.
FAQ
Does my AI agent remember past conversations with a customer?
Only if it reads them. With Spaces connected, the agent can read the earlier messages in that chat before replying, so it can see what was said last time. It does not carry memories from one session to the next on its own.
What is a context window?
It is the most text an AI model can take into account at once, including your notes, the conversation and tool results. Modern windows are large, so most customer chats fit. Very long sessions can fill it, and then older material gets summarised or dropped.
Should I use my AI app's memory feature for business facts?
It is better not to rely on it. Built-in memory features vary between apps and are meant for small preferences. Keep prices, hours and rules in notes the agent reads every time, such as the business brief in Spaces.
Why did my agent give an old price?
Usually because the old price was still somewhere in its context, such as an old note or an earlier part of a long session. Update the one source of truth, tell the agent that source wins over anything it remembers, and restart a long-running session.
Does the agent know a customer on WhatsApp is the same person on Instagram?
Not automatically. Each channel has its own conversations. If it matters, ask the agent to check by name or phone number, and be careful not to assume two profiles are the same person.
How long should my notes be?
Long enough to cover what customers really ask and where the edges are, and short enough to read in a couple of minutes. A page or two is plenty for most small businesses.
Can two agents share the same context?
They can share the same facts. In Spaces, every agent you connect reads the same business brief, so they start from the same information even though each one has its own session.