Blog

Context engineering: what goes into your agent’s window

Instructions, input, tool definitions and tool results all compete for the same context window. Four habits that keep it full of what matters.

2 min read

A tray holding a few white tiles chosen from a loose pile, one tile green

A model can only reason about what is in front of it. Everything your agent knows during a request, the instructions, the task, the tool definitions and every tool result, competes for the same context window. Context engineering is the discipline of deciding what goes in.

What fills the window

  1. Instructions: how the model should behave.
  2. Input: the task itself, plus any conversation so far.
  3. Tool definitions: a name, description and input schema for every tool you allow.
  4. Tool results: whatever comes back each time the model calls a tool.

The first three you write. The fourth is where windows quietly overflow.

The raw payload problem

Call a provider API directly and you get the provider’s full response: metadata, nested objects, fields the model will never use. Do that a few times in one request and the useful facts are buried under the plumbing. The model pays attention to all of it, and you pay for every token.

The goal is not more context. It is the right context, in a shape the model can use.

Four habits that keep context clean

1. Allow only the tools a request needs

Every tool definition costs space and adds a choice. A request that summarizes email does not need the CRM tools. With Agent200, each run() lists its own tools, so the window carries only what that task can use.

2. Return structure, not responses

A workflow returns the output you defined: the fields that matter, combined from every endpoint it calls. The model reads a compact result instead of three raw payloads.

3. Retrieve the answer, not the archive

For large sources such as a mailbox, fetching everything and filtering in the prompt is the most expensive path. A connector like iGPT answers from an index instead, returning only the relevant context with citations, in one request.

4. Say what you know

The date, the user’s role, the goal of the task: facts the model cannot discover belong in the instructions or input. They are cheap, and they prevent wrong turns.

A quick audit for your agent

  • Which tools did the model never call in the last hundred requests? Drop them from those requests.
  • Which tool results are longer than the answer they produced? Shape them with a workflow.
  • Which questions does the model get wrong for lack of a fact you know? Put that fact in the instructions.

Where Agent200 helps

Per-request tool lists, workflows with defined outputs and premium connectors that answer from an index all serve the same purpose: fewer tokens spent reading, more spent reasoning. Read more about workflows and iGPT.

Stacks of envelopes being organised into an index card cabinet with green tabs
Product

iGPT: your agent’s email context in one request

iGPT is a premium connector on Agent200. It indexes your users' email, threads and attachments, and answers your agent with cited, structured context in…

1 min read

Five frosted glass lenses of different shapes in a row, one with a green edge
Guides

Choosing a web search API for your agent

Tavily, Exa, Brave Search, Perplexity and Firecrawl each lean toward a different part of search. How to pick for your agent, and why you…

2 min read

200 OK

Build the agent.
Access everything it needs.

Bring the agent you already have. Agent200 provides and executes its external capabilities.

Book a demo.
See it in action.

Tell us who you are, then pick a time for a 1:1 session with an expert from our team.

We use your details only to email you about Agent200. See the Privacy Policy.

Pick a time. We'll take it from there.

A 1:1 session with an expert from our team, about what you are building.

Open in Calendly (opens in a new tab)