Protect your LLM's context window by delegating to subagents
I have previously talked about why you should keep your large language model's context window as small as possible in The importance of looking after your LLM's context window. One of the main ways to do this is by delegating work away from it via subagents.
To do this you can simply ask your agent to delegate a task to one. It can be as simple as:
Create a subagent and ask the following:
> What is one plus two?
Get the response and output it here.The task in the example above is trivial. However, if the task had been more complicated - such as doing a competition analysis - and you had attempted to do it in the current agent, it could significantly fill the context window up, making it less capable going forward. But in contrast, delegating the work to a subagent and cherry-picking the results keeps your current context window light and able to carry on working more effectively a lot longer than it would have otherwise.