How much of your Confluence fits in an AI context window?

Updated 2 December 2026 ยท 8 min read

Short answer: A context window is the total amount of text, measured in tokens, that an AI model can consider in one request, including your instructions, the documents you load, the conversation and the answer. In English prose, 100 tokens is about 75 words, so an 8k, 32k and 128k token budget holds roughly 6,000, 24,000 and 96,000 words, though counts vary by model and content. Convert pages to Markdown first, count with your target model's tokenizer, load the shallow, healthy, recent pages first, and leave room for everything else in the request.

What is a context window, and what counts toward it?

A context window is the working memory of a language model for one request. Anthropic's context window documentation defines it as all the text the model can reference when generating a response, including the response itself.

Everything in the request counts: the system prompt, every message, tool results, documents and tool definitions. The model's output counts too. Your Confluence pack therefore competes with the instructions, the chat history and the answer for the same space.

Window sizes differ by model. As of December 2026, Anthropic's documentation lists current Claude models with 200k and 1M token windows, and other vendors publish their own figures on their model pages. A bigger window does not remove the need to curate. The same Anthropic page notes that accuracy and recall degrade as token count grows, an effect it calls context rot.

How many tokens is a Confluence page?

A token is a chunk of text, often a short word or part of one, that a model reads as a single unit. OpenAI's help article on tokens gives two English rules of thumb: one token is about 4 characters, and 100 tokens is about 75 words. That makes one word about 1.33 tokens. These are estimates, and the same text can produce different counts depending on the model, its encoding and the language.

Newer models can count higher. As of December 2026, Anthropic's token counting documentation says that its newer models use a tokenizer that produces about 30 percent more tokens for the same text than earlier models, and tells you to recount prompts against the model you plan to use. Treat any word-based estimate as a starting point.

Format matters even more than the tokenizer. ADF, the JSON that Confluence uses for page bodies, spends characters on structure. In a small test page with a heading, a sentence, a three-item list and a code block, the Markdown was 191 characters and the minified ADF was 899. Always convert to Markdown before you count or load anything. The ADF guide shows why.

How do you estimate the size of a Confluence section?

  1. Export the section to Markdown. See the export guide for the options.
  2. Count words. Multiply by 1.33 for a first token estimate:
    find out -name '*.md' -print0 | xargs -0 cat | wc -w
  3. Count tokens with the target model. Anthropic offers a free token counting endpoint that returns an estimate for a given model. This Python example counts a pack file, with a placeholder for the model you plan to use:
    import anthropic
    
    client = anthropic.Anthropic()  # reads ANTHROPIC_API_KEY
    text = open("llms-full.md", encoding="utf-8").read()
    count = client.messages.count_tokens(
        model="MODEL_ID",  # the model you plan to run
        messages=[{"role": "user", "content": text}],
    )
    print(count.input_tokens)

That call sends the text to Anthropic's API, so use it only with content you are allowed to share. Otherwise rely on the word-based estimate and add a safety margin.

What do 8k, 32k and 128k token budgets hold?

The table converts token budgets to English words with the 100 tokens to 75 words rule, and to pages at 500 words each. These are approximations for prose. Code, tables and other languages shift the numbers, so measure your own content.

BudgetApproximate wordsApproximate pagesTypical use
8,000 tokens6,00012One service's runbook, an onboarding guide, a tight agent prompt
32,000 tokens24,00048A team handbook section or one topic's full doc set
128,000 tokens96,000190A large section of a space, on a model whose window is well above 128k

As a rule of thumb, not vendor guidance, keep the pack to about half the window or less. A pack that fills the window leaves no room for instructions, conversation history, tool output and the answer.

Should you load everything or retrieve pages on demand?

Both have a place. Anthropic's engineering guidance on context engineering describes context as a finite resource with diminishing returns and recommends finding the smallest set of high-signal tokens for the task. It also describes a hybrid: load a small amount of stable context up front and let the agent fetch the rest when needed.

For Confluence, that means a pack for the stable core (architecture overview, conventions, key runbooks) and live access for everything else, for example through Atlassian's MCP server. A pack is a reviewable snapshot that works offline. Live access is fresher and honors each user's permissions, but costs extra tool calls.

