Tenant guide

Token usage — what counts

What the "pre-processing" and "generation" bars on your usage chart actually mean, what consumes tokens and what doesn't, and how to read usage over time and by agent.

Your dashboard shows token usage as two colours — pre-processing and generation. Here is what each one is, and what does and doesn't cost you tokens.

The two kinds of tokens

A large language model bills for the text it reads and the text it writes, measured in tokens (roughly ¾ of a word each). agent4.io splits your usage the same way:

  • Pre-processing (input). Everything handed to the model so it can answer:
    • the person's message,
    • the recent conversation history,
    • the relevant chunks retrieved from the agent's knowledge bases,
    • and the agent's own instructions — its soul (system prompt), task and any loaded skill.
  • Generation (output). Everything the model produces:
    • the reply your customer reads,
    • and, when the agent uses a tool or skill, the structured call it writes to trigger it.

For a grounded agent the pre-processing bar is usually the larger of the two, because retrieved knowledge is added to every question.

What does not cost tokens

  • Retrieving and storing documents. Building and searching a knowledge base does not consume your quota — only the text the model actually reads does.
  • Delivering messages. Sending and receiving over the web widget, Telegram or WhatsApp is free of token cost.

Reading your usage

On the dashboard overview:

  • Token usage over time — one bar per day (or hour), split into pre-processing and generation, with a 24h / 7d / 30d range toggle. Use it to spot a spike.
  • Token usage by agent — the same split, one row per agent, widest first. Use it to see which agent is doing the most work.

All of this counts against your monthly quota; when it runs low, see Quotas & usage.

Keeping usage down

  • A focused agent answers in fewer, shorter turns than a do-everything one.
  • Retrieving fewer chunks per question lowers input tokens; the default is already tuned, so raise it only if answers are missing detail.