Module calendarassistant
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/ai1.11.3ballerinax/googleapis.calendar3.2.1
Usage
Initialize the agent with a model provider and a Calendar client:
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
bal build
Import
import danasherniles/calendarassistant;Other versions
0.1.0