@tpmjs/tools-agentmail
Get details of a specific email inbox by its inbox ID.
Test @tpmjs/tools-agentmail (getInbox) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-agentmailpnpm add @tpmjs/tools-agentmailyarn add @tpmjs/tools-agentmailbun add @tpmjs/tools-agentmaildeno add npm:@tpmjs/tools-agentmailimport { getInbox } from '@tpmjs/tools-agentmail';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { getInbox } from '@tpmjs/tools-agentmail';
const result = await generateText({
model: openai('gpt-4o'),
tools: { getInbox },
prompt: 'Your prompt here...',
});
console.log(result.text);(inbox_id: string) => Promise<unknown>Available configuration options
inbox_idstringThe inbox ID to retrieve.
Schema extracted: 3/1/2026, 4:25:03 AM
AgentMail API tools for AI agents — create inboxes, send/receive emails, manage threads, drafts, and more.
npm install @tpmjs/tools-agentmail
Set the AGENTMAIL_API_KEY environment variable. Get your API key from AgentMail Dashboard.
export AGENTMAIL_API_KEY=your_api_key_here
import { createInbox, sendMessage, listMessages } from '@tpmjs/tools-agentmail'; // Create a new inbox for your AI agent const inbox = await createInbox.execute({ username: 'my-agent', display_name: 'My AI Agent', }); // Send an email const message = await sendMessage.execute({ inbox_id: inbox.inbox_id, to: 'recipient@example.com', subject: 'Hello from AI', text: 'This is an automated message from my AI agent.', }); // List received messages const messages = await listMessages.execute({ inbox_id: inbox.inbox_id, limit: 20, });
| Tool | Description |
|---|---|
| createInbox | Create a new email inbox with optional custom username and domain |
| listInboxes | List all email inboxes with pagination support |
| getInbox | Get details of a specific inbox by ID |
| deleteInbox | Delete an inbox and all its messages permanently |
| sendMessage | Send an email message with subject and body |
| replyToMessage | Reply to an existing email in a thread |
| listMessages | List email messages in an inbox with pagination |
| getMessage | Get full details of a specific message |
| listThreads | List email threads, optionally filtered by labels |
| getThread | Get a thread with all its messages |
| createDraft | Create an email draft for approval before sending |
| sendDraft | Send a previously created draft |
For detailed API documentation, visit AgentMail API Docs.
MIT
Downloads/month
97
GitHub Stars
15
Quality Score