npm.io
0.4.0 • Published 3 weeks ago

agentmail-toolkit

Licence
MIT
Version
0.4.0
Deps
4
Size
481 kB
Vulns
0
Weekly
0
Stars
79

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(),
})