Available services
Google Tasks
Full task management — list, add, complete, update, and delete tasks via CLI or agent.
Google Calendar
Event management — list, show, add, update, and delete calendar events via CLI or agent.
Gmail
Read-only email access — list and read messages via CLI or the gmail-reader subagent.
How it works
All Google services share a single OAuth2 credential managed bygoogle/auth.py. The module requests three scopes during the
initial consent flow:
| Scope | Service | Access level |
|---|---|---|
https://www.googleapis.com/auth/tasks | Google Tasks | Read/write |
https://www.googleapis.com/auth/calendar.events | Google Calendar | Read/write |
https://www.googleapis.com/auth/gmail.readonly | Gmail | Read-only |
get_credentials()— loads cached credentials from~/.ollim-bot/state/token.json, refreshes expired tokens automatically, or starts a new browser-based consent flow on first run.get_service(api, version)— builds a Google API client for any service using the shared credentials. Each service module calls this with its API name and version (e.g.,get_service("tasks", "v1")).
On first run, the OAuth flow opens a browser window bound to
127.0.0.1 for consent. After granting access, the token is
cached at ~/.ollim-bot/state/token.json and refreshed automatically.Credential files
| File | Path | Purpose |
|---|---|---|
| OAuth client credentials | ~/.ollim-bot/state/credentials.json | Downloaded from Google Cloud Console |
| Cached token | ~/.ollim-bot/state/token.json | Auto-generated after first OAuth consent |
Adding a new scope
To integrate an additional Google service:- Add the new scope to the
SCOPESlist ingoogle/auth.py. - Create a new module in
google/with CLI handlers and any helper functions. - Delete
~/.ollim-bot/state/token.jsonso the next run prompts for consent with the expanded scopes. - Add commands to the system prompt so the agent knows about the new service.
