Skip to main content

Arcade Integration for Google ADK

Project description

Arcade Integration for OpenAI Agents

License PyPI

Arcade DocumentationToolkitsArcade Python Clienthttps://google.github.io/adk-docs/

agents-arcade

agents-arcade provides an integration between Arcade and the Google ADK Python. This allows you to enhance your AI agents with Arcade's extensive toolkit ecosystem, including tools that reqwuire authorization like Google Mail, Linkedin, X, and more.

Installation

pip install google-adk-arcade

Basic Usage

import asyncio

from arcadepy import AsyncArcade
from dotenv import load_dotenv
from google.adk import Agent, Runner
from google.adk.artifacts import InMemoryArtifactService
from google.adk.sessions import InMemorySessionService
from google.genai import types

from google_adk_arcade.tools import get_arcade_tools

load_dotenv(override=True)


async def main():
    app_name = 'my_app'
    user_id = 'mateo@arcade.dev'
    session_service = InMemorySessionService()
    artifact_service = InMemoryArtifactService()
    client = AsyncArcade()

    google_tools = await get_arcade_tools(client, tools=["Google.ListEmails"])

    # authorize the tools
    for tool in google_tools:
        result = await client.tools.authorize(
            tool_name=tool.name,
            user_id=user_id
        )
        if result.status != "completed":
            print(f"Click this link to authorize {tool.name}:\n{result.url}")
        await client.auth.wait_for_completion(result)

    google_agent = Agent(
        model="gemini-2.0-flash",
        name="google_tool_agent",
        instruction="I can use Google tools to manage an inbox!",
        description="An agent equipped with tools to read Gmail emails. "
                    "Make sure to call google_listemails to read and summarize"
                    " emails",
        tools=google_tools,
    )
    session = await session_service.create_session(
        app_name=app_name, user_id=user_id, state={
            "user_id": user_id,
        }
    )
    runner = Runner(
        app_name=app_name,
        agent=google_agent,
        artifact_service=artifact_service,
        session_service=session_service,
    )

    user_input = "summarize my latest 3 emails"
    content = types.Content(
        role='user', parts=[types.Part.from_text(text=user_input)]
    )
    for event in runner.run(
        user_id=user_id,
        session_id=session.id,
        new_message=content,
    ):
        if event.content.parts and event.content.parts[0].text:
            print(f'** {event.author}: {event.content.parts[0].text}')

if __name__ == '__main__':
    asyncio.run(main())

Key Features

  • Easy Integration: Simple API (one function) to connect Arcade tools with Google ADK
  • Extensive Toolkit Support: Access to all Arcade toolkits including Gmail, Google Drive, Search, and more
  • Asynchronous Support: Built with async/await for compatibility with Google ADK
  • Authentication Handling: Manages authorization for tools requiring user permissions like Google, LinkedIn, etc

Available Toolkits

Arcade provides many toolkits including:

  • Google: Gmail, Google Drive, Google Calendar
  • Search: Google search, Bing search
  • Web: Crawling, scraping, etc
  • Github: Repository operations
  • Slack: Sending messages to Slack
  • LinkedIn: Posting to LinkedIn
  • X: Posting and reading tweets on X
  • And many more

For a complete list, see the Arcade Toolkits documentation.

Authentication

Many Arcade tools require user authentication. The authentication flow is managed by Arcade and can be triggered by providing a user_id in the context when running your agent. Refer to the Arcade documentation for more details on managing tool authentication.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

google_adk_arcade-0.0.2.tar.gz (90.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

google_adk_arcade-0.0.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file google_adk_arcade-0.0.2.tar.gz.

File metadata

  • Download URL: google_adk_arcade-0.0.2.tar.gz
  • Upload date:
  • Size: 90.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for google_adk_arcade-0.0.2.tar.gz
Algorithm Hash digest
SHA256 44404e2c6663857735802a50974fa042cc31f4da6e8c88391af6c7d197c95923
MD5 1481342bf07d5e0026ec7e874d1a564d
BLAKE2b-256 1f584e2d42a9e96ec559a9930dd94a1a659bcfcace0eda5ceb6caa995d529cbe

See more details on using hashes here.

Provenance

The following attestation bundles were made for google_adk_arcade-0.0.2.tar.gz:

Publisher: publish-google-adk-arcade.yml on ArcadeAI/google-adk-arcade

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file google_adk_arcade-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for google_adk_arcade-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5e05d2b70ee70fdc772fad2cf69dab7d3d65a42fe5dd6a0ac0f55f66fcc1fd27
MD5 2a001e010f545241de22e7738647c011
BLAKE2b-256 246aa3a15b697d9d396c6b5df5c96f5353bb9e08c435492592a364d639046f18

See more details on using hashes here.

Provenance

The following attestation bundles were made for google_adk_arcade-0.0.2-py3-none-any.whl:

Publisher: publish-google-adk-arcade.yml on ArcadeAI/google-adk-arcade

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page