Skip to content
47% off: the complete course for $79 (reg. $149)Order now →
Agent Builder

AI agent glossary

Context window

The maximum amount of text, measured in tokens, that a model can consider at once, including instructions, conversation history, and tool results.

A model has no memory outside its context window. On every call you send it everything it needs: the system prompt, the conversation so far, tool definitions, and any documents. The context window is the upper limit on how much that can be.

Window sizes vary by model and change over time, so check the provider's documentation for current numbers. A bigger window is helpful, but it is not the same as perfect attention. Models can miss details buried in very long inputs, and every token you send costs money and adds latency.

For agents, the context window is the main resource you manage. Each tool call adds to it, so long tasks need strategies like concise tool outputs, compaction, and saving notes to files.

Example

An agent that reads twenty large log files in full may fill its window before finding the bug. One that searches the logs for error lines first stays well within budget.

Learn more in the course

Related terms

Go from definitions to doing

Learn to use and build AI agents in 65 practical lessons.