Context Window
ai-engineering llm agent-design
The maximum amount of text a language model can process in a single inference, measured in tokens.
↑ ContentsDefinition
The context window is the total token budget a language model has for a single inference — conversation history, system prompt, tool definitions, file contents, and outputs all count against this limit. For AI agent workflows, the context window is the primary resource to manage. Instructions loaded at session start consume budget that could hold conversation history or tool results. As the window fills, earlier content — including behavioral rules — gets evicted or compressed, which is why behavioral modeling degrades under pressure.
↑ Contents