danasherniles/calendarassistant

0.1.0
CalendarAssistant

A Ballerina AI agent that inspects and schedules Google Calendar events through natural-language queries.

Overview

CalendarAssistantAgent wraps an ai:Agent with an injected Google Calendar client. It exposes two tools to the model:

  • listEventsTool — lists events for a given date.
  • createEventTool — creates an event (title, date, start/end time).

Before creating an event, the agent confirms the title, date, and times.

Requirements

  • Ballerina 2201.13.4 (Swan Lake)
  • ballerina/ai 1.11.3
  • ballerinax/googleapis.calendar 3.2.1

Usage

Initialize the agent with a model provider and a Calendar client:

Copy
ai:ModelProvider model = ...;       // e.g. OpenAI / Anthropic provider
calendar:Client calendarClient = ...; // configured Google Calendar client

CalendarAssistantAgent agent = check new (model, calendarClient);

string reply = check agent.run("What's on my calendar tomorrow?");

calendarId defaults to "primary"; pass a different one to target another calendar.

Build

Copy
bal build

Import

import danasherniles/calendarassistant;Copy

Other versions

0.1.0

Metadata

Released date: 9 days ago

Version: 0.1.0


Compatibility

Platform: any

Ballerina version: 2201.13.4

GraalVM compatible: Yes


Pull count

Total: 1

Current verison: 1


Weekly downloads



Keywords

Type/Agent