Give each agent its own address, read mail as clean threads, check it, and reply in the thread.
coss.inboxes.messages.reply()
// An address of its own.
await ..({
: "support-agent",
: "agent-42",
});
// Score untrusted mail before the agent acts on it.
const { : } = await ..({
: "Please wire the payment today.",
});
// Reply in the thread, once.
await ...(
,
,
{ : },
{ : `reply-${}` },
);support-agent@acme.com
from ada@example.com
- inbox.message.received
- coss.risk.classify()
- coss.inboxes.messages.reply()
- email.delivered
An address per agent
One call creates the inbox, and mail to username+anything@ reaches the same one, so an agent can hand out an address per task.
See howInboxes3 agents
| Address | Client id | Threads |
|---|---|---|
| support-agent@acme.com | agent-42 | 128 |
| billing-agent@acme.com | agent-43 | 61 |
| intake-agent@acme.com | agent-44 | 14 |
Threads ready for a prompt
Messages are grouped into threads, and extracted_text holds only what the sender wrote.
See howRe: Invoice 1042extracted_text
Can you resend the invoice with our new billing address?
On Tuesday, Support Agent wrote:
Your invoice is attached. Thanks!
The sender's own words, ready for a prompt.
coss.risk.classify()
spam0.04
phishing0.91
malware0.01
fraud0.33
Check mail before acting
Email is untrusted input. Score it for spam, phishing, malware and fraud, and your code picks the thresholds.
See howYour coding agent
- npx coss-cli init --agents
- Development key approved in the browser
- coss listen
- Forwarding events to the local handler
Set up by your coding agent
One prompt gets a development key, which works with every API and delivers nothing.
See howLimits
- Thread matching
- headers, or subject within 30 days
- Messages per thread read
- latest 50, oldest first
- Address aliases
- username+anything@
- Content categories
- spam, phishing, malware, fraud
- Text classified
- first 8,000 characters
- Classification time
- up to 3 seconds
- Inboxes on Pro
- 1,000
- Sandbox inboxes
- free, deliver nothing
Questions
Create an inbox with coss.inboxes.create(). Without a domain, the address is at your environment's own subdomain of coss.com's inbound domain and receives mail straight away; on a receiving domain under one of your verified domains, it can also send from live environments.
Each message that arrives sends a signed inbox.message.received webhook. The agent reads the thread with coss.inboxes.threads.get(), where every message has extracted_text (the sender's own words without quoted history or signature), and answers with coss.inboxes.messages.reply(), which threads in the sender's mail client.
Treat every received message as untrusted data, never as instructions. Each message carries a spam verdict, and coss.risk.classify() scores text for spam, phishing, malware and fraud, so your code can decide what the agent never sees or acts on.
Yes. Give it one prompt that points it at coss.com/llms.txt and npx coss-cli init. It reads the docs, asks you to approve a development key in your browser, installs the SDK and tests its code with that key, which never delivers anything.
Yes. coss-mcp runs locally through npx and gives coding agents tools to search the docs, look up emails and SMS, explain why one wasn't delivered, and work with inboxes and webhooks. Its docs tools work without an API key.
Yes. Development keys (coss_test_) work with every API and deliver nothing; sends get simulated outcomes, events and webhooks. Mail sent to a sandbox inbox is still received, so the whole loop can be tested with your own mail client.
The products
One key, one SDK, one log for all of them.
Build it this afternoon.
Development keys record every request and event and deliver nothing.