Skip to main content



  • Python 3

Minimum version of Python required is 3.8

It is recommended to setup a virtual environment before installing AgentQL SDK.

AgentQL CLI Installation

If you want a fast setup, you could install the AgentQL library and then use AgentQL CLI to download dependencies and setup AgentQL API Key.

1. Install agentql library

pip install agentql

2. Install dependencies and set API key

The following AgentQL CLI command will prompt you for your API key. When prompted, simply copy and paste your AgentQL API key into the terminal.

agentql init

Manual Installation

If you want a more customized setup, you could follow these steps to manually install AgentQL SDK.

1. Install agentql library

pip install agentql

2. Install playwright driver

The default version of AgentQL Python SDK uses Playwright as a web driver, so Playwright dependencies need to be installed.

playwright install chromium

3. Set your AGENTQL API Key

Set the AGENTQL_API_KEY environment variable with your API key.

To set the environment variable temporarily for your terminal session, in your terminal run

export AGENTQL_API_KEY=your-api-key

Running Your First AgentQL Script

Now you are ready to run your first AgentQL script! Proceed to First Steps to get started.