Google ADK Workspace Application

Project Goal:

I built an agentic personal productivity assistant using the Google Agent Development Kit (ADK) that integrates multiple tools to manage tasks and priorities. The assistant can check my Google Calendar for scheduling conflicts, create or update events, and coordinate meeting times automatically. It also connects to GitHub via MCP tools, allowing the agent to inspect my repositories and identify current work priorities based on active projects and recent activity. By combining tool-enabled agents with external APIs, the system demonstrates how LLM-driven agents can orchestrate real-world workflows across calendars, development platforms, and productivity tools to streamline planning and task management.

calendar picture

Highlighted Code Sections:


from google.adk.agents import LlmAgent
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StdioConnectionParams
from mcp import StdioServerParameters

 

# Define Agent
    def create_agent() -> LlmAgent:
    """Create the Workspace Assistant agent."""
    from datetime import datetime
    from zoneinfo import ZoneInfo
    
    settings = Settings()
    if not settings.validate():
        raise ValueError("Configuration validation failed. Check your settings.")
    model = settings.model_name
    # settings includes the model name
    name = "workspace_assistant"
    description = """Provide calendar and task management assistance. You can list upcoming events, check for conflicts, and create events.""" 

    # Get today's date in the user's timezone
    local_tz = ZoneInfo(settings.timezone)
    today = datetime.now(local_tz).strftime("%A, %B %d, %Y")
    git_username = settings.githubusername
    
    instruction = (
        "You are a Google Workspace assistant that helps users manage their calendars and tasks. "
        f"Today's date is {today}."
        "Use the provided tools to list upcoming events, create events, and detect overlapping meetings. "
        "Use create_event to add new events to the calander. When creating events, ensure times are interpreted in the user's configured timezone."
        f"Use list_upcoming_events to list what events are on the calendar. When asked for upcoming events, provide a short list of events, starting with those on {today} and then looking a few weeks ahead. Dont show past events unless the user specifically asks for them. "
        "Use check_conflicts to find scheduling conflicts or overlapping events. "
        "Use mcp tools to interact with GitHub if the user asks for it. Only use MCP tools if the user query is related to GitHub or repositories. "
        f"When the user asks to questions about their own repositories, examine the user {git_username}"
        
        "Always use the tools when relevant, and provide clear responses to the user."
    )

    # Wrap raw functions (from calendar_tools) into FunctionTool instances if needed
    tools = []
    for t in calendar_tools:
        if hasattr(t, 'func') or isinstance(t, FunctionTool):
            # already a FunctionTool wrapper or has .func attribute
            tools.append(t if isinstance(t, FunctionTool) else FunctionTool(t))
        else:
            # raw function -> wrap
            tools.append(FunctionTool(t))

    # MCP toolset 
    try:
        for t in mcp_tools:
            tools.append(t)
    except Exception as e:
        # environment may not be configured yet; ignore gracefully
        if settings.debug_mode:
            print(f"MCP toolset not added: {e}")
    
    root = LlmAgent(
        name=name,
        model=model,
        description=description,
        instruction=instruction,
        tools=tools,
    )
    return RunnableAgent(root)