Skip to content
Agent YAP

What is it?

Token

The unit a language model reads and writes. A token is roughly a word fragment; a word can be one or several tokens. Both the context window size and the cost of running a model are measured in tokens. The articles often compare systems by token usage, for example noting that agents use about 4 times the tokens of a chat, and multi-agent systems about 15 times.

From the AI agent glossary

As the Foundational Modelling glossary puts it

A token is the small chunk of text that a language model actually reads and writes. It is usually a word or a piece of a word. For example, "cat" might be one token, while "unbelievable" might split into "un," "believ," and "able." Common words are often single tokens; rare or long words get broken into pieces.

Tokens are the unit of measurement for almost everything in language models. Data size is counted in tokens, context length is counted in tokens, and you are typically billed per token when using a commercial model. A rough rule of thumb in English: one token is about three quarters of a word.

See it in the Foundational Modelling glossary

As the Planning and Reasoning glossary puts it

A token is the small chunk of text a model reads and writes, usually a word or a piece of a word. It is the basic unit models operate on, and it matters here because a model does a fixed, small amount of computation per token. That is precisely why writing out more tokens of reasoning (chain of thought) gives a model more room to compute. (Covered in more depth in the folder 01 glossary.)

See it in the Planning and Reasoning glossary

Where Token is explained

  1. Tokens, Context Windows, and the Quadratic ProblemBuilding Coding Agents and Harnesses · Concept explanation
  2. Cost, Latency, and Model TieringArchitecture and System Design · Where cost comes from
  3. Production Realities: Economics, Security, and GovernanceBuilding Coding Agents and Harnesses · The economics (and why they surprise people)
  4. Anatomy of an AI AgentArchitecture and System Design · Real code: OpenClaw checks the caller before any agent work
  5. Prompt Caching and Context ManagementBuilding Coding Agents and Harnesses · Prompt caching: paying once for the stable part

Every term, A to Z