LangChain explains how agents should retrieve context before the context window fills up
AILangChain says agents with limited context windows waste tokens and time on inefficient searches, and that Deep Agents' built-in glob and grep tools help by checking file names and keywords before loading content. For meaning-based lookups, it recommends adding a retrieval tool backed by a vector store, and it says research agents should decide when to search through agentic retrieval rather than a single up-front search.
Source details
LangChain Blog · langchain.comPublished · added here
Original title: Context Engineering Starts with Retrieval