Code

cookbook/tools/google_calendar_tools.py
from agno.agent import Agent
from agno.tools.google_calendar import GoogleCalendarTools

agent = Agent(
    tools=[GoogleCalendarTools()],
    show_tool_calls=True,
    markdown=True,
)

agent.print_response("What events do I have today?")
agent.print_response("Schedule a meeting with John tomorrow at 2pm")

Usage

1

Create a virtual environment

Open the Terminal and create a python virtual environment.

python3 -m venv .venv
source .venv/bin/activate
2

Set your API key

export OPENAI_API_KEY=xxx
3

Set up Google Calendar credentials

export GOOGLE_CALENDAR_CREDENTIALS=path/to/credentials.json
4

Install libraries

pip install -U google-auth-oauthlib google-auth-httplib2 google-api-python-client openai agno
5

Run Agent

python cookbook/tools/google_calendar_tools.py