# Context

> The relevant information the agent has access to right now — what the agent knows that's pertinent to the task.

The relevant information the [agent](https://ai9k.vercel.app/en/agent) has access to right now. The abstract noun — not the raw input the model sees (that's the [context window](https://ai9k.vercel.app/en/context-window)), not the running history (that's the [session](https://ai9k.vercel.app/en/session)), but _what the agent knows that's pertinent to the task_. "Loading something into context" means making it part of this set; "context engineering" is the discipline of curating it.

The three terms separate cleanly:

| Term           | What it names                                                       |
| -------------- | ------------------------------------------------------------------- |
| Context        | The task-relevant information the agent currently has               |
| Context window | The literal [token](https://ai9k.vercel.app/en/token) sequence the model sees per request |
| Session        | The running conversation the [harness](https://ai9k.vercel.app/en/harness) stores         |

The separation matters because context is a measure of quality, not quantity. A context window can be nearly full and the context still poor — thousands of tokens of stale tool output, none of it about the task at hand. It can also be nearly empty and the context excellent: the one type definition the task turns on.

Most day-to-day failures trace back to context. When the agent invents an API, contradicts a decision, or guesses at a schema, the first question is what was in context when it did — usually the relevant fact was never loaded, or was buried under [attention degradation](https://ai9k.vercel.app/en/attention-degradation). The fix is curation: load what the task needs, keep out what it doesn't.

**Usage**

"It keeps inventing fields that aren't in the type."

"The type file isn't in context — it's reading the call sites and guessing. Read the definition in first."

---

- Section 2 — Sessions, Context Windows & Turns · Term 18 of 72
- Page: https://ai9k.vercel.app/en/context
- Learn step by step: https://ai9k.vercel.app/en/learn#/context
- On the map: https://ai9k.vercel.app/en?term=context
- JSON: https://ai9k.vercel.app/data/terms/context.json
- Mentioned in: [AI](https://ai9k.vercel.app/en/ai.md), [Model](https://ai9k.vercel.app/en/model.md), [Parameters](https://ai9k.vercel.app/en/parameters.md), [Training](https://ai9k.vercel.app/en/training.md), [Inference](https://ai9k.vercel.app/en/inference.md), [Next-token prediction](https://ai9k.vercel.app/en/next-token-prediction.md), [Non-determinism](https://ai9k.vercel.app/en/non-determinism.md), [Harness](https://ai9k.vercel.app/en/harness.md), [Model provider request](https://ai9k.vercel.app/en/model-provider-request.md), [Stateless](https://ai9k.vercel.app/en/stateless.md), [Stateful](https://ai9k.vercel.app/en/stateful.md), [Tool](https://ai9k.vercel.app/en/tool.md), [Tool result](https://ai9k.vercel.app/en/tool-result.md), [MCP](https://ai9k.vercel.app/en/mcp.md), [Parametric knowledge](https://ai9k.vercel.app/en/parametric-knowledge.md), [Knowledge cutoff](https://ai9k.vercel.app/en/knowledge-cutoff.md), [Contextual knowledge](https://ai9k.vercel.app/en/contextual-knowledge.md), [Attention relationship](https://ai9k.vercel.app/en/attention-relationship.md), [Attention budget](https://ai9k.vercel.app/en/attention-budget.md), [Attention degradation](https://ai9k.vercel.app/en/attention-degradation.md), [Smart zone](https://ai9k.vercel.app/en/smart-zone.md), [Clearing](https://ai9k.vercel.app/en/clearing.md), [Handoff](https://ai9k.vercel.app/en/handoff.md), [Primary source](https://ai9k.vercel.app/en/primary-source.md), [Secondary source](https://ai9k.vercel.app/en/secondary-source.md), [Handoff artifact](https://ai9k.vercel.app/en/handoff-artifact.md), [Spec](https://ai9k.vercel.app/en/spec.md), [Ticket](https://ai9k.vercel.app/en/ticket.md), [Compaction](https://ai9k.vercel.app/en/compaction.md), [Progressive disclosure](https://ai9k.vercel.app/en/progressive-disclosure.md), [Skill](https://ai9k.vercel.app/en/skill.md), [Subagent](https://ai9k.vercel.app/en/subagent.md)
- Previous: [Stateless](https://ai9k.vercel.app/en/stateless.md)
- Next: [Context window](https://ai9k.vercel.app/en/context-window.md)

Every term page has a markdown copy: add .md to its address.
