Toolkits
AgentQL
AgentQLTools enable an Agent to browse and scrape websites using the AgentQL API.
Prerequisites
The following example requires the agentql
library and an API token which can be obtained from AgentQL.
Example
The following agent will open a web browser and scrape all the text from the page.
cookbook/tools/agentql_tools.py
AgentQL will open up a browser instance (don’t close it) and do scraping on the site.
Toolkit Params
Parameter | Type | Default | Description |
---|---|---|---|
api_key | str | None | API key for AgentQL |
scrape | bool | True | Whether to use the scrape text tool |
agentql_query | str | None | Custom AgentQL query |
Toolkit Functions
Function | Description |
---|---|
scrape_website | Used to scrape all text from a web page |
custom_scrape_website | Uses the custom agentql_query to scrape a web page |