Skip to docs content
Browse documentation
On this page

Keep agent context lean

Agents load guidance on demand. Keep the entry point tiny and put detail one step away.

Agents load guidance on demand. Keep the entry point tiny, put detail one step away in focused pages, and don't repeat the same rule in several places.

Example

When an agent connects to Minion over MCP, the instructions it gets are about five lines. They say what Minion holds and point at search, which lists every domain when called with an empty query. Everything else loads when a task needs it.

Minion also budgets for clients that cut instructions short:

export const MAX_OVERLAY_CHARS = 4_000
/** Some clients keep only the head of the instructions (Claude Code documents a 2 KB cut). */
export const CLIENT_HEAD_LIMIT_CHARS = 2_048

A test fails if the part an agent must see doesn't fit in that head.

The rules

  • The entry point is a map, not an encyclopedia.
  • Detail lives in focused guides, docs pages or team skills.
  • An agent opens the map, then only the page the task needs.
  • When behavior changes, update the one page that owns it. If you move guidance, leave a short pointer behind.

In your packages

Your organization's instructions overlay and team skills load into every connected agent. Keep the overlay to what every task needs. Put a procedure in a team skill, which agents only load when search matches it. See How Minion works .