A favicon of AgentMail

AgentMail

The TypeScript SDK for AgentMail, an email inbox API that gives AI agents their own addresses, threads and attachments.

Screenshot of AgentMail websiteVisit AgentMail

AgentMail gives an AI agent its own email address the way Gmail gives one to a person, and this repository is the TypeScript library for working with it. Generated with Fern and published to npm, it is how a Node, Bun or Deno agent creates inboxes and handles the mail that arrives in them.

Usage starts with a client holding an API key, after which every call is typed end to end. Every request and response type is exported as an interface, and subpackage imports let a bundler tree-shake down to only the clients an application actually touches.

The client also absorbs the operational details a network call brings with it.

  • Retries: requests retry with exponential backoff on 408, 429 and 5xx responses, twice by default.
  • Timeouts: the sixty second default can be overridden per request.
  • Errors: a failed call throws a typed error carrying the status code, message, body and raw response.
  • Binary responses: a download such as a domain zone file can be read as a stream, array buffer, blob or byte array.
  • Environments: the client can be pointed at a named environment instead of a fixed host.
  • Request options: extra headers, query parameters, a custom fetch and request cancellation are all supported.

The service behind the library covers threads and replies, attachments, real-time events, custom domains, multi-tenancy and semantic search, with an MCP server alongside the SDKs. It is hosted rather than self-hosted, so this package suits developers whose agents must send and receive mail without running a mail stack.

Share:
Details:

Auto-fetched from GitHub .

Ad

 

 
 
 
 

Open source alternatives similar to AgentMail:

 

 
 
  • Stars


  • Forks


  • Last commit


 

 
 
  • Stars


  • Forks


  • Last commit


 

 
 
  • Stars


  • Forks


  • Last commit