What is context window?
The context window is the amount of text an AI model can take into account at one time, including its instructions, the conversation so far and any documents supplied. It is measured in tokens.
Why it matters
Everything an AI agent knows during a conversation has to fit in its context window. If a long call, a full customer history and several policy documents exceed the limit, something must be left out. What gets dropped can decide whether an answer is right. Larger windows also cost more and can slow replies, so teams choose carefully what goes in.
How it works
Before each reply, the system assembles the instructions, the recent turns of the conversation and any retrieved material, and counts their tokens. If the total is over the limit, older turns are shortened into a summary or removed, and fewer documents are included. The model then writes its reply using only what is inside the window at that moment.
Example
A customer has been chatting about a faulty boiler for forty minutes. Early on, they gave their address and the boiler’s serial number. The full transcript no longer fits alongside the repair guides. The system replaces the first half of the chat with a short summary that keeps the address and serial number, so the agent can still book the right engineer.
