Skip to content

feat: add Gmail and Calendar context providers - #23

Open
Mustafa-Esoofally wants to merge 1 commit into
agno-agi:mainfrom
Mustafa-Esoofally:feat/agno-google-context-providers
Open

feat: add Gmail and Calendar context providers#23
Mustafa-Esoofally wants to merge 1 commit into
agno-agi:mainfrom
Mustafa-Esoofally:feat/agno-google-context-providers

Conversation

@Mustafa-Esoofally

Copy link
Copy Markdown
Contributor

Summary

  • Add GmailContextProvider and GoogleCalendarContextProvider to Scout's context registry
  • Support both service account and OAuth authentication
  • Include comprehensive test suites for CRUD operations

Changes

scout/contexts.py

  • Import Gmail and Calendar providers from agno 2.6.7
  • Add _create_gmail_provider() factory (requires GOOGLE_DELEGATED_USER for SA mode)
  • Add _create_calendar_provider() factory (works with SA or OAuth)
  • Both providers enable write=True by default

Test Files

  • test_google_context_providers.py — basic status and query tests
  • test_google_comprehensive.py — full CRUD tests (16 passed, 1 skipped)

Test Results

Operation Calendar Gmail
Status
List/Read
Search
Create
Update
Delete
Async -

Notes

  • Gmail OAuth requires ALL scopes (readonly + modify + compose) in one token to avoid read/write toolkit conflicts
  • Calendar delete asks for confirmation before deleting (correct safety behavior)
  • Requires agno >= 2.6.7 for Gmail and Calendar context providers

Test Plan

  • Calendar status check
  • Calendar CRUD operations
  • Gmail status check
  • Gmail CRUD operations
  • Test on AgentOS

- Import GmailContextProvider and GoogleCalendarContextProvider from agno
- Add factory functions supporting both service account and OAuth auth
- Gmail requires GOOGLE_DELEGATED_USER for service account mode
- Calendar works with service account or OAuth
- Both providers enable write=True by default

Test coverage:
- test_google_context_providers.py: basic status and query tests
- test_google_comprehensive.py: full CRUD tests for both providers

Note: Gmail OAuth needs all scopes (readonly + modify + compose) in one
token to avoid read/write toolkit conflicts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant