Extract 101
Pass instructions and a zod schema toextract()
in order to intelligently collect data from the current page:
Data Chaining
Capturing structured data on its own is helpful. You could save that data to a filesystem, upload it to a database, or pass it off to another process. However, you might want to integrate that data into another web application or trigger additional agent workflows with it. A great way to do this is by using standard control flow based on extracted data, or passingdata
to act
where needed:
Extractable content
extract()
will show the agent:
- A screenshot of the browser window
- A simplified version of the DOM content
- The instructions and schema you provide
zod
- including arrays, composite objects, numbers, strings, etc.
See https://zod.dev/ for more information about zod.