adk-docs icon indicating copy to clipboard operation
adk-docs copied to clipboard

My kingdom for a built in tool example like CalendarToolSet for google calendar.

Open jeffbryner opened this issue 5 months ago • 2 comments

Is your feature request related to a problem? Please describe.

There are no working examples for the built in oauth google tools like calendar, drive, etc.

Describe the solution you'd like

Even gemini would love a simple example of how to use the built in tools like CalendarToolSet

Describe alternatives you've considered

I tried asking gemin, but it invented apis.

Additional context

Some examples of built in tools exist, just not for built in oauth/google workspace tools.

jeffbryner avatar Jul 03 '25 21:07 jeffbryner

I've tried adkweb with some simple examples, but no joy:

from google.adk.agents import Agent
from google.adk.tools.google_api_tool import CalendarToolset

oauth_client_id="<secret from somewhere>"
oauth_client_secret="<secret from somewhere>"

calendar_tool_set = CalendarToolset(
    client_id=oauth_client_id, client_secret=oauth_client_secret
)
root_agent = Agent(
    model="gemini-2.5-pro",
    name="calendar_agent",
    instruction="You are an expert scheduler with access to Google Calendar.",
    tools=[calendar_tool_set],
)

It does go as far as requesting authorization, but does not offer a URI or other means to obtain it.

jeffbryner avatar Jul 03 '25 21:07 jeffbryner

Thanks for opening this issue and letting us know which code examples would be useful for you. We're definitely working on creating and exposing more code samples and patterns like this in the ADK docs.

In the meantime, this OAuth calendar agent code sample in the adk-python repo should help demonstrate how to use ADK with the Google Calendar API & OAuth:

https://github.com/google/adk-python/blob/main/contributing/samples/oauth_calendar_agent/agent.py

koverholt avatar Sep 23 '25 20:09 koverholt