Agent Development Kit (ADK) Integration
AgentQL integrates with Google's Agent Development Kit (ADK), allowing you to build powerful agents to navigate the web and extract data from any website.
Agent Development Kit (ADK) is an open-source framework from Google for building and deploying AI agents that can interact with the web, tools, and other APIs using the Model Context Protocol (MCP).
Set up AgentQL with ADK
Before you start, get your Google API key and your AgentQL API key.
- Install the Agent Development Kit:
pip install google-adk- Create a new agent project:
adk create agentql_agent
cd agentql_agentThis generates a project structure with an agent.py file, a .env file for API keys, and other necessary files.
- Configure the environment variables by adding your API keys to the
.envfile in your project:
GOOGLE_API_KEY=<YOUR_GOOGLE_API_KEY>
AGENTQL_API_KEY=<YOUR_AGENTQL_API_KEY>- Set up your agent with AgentQL in your
agent.pyfile:
import os
from google.adk.agents import Agent
from google.adk.tools.mcp_tool.mcp_session_manager import StdioConnectionParams
from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset
from mcp import StdioServerParameters
AGENTQL_API_KEY = os.getenv("AGENTQL_API_KEY")
root_agent = Agent(
model="gemini-2.5-pro",
name="agentql_agent",
instruction="Help users get information from AgentQL",
tools=[
MCPToolset(
connection_params=StdioConnectionParams(
server_params = StdioServerParameters(
command="npx",
args=[
"-y",
"agentql-mcp",
],
env={
"AGENTQL_API_KEY": AGENTQL_API_KEY,
}
),
timeout=300,
),
)
],
)Learn more here on how to use the AgentQL MCP server.
Usage
Running your agent
You can run your agent using either of the following commands:
Command-line interface:
adk run agentql_agentWeb interface:
adk web --port 8000Example prompts
Once your agent is running, use this prompt to test it out:
Return the top 20 news articles from https://news.ycombinator.com/Here are some other examples:
- Extract the list of videos from the page https://www.youtube.com/results?search_query=agentql, every video should have a title, an author name, a number of views and a url to the video. Make sure to exclude ads items. Format this as a markdown table.
- Get this recipe for me: https://www.justonecookbook.com/pressure-cooker-japanese-curry/
Available tools
extract-web-data- Extract structured data from a given 'url', using 'prompt' as a description of actual data and its fields to extract
Your agent will automatically have access to these tools and can use them as needed to complete tasks.
Support
If you have any questions about using AgentQL with ADK:
- Join the AgentQL Discord community
- Check out the ADK documentation
- View the AgentQL MCP server on GitHub
Examples
Here are some example use cases for AgentQL with ADK:
- Market Research Agent - Extract product listings, prices, and reviews from e-commerce sites
- News Aggregator - Collect and summarize articles from multiple news sources
- Job Search Assistant - Scrape job postings and match them to user preferences
- Recipe Collector - Extract recipe details including ingredients and instructions from cooking websites