Dynamic data pull to my AI agent in an extension

Hey, how can I dynamically pull data, urls, or anything from an opened webpage and have my AI agent use that as an input?
Just like some of the agents that are already designed for extensions.

Couldn’t find the process to do so myself.

Thanks!