How do you choose pages when a section is too big?

Cut first, then rank. Pruning improves answers as well as size.

  1. Remove what should not be there: stale pages, duplicates, drafts, archived content and stubs with almost no text. Fix dead links on the pages you keep.
  2. Rank what remains: overview and index pages first, because they orient the model. Then pages that are healthy (current, with working links), then the most recently updated.
  3. Split oversized pages. A single page of several thousand tokens can use a large share of a small budget. Folio's health score flags pages over about 3,500 and 6,000 estimated tokens for this reason.
  4. Make several packs, not one. A pack per topic or service is easier to review and cheaper to load than one pack for everything.

What does compaction keep, and when should you avoid it?

Compaction shortens pages instead of dropping them. It trades depth for coverage, so use it on purpose.

When a page does not fit, Folio's Compact to fit strategy keeps its headings and note, tip and warning callouts, the first paragraph under each heading, the first lines of long code blocks and the top rows of long tables. It marks the page as compacted. If a page still does not fit, it is omitted and listed at the end of the pack.

The alternative, Prioritize key pages, keeps whole pages in priority order (shallow in the tree first, then higher health score, then more recent) and lists the pages it had to leave out.

StrategyResultUse it forRisk
Prioritize key pagesFull pages, fewer of themRunbooks and procedures with exact commands and numbersLeft-out pages are invisible to the model, apart from a list of their titles and links
Compact to fitOutlines of more pagesBroad reference sets where the model needs a map of what existsDetails are cut, so the model may answer from an outline

Each page entry carries its source URL, so a person or an agent with live access can open the full page when the outline is not enough.

How does Folio build a token-budgeted pack?

Folio for Confluence builds the pack with your own Confluence permissions and no AI credits. Open Space apps, then Folio for Confluence, and use the Audit & fix tab to pick a section. Choose an 8k, 32k or 128k budget and an overflow strategy, then download llms-full.md, download a nested zip of Markdown files with frontmatter and relative links, or copy the Markdown.

Folio reserves a small allowance for the header and the Document Map, fills the rest in priority order, and lists any pages it leaves out. Its token numbers come from a deterministic estimate that blends character and word counts. It is not a model tokenizer, so recount the final file with your target model. Folio works on Confluence Cloud only and does not export images. See the Folio docs for the full list of options.

What should you check before you hand a pack to an AI tool?

  1. The pages are Markdown, not ADF or storage format.
  2. Stale, duplicate and draft pages are out, and dead links are fixed.
  3. The token count was measured with the model you will use.
  4. The pack fills at most about half the window.
  5. Each page shows its source URL and last updated date.
  6. You asked the tool three questions whose answers you already know, and it got them right.
  7. You know when the pack will be rebuilt. It is a snapshot.

FAQ

Why do two tools report different token counts for the same file?

Tokenizers differ by model. OpenAI notes that the same text can produce different token counts depending on the model, its encoding and the language, and, as of December 2026, Anthropic reports that its newer models produce roughly 30 percent more tokens for the same text than earlier ones. Folio's own number is a deterministic estimate, not a model tokenizer, so recount with your target model before you rely on it.

Can I paste a whole Confluence space into a model with a very large window?

You can if it fits, but it is rarely the best choice. Anthropic notes that accuracy and recall degrade as the token count grows, and pay-per-token APIs bill every input token. Stale, duplicate and conflicting pages also compete with the correct ones. A smaller, curated pack usually answers better.

Should I use Rovo or an MCP server instead of a context pack?

Use both for different jobs. A pack is a fixed snapshot that works offline and is easy to review. Rovo and MCP tools read live pages with the signed-in user's permissions, which suits fresh or very large content. Folio's read-only MCP tools can return a clean Markdown page or a budgeted pack on request.

Does building a pack send my pages to an AI model?

Not in Folio. Export is deterministic, runs on Atlassian's Forge platform with no external fetch domains, and uses no AI credits. Once you paste or upload the pack into an AI tool, that tool's data terms apply, and a token counting API call also sends the text to its provider.