Skip to main content
The @guildai-services/guildai~sendgrid package gives your agents access to the Twilio SendGrid email API through Guild’s SendGrid integration.

Authentication

  • Type: API key
  • Token management: API keys do not expire

Setup

1

Open Credentials

Go to Credentials in Guild.
2

Connect SendGrid

Click SendGrid and paste your SendGrid API key. The key must have Mail Send permission.

Usage

import { sendgridTools } from "@guildai-services/guildai~sendgrid"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  description: "An agent that sends transactional email",
  tools: { ...sendgridTools },
})

Selecting specific tools

Tools are named with the sendgrid_ prefix. Use pick() to include only what your agent needs.
import { sendgridTools } from "@guildai-services/guildai~sendgrid"
import { llmAgent, pick } from "@guildai/agents-sdk"

export default llmAgent({
  description: "An agent that sends email notifications",
  tools: {
    ...pick(sendgridTools, [
      "sendgrid_mail_send",
    ]),
  },
})