The shell, whether bash or zsh, does not have access to the terminal scroll back buffer. While ag was running, output from it goes direct to the terminal and can't be intercepted by the shell.
Depending on what your terminal is, it may be possible to capture the contents of the scroll-back buffer. rxvt-unicode can be induced to dump it to a temporary file with the escape sequence '\e[0i'. For tmux, you can use
tmux -q capture-pane \; save-buffer -b 0 $TMPFILE \; delete-buffer -b 0. And screen can do
screen -X hardcopy $TMPFILE. However, all these solutions will only work from a local zsh session. As soon as you use ssh or similar, the temporary files won't be on the same system as zsh.
These temporary files can be used for a custom completion widget. I have such a widget but it is a bit too long to paste in here.