Skip to content

Token & Context

Every time you take a turn, Isekaigen assembles a carefully structured packet of information and sends it to the AI. Understanding how this packet is built — and its limits — explains why the AI responds the way it does, especially in long games.

Token panel showing story tokens


AI models process text as tokens — roughly one token per word fragment. The AI can only process a finite number of tokens per request (its context window). Isekaigen tracks token usage to stay within this window while fitting as much relevant information as possible.


Each turn, the AI receives content from three distinct sources:

The system context is the fixed foundation the AI receives at the start of every request. It contains everything the AI needs to understand who you are and where you are:

  • World lore and initial history
  • Your character’s background and personality
  • Relevant NPC descriptions
  • Current quest stage and conditions (RPG Mode)
  • World faction, power system, and class information
  • Your writing instructions, module, and style rules

This is the richest section — its size depends on your world’s complexity.

The story history is your actual gameplay — all the turns of narrative text that make up your game. This is what grows over time.

History is managed with a sliding window: the system always includes the most recent turns first and works backwards, stopping when the history budget is full. Older turns naturally drop out as your game grows longer — which is expected behavior, and exactly why the Memory System exists.

Retrieved memories (from the Memory Book) and relevant lore (from the Lore Book) are injected into each turn’s context via semantic search. These are compact summaries that efficiently represent important past events without consuming the history budget.


In a fresh game, the AI can see your full story history. In a long game (50+ turns), the AI might only see the last 10–15 turns directly — but the Memory System fills the gaps with retrieved summaries of older events.

📝 Note: This is why long games can occasionally seem like the AI “forgot” something. If an event happened 80 turns ago and no memory was created for it, the AI genuinely cannot see it. Add a Lore Book entry for things you never want forgotten.


Your game tracks how many tokens were used for each context pool on the last turn. You can view these in the game settings panel. If the AI seems to be missing context, checking these numbers can help diagnose the issue — if story history is maxed out and few memories are being retrieved, older events are likely out of reach.


  • Enable the Memory System (on by default) — this is your primary protection against context loss over time
  • Use the Lore Book for world facts that should never be forgotten: character names, key plot reveals, magic rules
  • Enable Plot Builder in long games — it creates narrative direction even when the AI can’t see far back in history
  • Keep writing instructions concise — long instructions eat into your context budget and leave less room for world context