CtrlK
BlogDocsLog inGet started
Tessl Logo

markusdowne/agentmail

Give AI agents their own email inboxes using the AgentMail API. Use when building email agents, sending/receiving emails programmatically, managing inboxes, handling attachments, organizing with labels, creating drafts for human approval, or setting up real-time notifications via webhooks/websockets. Supports multi-tenant isolation with pods.

95

1.07x
Quality

93%

Does it follow best practices?

Impact

100%

1.07x

Average score across 4 eval scenarios

SecuritybySnyk

Advisory

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-4/

Read-Only Inbox Census With Explicit Alias Mapping

Problem/Feature Description

You need the smallest truthful Node.js workflow for a read-only AgentMail inbox census.

The environment contract is slightly awkward:

  • AGENTMAIL_API_KEY is still the default supported credential variable
  • a nearby AGENTMAIL_KEY may exist on the machine
  • you must not silently auto-alias AGENTMAIL_KEY
  • if and only if the task explicitly opts in, it is acceptable to map a proven AGENTMAIL_KEY into the SDK apiKey field while saying that mapping out loud

The goal is to write a script that keeps this boundary honest while doing one bounded live-style read-only operation.

Output Specification

Write a single Node script named inbox_census.js that:

  1. Imports the official AgentMail SDK from agentmail
  2. Prefers AGENTMAIL_API_KEY as the default credential source
  3. Does not silently fall back to AGENTMAIL_KEY
  4. Allows explicit alias mapping only when an opt-in flag is present via --allow-agentmail-key-alias
  5. Initializes the AgentMail client with the chosen credential
  6. Performs exactly one read-only inbox census call using client.inboxes.list()
  7. Prints a truthful result that includes the inbox count
  8. Handles the empty-account case honestly rather than treating zero inboxes as an error
  9. Makes no write/create/send/delete calls

If neither a direct AGENTMAIL_API_KEY nor an explicitly allowed alias path is available, the script should fail clearly and non-optimistically.

Do not write tests or extra files.

evals

SKILL.md

tile.json