Skip to content

Conversation

Avinash-Kamath
Copy link
Contributor

@Avinash-Kamath Avinash-Kamath commented Sep 24, 2025

Add Google ADK support for scalekit agent actions.
sample usage

gmail_tools =  actions.google.get_tools(
    providers = ["GMAIL"],
    identifier="default",
)

root_agent = Agent(
    name="scalekit_agent",
    model="gemini-2.0-flash",
    description=(
        "Agent to answer questions about my emails"
    ),
    instruction=(
        "You are a helpful agent who can answer user questions with the tools provided."
    ),
    tools=gmail_tools,
)

TODO:

  • Add strongly typed compositions, Now There is pattern emerging post adding multiple AI frameworks

@hrishikesh-p
Copy link
Contributor

@coderabbitai review

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Google ADK support for scalekit agent actions, enabling integration with Google AI Development Kit tools alongside existing LangChain support. It refactors framework dependencies to use lazy loading and introduces utilities for tool conversion.

  • Adds Google ADK framework integration with ScalekitGoogleAdkTool wrapper class
  • Refactors framework loading to use properties with lazy initialization and better error handling
  • Introduces shared utilities for tool metadata extraction and MCP tool conversion

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
scalekit/actions/actions.py Converts framework initialization to lazy-loaded properties with import error handling
scalekit/actions/frameworks/google_adk.py New Google ADK integration class for converting Scalekit tools to Google ADK format
scalekit/actions/frameworks/types/google_adk_tool.py ScalekitGoogleAdkTool wrapper class inheriting from Google ADK McpTool
scalekit/actions/frameworks/util.py Shared utilities for tool conversion and metadata extraction
scalekit/actions/frameworks/langchain.py Refactored to use shared utility functions
setup.py Updated dependencies to support MCP and relaxed pydantic version constraint
tests/test_actions.py Added tests for both Google ADK and LangChain tool generation, removed validation test

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

self.assertIsInstance(tools, list)
self.assertGreaterEqual(len(tools), 1)
self.assertIsInstance(tools[0], ScalekitGoogleAdkTool)
print(tools)
Copy link

Copilot AI Sep 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove debug print statement. This should not be present in production test code.

Suggested change
print(tools)

Copilot uses AI. Check for mistakes.

)
self.assertIsInstance(tools, list)
self.assertGreaterEqual(len(tools), 1)
print(tools)
Copy link

Copilot AI Sep 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove debug print statement. This should not be present in production test code.

Suggested change
print(tools)

Copilot uses AI. Check for mistakes.

"pydantic~=2.11.2",
"langchain-core>=0.3.36,<0.4",
"pydantic>=2.10.6",
"mcp>= 1.15.0",
Copy link

Copilot AI Sep 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove extra space before version constraint. Should be 'mcp>=1.15.0'.

Copilot uses AI. Check for mistakes.

f"Original error: {e}"
)

McpTool,AuthCredential,ToolContext = _import_google_adk()
Copy link

Copilot AI Sep 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add spaces after commas in variable assignment. Should be 'McpTool, AuthCredential, ToolContext = _import_google_adk()'.

Copilot uses AI. Check for mistakes.

Comment on lines +51 to +54




Copy link

Copilot AI Sep 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove excessive blank lines. Multiple consecutive empty lines reduce code readability.

Suggested change

Copilot uses AI. Check for mistakes.

from scalekit.actions.frameworks.types.google_adk_tool import (
ScalekitGoogleAdkTool,
)
from scalekit.actions.frameworks.util import build_mcp_tool_from_spec, struct_to_dict
Copy link

Copilot AI Sep 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove extra space before 'build_mcp_tool_from_spec'. Should have single space after 'import'.

Copilot uses AI. Check for mistakes.

@Avinash-Kamath Avinash-Kamath merged commit a9c351a into main Sep 29, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants