Skip to content

Commit 25c3438

Browse files
MQ37TC-MO
andauthored
docs: add google adk integration (#2129)
This PR introduces the Google ADK integration based on https://google.github.io/adk-docs/tools/third-party/apify/ closes apify/ai-team#125 <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Add a new Google ADK integration doc with a step-by-step example using Apify MCP tools and run instructions. > > - **Docs**: > - Add new integration guide `sources/platform/integrations/ai/google-adk.md`. > - Overview of Google ADK and how to use Apify tools via the MCP server. > - Prerequisites (Apify API token, `pip install google-adk`). > - Example agent setup using `McpToolset` with `StreamableHTTPServerParams` targeting `compass/crawler-google-places`. > - Run instructions (`adk web`, `adk run`) and sample prompt. > - Resource links to Apify and Google ADK docs. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 40bc8f2. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Michał Olender <92638966+TC-MO@users.noreply.github.com>
1 parent 082cac0 commit 25c3438

File tree

1 file changed

+102
-0
lines changed

1 file changed

+102
-0
lines changed
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
title: Google ADK integration
3+
sidebar_label: Google ADK
4+
description: Learn how to integrate Apify Actors as tools for AI with Google Agent Development Kit (ADK).
5+
sidebar_position: 2
6+
slug: /integrations/google-adk
7+
---
8+
9+
**Learn how to integrate Apify Actors as tools for AI with Agent Development Kit (ADK).**
10+
11+
---
12+
13+
## What is the Google ADK
14+
15+
[Google Agent Development Kit](https://github.com/google/adk-python) is a framework for developing and deploying AI agents.
16+
17+
:::note Explore Google ADK
18+
19+
For more details, check out [Google ADK documentation](https://google.github.io/adk-docs/).
20+
21+
:::
22+
23+
## How to use Apify with Google ADK
24+
25+
Apify is a marketplace of web scraping and automation tools, AI agents, and MCP servers that you can integrate with your AI agents. This guide shows how to use Apify tools with an AI agent built with Google ADK.
26+
27+
28+
### Prerequisites
29+
30+
- _Apify API token_: To use Apify Actors in Google ADK, you need an Apify API token. To obtain your token, check [Apify documentation](/platform/integrations/api#api-token).
31+
- _Python packages_: Install the following Python packages:
32+
33+
```bash
34+
pip install google-adk
35+
```
36+
37+
### Build a pub search AI agent
38+
39+
First, create an agent project:
40+
41+
```bash
42+
adk create pub_search_agent
43+
```
44+
45+
Create and configure the agent to use the Apify MCP server tools:
46+
47+
:::warning Set your API token
48+
49+
Make sure to set the `APIFY_TOKEN` environment variable in the `.env` file with your Apify API token before running the code.
50+
51+
:::
52+
53+
```python
54+
from google.adk.agents import Agent
55+
from google.adk.tools.mcp_tool import McpToolset
56+
from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPServerParams
57+
import os
58+
59+
root_agent = Agent(
60+
model="gemini-2.5-flash",
61+
name="pub_search_agent",
62+
instruction="You are a pub search agent that helps users find a great pub to visit based on their preferences. Use Apify tools to accomplish this.",
63+
tools=[
64+
McpToolset(
65+
connection_params=StreamableHTTPServerParams(
66+
# Configure Apify MCP Server URL with desired tools
67+
url="https://mcp.apify.com?tools=compass/crawler-google-places",
68+
headers={
69+
"Authorization": f"Bearer {os.getenv('APIFY_TOKEN')}",
70+
},
71+
),
72+
)
73+
],
74+
)
75+
```
76+
77+
Run the agent via the web interface:
78+
79+
```bash
80+
adk web
81+
```
82+
83+
Or run the agent via command-line interface:
84+
85+
```bash
86+
adk run pub_search_agent
87+
```
88+
89+
Prompt the agent to find a pub in San Francisco:
90+
91+
```text
92+
Find a pub near the Ferry Building in San Francisco.
93+
```
94+
95+
## Resources
96+
97+
- [Apify Actors](https://docs.apify.com/platform/actors)
98+
- [Google ADK documentation](https://google.github.io/adk-docs/get-started/)
99+
- [What are AI agents?](https://blog.apify.com/what-are-ai-agents/)
100+
- [Apify MCP Server](https://mcp.apify.com)
101+
- [Apify MCP Server documentation](https://docs.apify.com/platform/integrations/mcp)
102+
- [Apify OpenRouter proxy](https://apify.com/apify/openrouter)

0 commit comments

Comments
 (0)