
MailPet
Tames your inbox, wherever it lives.
// What it does
Meet MailPet
MailPet sits beside your mailbox and does the boring part of email. It works with any standard mail stack — IMAP/SMTP, Exchange, Gmail and more — sorting and labeling incoming mail, drafting replies you can send in one click, and applying your organization's policies before anything goes out.
It also guards your calendar — proposing conflict-free slots and prepping you for what's next.
Sorts, labels, and prioritizes mail as it arrives.
Writes reply drafts grounded in the thread.
Enforces compliance rules before mail leaves.
// Connect via API
Wire MailPet into your stack
MailPet is a pet you talk to. Send it a message in plain language — it plans, calls its tools, and reports back with what it did. Every pet shares the same API; you just change the pet in the path.
All requests require a secret API key, sent as a bearer token. Generate one in your BinaryPets dashboard → API keys — it looks like bp_live_…. Keep it server-side and rotate it regularly; never ship it in client code.
Authorization: Bearer bp_live_xxxxxxxxxxxxxxxx
Base URL: https://api.binarypets.com/v1Create an API key in the dashboard.
Send MailPet a message — it calls its tools.
Wire the response into your product.
Endpoints
/pets/mailpet/messagesSend the pet a message — it replies and may call tools./pets/mailpet/sessionsOpen a stateful session so the pet remembers the thread./pets/mailpet/runs/{run_id}Poll a long-running task and read the tools it called.Tools MailPet can call
inbox_triageSorts, labels, and prioritizes mail as it arrives.
smart_draftWrites reply drafts grounded in the thread.
policy_guardEnforces compliance rules before mail leaves.
Want tokens as they arrive? Add "stream": true to the request and read the reply as server-sent events.
Example conversation
curl https://api.binarypets.com/v1/pets/mailpet/messages \
-H "Authorization: Bearer $BINARYPETS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{ "role": "user",
"content": "Triage my inbox and draft replies to anything urgent." }
]
}'{
"id": "msg_mailpet_d33a1",
"pet": "mailpet",
"role": "assistant",
"content": "Triaged 50 messages — 4 were urgent. I drafted replies for all 4; they're waiting in your drafts.",
"actions": [
{
"tool": "inbox_triage",
"input": { "mailbox": "[email protected]", "limit": 50 },
"result": { "urgent": 4, "auto_labeled": 41, "needs_human": 5 }
},
{
"tool": "smart_draft",
"input": { "count": 4 },
"result": { "drafts_ready": 4 }
}
],
"session_id": "sess_p20ze",
"stop_reason": "end_turn",
"usage": { "input_tokens": 36, "output_tokens": 104 }
}Ready to adopt MailPet?
We'll set it up, connect your accounts, and tune it to your workflow.
Hire a Trainer