Add email sending, reading, and management to Rivet's visual agent builder — with full oversight controls and real-time debugging of every email action.
Rivet is a visual AI agent builder by Ironclad that lets you design, test, and debug complex AI workflows through a node-based graph editor. By integrating MultiMail, your Rivet graphs gain email capabilities that include sending, reading, replying, and managing contacts — all visible in Rivet's real-time execution debugger.
MultiMail's oversight modes pair naturally with Rivet's debugging philosophy. You can see exactly how your agent decided to compose an email, then review it in MultiMail's gated_send queue before delivery. This end-to-end visibility from agent reasoning to email delivery makes building trustworthy email agents straightforward.
Connect Rivet to MultiMail using HTTP Request nodes that call the REST API, or build custom Rivet plugins that wrap MultiMail endpoints for reusable email nodes in your graphs.
Rivet's execution visualizer shows agent decision-making in real time. Combined with MultiMail's audit log, you get complete traceability from the moment an agent decides to send an email through to delivery.
Start your Rivet email workflows in gated_send mode where every email is queued for human approval. As you refine and debug the graph, progressively relax oversight to monitored or autonomous mode.
Rivet's plugin system lets you wrap MultiMail API calls into reusable nodes. Create custom send_email, check_inbox, and reply_email nodes that appear natively in Rivet's node palette.
Rivet's dataset feature lets you test email workflows against multiple scenarios. Feed different email contexts through your graph and verify the agent composes appropriate responses before going live.
import * as rivet from '@ironclad/rivet-node';
"cm">// In your Rivet graph, use an HTTP Call node with:
const httpCallConfig = {
url: 'https://api.multimail.dev/v1/send',
method: 'POST',
headers: {
'Authorization': 'Bearer mm_live_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
mailbox_id: '{{mailbox_id}}',
to: '{{recipient}}',
subject: '{{subject}}',
body: '{{email_body}}'
})
};Configure a Rivet HTTP Request node to send email through the MultiMail API.
import type { RivetPlugin, RivetPluginInitializer } from '@ironclad/rivet-node';
const MULTIMAIL_API = 'https://api.multimail.dev/v1';
const multiMailPlugin: RivetPluginInitializer = (rivet) => {
const sendEmailNode = rivet.pluginNodeDefinition({
id: 'multimail-send',
name: 'MultiMail Send Email',
inputs: {
mailbox_id: { type: 'string', required: true },
to: { type: 'string', required: true },
subject: { type: 'string', required: true },
body: { type: 'string', required: true }
},
outputs: {
result: { type: 'object' }
},
async process(inputs, context) {
const resp = await fetch(`${MULTIMAIL_API}/send`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${context.settings.multimailApiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(inputs)
});
return { result: await resp.json() };
}
});
return { register: (reg) => reg.registerNode(sendEmailNode) };
};
export default multiMailPlugin;Build a Rivet plugin that exposes MultiMail tools as native graph nodes.
import * as rivet from '@ironclad/rivet-node';
import { readFile } from 'fs/promises';
const MULTIMAIL_API = 'https://api.multimail.dev/v1';
const API_KEY = 'mm_live_your_api_key';
async function runEmailGraph() {
const project = await readFile('./email-agent.rivet-project', 'utf-8');
const result = await rivet.runGraphInFile(
'./email-agent.rivet-project',
{
graph: 'Email Handler',
inputs: {
user_request: {
type: 'string',
value: 'Check my inbox and summarize unread messages'
}
},
externalFunctions: {
check_inbox: async (mailbox_id: string) => {
const resp = await fetch(
`${MULTIMAIL_API}/mailboxes/${mailbox_id}/inbox`,
{ headers: { 'Authorization': `Bearer ${API_KEY}` } }
);
return JSON.stringify(await resp.json());
}
}
}
);
console.log('Agent output:', result);
}
runEmailGraph();Execute a Rivet graph programmatically that includes MultiMail email nodes.
Sign up at multimail.dev, create a mailbox, and generate an API key from your dashboard. Your key will start with mm_live_.
Download the Rivet desktop application or install the Node.js SDK for programmatic graph execution.
npm install @ironclad/rivet-nodeIn your Rivet graph, add HTTP Call nodes pointed at MultiMail API endpoints. Set the Authorization header to your API key and configure request bodies for send, inbox, and reply operations.
Run your graph in Rivet's visual debugger to see each node's execution in real time. Verify that email API calls return the expected responses and that the agent's reasoning is sound.
If your mailbox uses gated_send mode (the default), review and approve pending emails in the MultiMail dashboard before they are delivered.
Email infrastructure built for AI agents. Verifiable identity, graduated oversight, and a 38-tool MCP server. Formally verified in Lean 4.