Prompt LibraryAgents

Agent Context Injection & Memory Loading Prompt

Decide what to load into context at each agent step.

The prompt

At the current agent step, decide what to inject into the context window from these sources: long-term memory, retrieved docs, prior tool outputs, user instructions.
For each source, state whether to include it now, defer it, or drop it — with a one-line reason.
Constraint: total injected tokens must stay under {{budget}}.

Current step: {{step}}
Available sources:
{{sources}}

Replace the {{fields}} with your own context and tighten the rules to match your domain.

Share this prompt