Developer Tools

SDKs & Libraries

Official client libraries for integrating AgentEmail into your application. All SDKs are open-source and type-safe.

code_blocks

Python

agentemail

v1.2.0
javascript

Node.js

@agentemail/sdk

v1.1.0
terminal

Go

go-agentemail

v0.9.0

Python

Requires Python 3.8+. Async support included.

Installation

pip
pip install agentemail

Quick Example

Python
from agentemail import AgentEmail

client = AgentEmail(api_key="ak_your_api_key")

# Create a persistent inbox
inbox = client.inboxes.create(name="my-agent")
print(f"Inbox: {inbox.address}")

# Send an email
client.messages.send(
    from_inbox=inbox.id,
    to="user@example.com",
    subject="Hello from my agent",
    body="This email was sent by an AI agent."
)

# Wait for and read incoming messages
messages = client.messages.list(inbox_id=inbox.id)
for msg in messages:
    print(msg.subject, msg.body_text)

Node.js

Full TypeScript support. Works with Node.js 18+ and modern bundlers.

Installation

npm
npm install @agentemail/sdk

Quick Example

TypeScript
import { AgentEmail } from '@agentemail/sdk';

const client = new AgentEmail({
  apiKey: process.env.AGENTEMAIL_API_KEY
});

// Create inbox and send email
const inbox = await client.inboxes.create({
  name: "support-bot"
});

await client.messages.send({
  fromInbox: inbox.id,
  to: "user@example.com",
  subject: "Welcome",
  body: "Hello from our AI agent!"
});

// Get verification code from latest email
const code = await client.messages.getCode(inbox.id);
console.log(`Verification code: ${code}`);

Go

Idiomatic Go client with context support. Requires Go 1.21+.

Installation

Shell
go get github.com/agentemail/go-agentemail

Quick Example

Go
package main

import (
    "context"
    "fmt"
    agentemail "github.com/agentemail/go-agentemail"
)

func main() {
    client := agentemail.NewClient("ak_your_api_key")
    ctx := context.Background()

    inbox, _ := client.Inboxes.Create(ctx, &agentemail.CreateInboxParams{
        Name: "worker-agent",
    })

    fmt.Printf("Inbox: %s\n", inbox.Address)
}

Using Claude or other MCP-compatible agents?

You don't need an SDK — use our MCP Integration to give your AI agent native email capabilities with zero code.