# Context

The agent assembles three kinds of context — usage, knowledge, and action — in real time to answer with low latency, high quality, and accuracy.

Every time the agent responds, it assembles three kinds of context in real time and reasons over them together. Getting the *right* context in front of the model, and only the right context, is what makes the agentic interface fast, accurate, and genuinely useful.

## The three contexts

| Context | What it is | Where it comes from |
| :--- | :--- | :--- |
| **Usage context** *(real-time)* | Who the user is and what they're doing right now: identity, subscription, and custom attributes, plus the live page they're looking at. | [`identify()`](/start/user-context/) for the user and subscription; [Shared State (Tandem)](/guides/shared-state/) and [Share current tab](/customize/share-current-tab/) for the page. |
| **Knowledge context** | The facts the agent can draw on to answer. | [Knowledge Base](/user-guides/knowledge-base/) |
| **Action context** | What the agent can do: the actions available to run. | [Actions](/guides/build-actions/) |

## Assembled in real time

The agent doesn't load everything up front. For each turn it selects only the context relevant to the request and assembles it on the fly. That real-time assembly is what maximizes:

- **Latency** — only the context that matters is sent to the model, so responses come back fast.
- **Quality** — replies reflect who the user is and what they're doing on the page right now.
- **Accuracy** — answers are grounded in your knowledge and act through your actions, instead of guessing.

## Wire up each context
