Mail backends

From BuilderIO/agent-native · View interactive version

Mail backends is an AI agent skill from the GitHub repository BuilderIO/agent-native. How Mail actions pick between the real Gmail API and synthetic local-emails fallback data per user. Use when mail data looks fake or empty, when a user has no connected Google account, or before claiming a message really was sent or fetched from Gmail.

How to use this skill

Skill file

Mail Backends

Rule

Two mail backends, chosen automatically per user. When the user has a

connected Google account (isConnected(ownerEmail)), actions call the real

Gmail API. When no account is connected, the same actions fall back

transparently to synthetic local-emails data stored via getUserSetting /

putUserSetting. Never assume Gmail is connected — actions like

search-emails, list-emails, get-thread, get-email, and move-email

branch on this internally, so call them the same way either way.

Why it matters

The fallback exists so the app is usable and demoable without OAuth. It is not

a queue that later flushes to Gmail. If you are in fallback mode, do not tell

the user that mail left their real inbox or that a real Gmail record changed —

say the data is local demo state.

Related Skills

"Sent" item written to local-emails.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.