Cognitive Least Privilege: your agent should know only what it needs
Any information that doesn't serve the agent's job both lowers accuracy and widens the attack surface. Borrow least privilege from security and extend it to what an agent knows.
The Felesh team4 min
One of the oldest principles in information security is giving a user only the access they need to do their job. This principle maps directly to an agent’s context window. We call this cognitive least privilege: an agent should hold only the information essential to its task, and nothing more.
The rule is the one security already uses: each party touches what its job needs, and the agent's context window is one more thing to ration.
Why less is better
This restriction yields two structural advantages. First, accuracy: giving an agent irrelevant information creates noise. The model may weigh that irrelevant data in its reasoning, leading to errors or hallucinations. Second, security: the tighter the data in an agent’s context, the smaller the surface area for information to leak or be abused. The logic of security and the logic of accuracy converge.
The same task with and without one stray line: the extra line leaks into the reply, so the answer drifts off the task.
The boundary between self-knowledge and system-knowledge
A simple distinction helps enforce this: an agent should know about itself, not the system. “Self-knowledge” covers the agent’s identity, its responsibilities, and the rules governing its behaviour. This belongs in the prompt. “System-knowledge” is awareness of other agents, system topology, and data flow. This should be omitted.
Define the agent by the task it does, not by the position it holds in the system. Remove referential phrases like “upstream” and “downstream” from instructions. Ask for output without specifying a destination: instead of “send the result to such-and-such component,” write “return the result.”
A line about the system leaks when a customer asks for it; the same line rewritten as the task leaves nothing to leak.
In practice
Before adding information to the context, ask: does the agent strictly need this to do its job? If no, remove it. Then ask: could this information leak into user-facing output or reveal internal system details? If yes, remove it. Observing this structural discipline improves accuracy while keeping the attack surface small. A focused agent that has command only of its own task will almost always outperform a know-it-all agent.
Two questions, in order, decide every candidate line: does the task need it, and could it reach the user.