Context
Context is the information available to a model during a generation, including instructions, messages, tool interactions, and reasoning state.
Context is composed of context items: system message, developer message, user message, tool call, tool call output, reasoning, and model message.

Reasoning models spend additional computation generating intermediate reasoning before answering or calling tools, making them useful for complex planning, coding, mathematics, and decisions involving multiple constraints; this can increase latency and token usage. Reasoning-capable APIs can return Reasoning items, while non-reasoning models do not produce these dedicated items; their exact representation depends on the provider.
Context represents working memory, while agent memory provides long-term storage, including episodic memory of past experiences.
The role of each item is described in context items.