「Token 之旅」交互式 LLM/Agent 教程
9
stars
14
commits
TypeScript
primary language
Aug 19, 2026
updated
A vertical cross-section of the LLM application stack—from Agent messages to tokens and KV cache.
Read the explorable · Open the playground
LLM applications look simple from the outside, but a single turn passes through many layers: Agent messages, chat templates, tokenization, the context window, attention, and KV cache. Each layer has its own representation, and the connections between them are easy to lose.
TokenTour makes a vertical cut through that stack. Instead of explaining one layer in isolation, it follows the same conversation downward and shows how a change at one level propagates through the rest.
The first explorable, Chat to Token, combines a guided article with a synchronized playground. Edit a conversation and inspect how it becomes model input, how that input is tokenized, and what it means for context usage and KV cache reuse.
The playground includes prepared Agent traces, so no API key is needed. You can also bring your own provider and key to generate a trace in the browser. Keys are stored locally in your browser and are not persisted by TokenTour.
TokenTour is an explanatory model, not an inference engine. Tokenization uses real model tokenizers where available, and KV memory is calculated from model architecture parameters. Attention cells and prefix-cache states are visual explanations of those mechanisms; they are not provider telemetry or real model activations.
The interface defaults to English. Use the language switch in the top-right corner for Chinese.
For local setup, deployment, and implementation notes, see Development. For a detailed walkthrough of the playground, see Playground Guide.
TypeScript
53.8%
Astro
26.9%
CSS
10.7%
Python
3.9%
Jinja
3.4%
JavaScript
1.2%
「Token 之旅」交互式 LLM/Agent 教程
9
stars
14
commits
TypeScript
primary language
Aug 19, 2026
updated
A vertical cross-section of the LLM application stack—from Agent messages to tokens and KV cache.
Read the explorable · Open the playground
LLM applications look simple from the outside, but a single turn passes through many layers: Agent messages, chat templates, tokenization, the context window, attention, and KV cache. Each layer has its own representation, and the connections between them are easy to lose.
TokenTour makes a vertical cut through that stack. Instead of explaining one layer in isolation, it follows the same conversation downward and shows how a change at one level propagates through the rest.
The first explorable, Chat to Token, combines a guided article with a synchronized playground. Edit a conversation and inspect how it becomes model input, how that input is tokenized, and what it means for context usage and KV cache reuse.
The playground includes prepared Agent traces, so no API key is needed. You can also bring your own provider and key to generate a trace in the browser. Keys are stored locally in your browser and are not persisted by TokenTour.
TokenTour is an explanatory model, not an inference engine. Tokenization uses real model tokenizers where available, and KV memory is calculated from model architecture parameters. Attention cells and prefix-cache states are visual explanations of those mechanisms; they are not provider telemetry or real model activations.
The interface defaults to English. Use the language switch in the top-right corner for Chinese.
For local setup, deployment, and implementation notes, see Development. For a detailed walkthrough of the playground, see Playground Guide.
TypeScript
53.8%
Astro
26.9%
CSS
10.7%
Python
3.9%
Jinja
3.4%
JavaScript
1.2%