ToolsIntegrations
gmail
Gmail API — list messages, send email. For inbox-triage agents + notification flows.
import { gmail } from '@agentskit/tools'
const runtime = createRuntime({
adapter,
tools: [...gmail({ accessToken: process.env.GMAIL_ACCESS_TOKEN! })],
})#Sub-tools
| Name | Purpose |
|---|---|
gmailListMessages | Query inbox (supports q filter syntax) |
gmailSendEmail | Compose + send a plain-text or HTML email |
Bundled: gmail(config).
#Config
type GmailConfig = {
accessToken: string // OAuth access token (refresh on your side)
fetch?: typeof fetch
}#Example — inbox triage
const runtime = createRuntime({
adapter,
systemPrompt: 'Label, categorize, and draft replies for unread emails. Never send without HITL approval.',
tools: [
...gmail({ accessToken }),
hitlTool, // require approval before gmailSendEmail
],
})#Credentials
- OAuth 2.0 required — Gmail has no long-lived API keys.
- Scopes:
gmail.readonly+gmail.send. - Handle token refresh in your app — this tool accepts short-lived access tokens.
#Safety
Always gate gmailSendEmail behind HITL approval. Accidental mass-send is hard to undo.
#Related
- Integrations overview · googleCalendar — same OAuth dance.
- HITL approvals.
Explore nearby
- PeerIntegrations
20+ ready-made connectors for the services agents actually need. Each follows the same contract — install, config, execute — and ships granular sub-tools alongside a bundled set.
- Peergithub
GitHub REST v3 — search issues, create issues, comment. Pairs with HITL for ship-gating bots.
- PeergithubActions
GitHub Actions — list runs and trigger workflow_dispatch events.