/install agentql
AgentQL Skill
AgentQL lets you query webpages with natural language to extract structured data and automate browser interactions. It uses Playwright under the hood.
Setup
AgentQL requires an API key. Set it as an environment variable:
export AGENTQL_API_KEY="your-api-key"
Get a free API key at https://dev.agentql.com
Quick Start (Python)
import agentql
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch(headless=True)
page = agentql.wrap(browser.new_page())
page.goto("https://example.com")
# Query with natural language
response = page.query_data("""
{
title
main_heading
description
}
""")
print(response)
browser.close()
Write and Run a Script
# Create a new script template
agentql new-script scraper.py
# Run it
python3 scraper.py
Common Patterns
Extract structured data
response = page.query_data("""
{
products[] {
name
price
rating
}
}
""")
Interact with elements
response = page.query_elements("""
{
search_box
submit_button
}
""")
response.search_box.fill("query")
response.submit_button.click()
Headless scraping
browser = p.chromium.launch(headless=True)
With existing page (connected to running browser)
browser = p.chromium.connect_over_cdp("http://127.0.0.1:9222") # Brave/Chrome
page = agentql.wrap(browser.contexts[0].pages[0])
CLI
agentql doctor # Check setup
agentql new-script # Generate template script
Notes
- API key required: https://dev.agentql.com (free tier available)
- Scripts run via:
python3 script.py - Can connect to the running Brave browser via CDP (port 9222)
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install agentql - After installation, invoke the skill by name or use
/agentql - Provide required inputs per the skill's parameter spec and get structured output
What is Agentql?
Web scraping and browser automation using AgentQL — query any webpage with natural language to extract structured data, interact with elements, and automate... It is an AI Agent Skill for Claude Code / OpenClaw, with 100 downloads so far.
How do I install Agentql?
Run "/install agentql" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Agentql free?
Yes, Agentql is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Agentql support?
Agentql is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Agentql?
It is built and maintained by dhua2020 (@dhua2020); the current version is v1.0.0.