Waiting for engine...
Skip to main content

Agentstudio token limits

Agents process text in small chunks called tokens, roughly one token per word, though punctuation and spaces also count. Agentstudio tracks token usage to manage how much information you can send to an agent and how much it can send back.

  • Input tokens: Units to measure the amounts of text in your prompt, any data you provide, and the agent's instructions.
  • Output tokens: Units to measure the amount of text in the agent's response.

Token limitation details

The following table lists token limits that apply to each agent interaction:

DimensionLimitDescription
Model Context Window200,000 input tokens (~500,000 characters)Total capacity for agent instructions, conversation history, tool responses, and user input
Agent Response per Turn4,096 output tokens (~10,000 characters)Maximum length of a single agent reply, separate from the context window

Managing the context window

Session memory

With Extended Thinking on, conversational agents keep tool-response data, including retrieved glossary and knowledge base content, available outside the active context window for the rest of the session. The agent recalls it on demand rather than resending it on every turn, which reduces repeat tool calls. Structured mode and Agent Step are single-turn and don't use session memory.

What happens when the limit is reached

If you reach the context window limit during an agent interaction, the agent summarizes prior tool outputs and conversation history. However, if you enter an input that exceeds 200k tokens, the agent responds with "I'm sorry, I was unable to process your request at this time. Please try again, and if the issue persists, contact your administrator."

Next steps

Refer to Testing and Troubleshooting an agent for general agent building guidelines and troubleshooting tips.

On this Page