Can we just instruct the agents to redirect output streams to files, and then use grep to retrieve the necessary lines?