Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 801 Bytes

File metadata and controls

34 lines (24 loc) · 801 Bytes

AgentMail Toolkit

The AgentMail Toolkit integrates popular agent frameworks and protocols including OpenAI Agents SDK, Vercel AI SDK, and Model Context Protocol (MCP) with the AgentMail API.

Setup

Get your API key from AgentMail

Installation

npm install agentmail-toolkit

Configuration

export AGENTMAIL_API_KEY=your-api-key

Usage

import { openai } from '@ai-sdk/openai'
import { AgentMailToolkit } from 'agentmail-toolkit/ai-sdk'
import { streamText } from 'ai'

const result = streamText({
    model: openai('gpt-4o'),
    messages,
    system: 'You are an email agent created by AgentMail that can create and manage inboxes as well as send and receive emails.',
    tools: new AgentMailToolkit().getTools(),
})