How to connect Agent mail to LlamaIndex in 2 mins: No API key needed

You can give your agent its own email inbox and send, read and reply to email from LlamaIndex, and use custom domains, webhooks and calendars with your own AgentMail key. Each inbox costs $2 a month, paid upfront, which is the whole free $2. After that, reading mail is free and each email you send costs $0.002.

Agent mailInstant · No API key

LlamaIndex runs Agent mail through Composio, and the cost comes out of your free $2.

  • An email inbox for one month$2.00
  • An email sent from your agent's inbox$0.002
  • A reply in the same thread$0.002

$2 ≈ 1 inbox or 1000 emails

Composio Instant

What you can do with your free $2

What your free $2 gets you with Agent mail
When you ask LlamaIndex forLlamaIndex uses this toolCostWhat $2 gets you
An email inbox for one monthCreate Inbox$2.00 per inbox1 inbox
An email sent from your agent's inboxSend Message$0.002 per emailAbout 1,000 emails
A reply in the same threadReply To Message$0.002 per replyAbout 1,000 replies
An email scheduled for laterCreate Draft$0.002 per emailAbout 1,000 emails
A forwarded emailForward Message$0.002 per emailAbout 1,000 emails

You pay Agent mail's price for each call with 0% markup, plus the regular Composio tool call charge. There's no Agent mail subscription, and you only pay for what you use.

27 of 94 Agent mail tools work without a key. For Batch Update Message Labels, Complete File Upload, Create Agent Armor Feedback, Create Calendar Event, Create File, Create Inbox API Key and 61 more, connect your own Agent mail key. Read how Instant works.

How it works

How to connect Agent mail to LlamaIndex

Composio adds Agent mail to LlamaIndex as an Instant toolkit. You connect Composio to LlamaIndex once, and then LlamaIndex can use Agent mail right away. There are two ways to do this:

  • Bring your own key

    You bring your own Agent mail API key, set it up, and use it.

  • Use the Composio wallet

    Instant

    Composio runs each call on its own Agent mail account, so you don't have to set anything up at Agent mail, and your first $2 is free.

You do the setup one time and it takes about a minute. If you build Agent mail into your own product, turn on Instant toolkits in your project settings so your agent can call Agent mail for each of your users without a Agent mail API key, and read Instant tools in the Composio docs for the setup steps and code examples.

Get started

Start to use Agent mail in LlamaIndex in 3 steps

  1. Turn on Instant

    Open your Composio wallet and turn on Instant. Your free $2 shows up there.

  2. Add Composio to LlamaIndex

    Follow the setup below. You only do this once.

  3. Ask LlamaIndex for something

    Try a Agent mail prompt. The cost comes out of your $2.

Setup

Step-by-step Guide

Step by step10 STEPS
1

Prerequisites

Before you begin, make sure you have:
  • Python 3.8/Node 16 or higher installed
  • A Composio account with the API key
  • An OpenAI API key
  • A Agent mail account and project
  • Basic familiarity with async Python/Typescript
2

Getting API Keys for OpenAI, Composio, and Agent mail

OpenAI API key (OPENAI_API_KEY)
  • Go to the OpenAI dashboard
  • Create an API key if you don't have one
  • Assign it to OPENAI_API_KEY in .env
Composio API key and user ID
  • Log into the Composio dashboard
  • Copy your API key from Settings
    • Use this as COMPOSIO_API_KEY
  • Pick a stable user identifier (email or ID)
    • Use this as COMPOSIO_USER_ID
3

Installing dependencies

npm install @composio/llamaindex @llamaindex/openai @llamaindex/tools @llamaindex/workflow dotenv

Create a new Typescript project and install the necessary dependencies:

  • @composio/llamaindex: Composio's LlamaIndex integration
  • @llamaindex/openai: OpenAI LLM integration
  • @llamaindex/tools: MCP client for LlamaIndex
  • @llamaindex/workflow: Workflow framework for LlamaIndex
  • dotenv: Environment variable management
4

Set environment variables

bash
OPENAI_API_KEY=your-openai-api-key
COMPOSIO_API_KEY=your-composio-api-key
COMPOSIO_USER_ID=your-user-id

Create a .env file in your project root:

These credentials will be used to:

  • Authenticate with OpenAI's GPT-5 model
  • Connect to Composio's Tool Router
  • Identify your Composio user session for Agent mail access
5

Import modules

import "dotenv/config";
import readline from "node:readline/promises";
import { stdin as input, stdout as output } from "node:process";

import { Composio } from "@composio/core";

import { mcp } from "@llamaindex/tools";
import { agent as createAgent } from "@llamaindex/workflow";
import { openai } from "@llamaindex/openai";

dotenv.config();

Create a new file called agent mail_llamaindex_agent.ts and import the required modules:

Key imports:

  • dotenv.config loads .env at runtime
  • readline gives us a simple CLI chat loop
  • Composio is the main Composio SDK client
  • mcp connects to an MCP endpoint
  • createAgent builds a LlamaIndex agent
  • openai configures the LLM backend
6

Load environment variables and initialize Composio

const OPENAI_API_KEY = process.env.OPENAI_API_KEY;
const COMPOSIO_API_KEY = process.env.COMPOSIO_API_KEY;
const COMPOSIO_USER_ID = process.env.COMPOSIO_USER_ID;

if (!OPENAI_API_KEY) throw new Error("OPENAI_API_KEY is not set");
if (!COMPOSIO_API_KEY) throw new Error("COMPOSIO_API_KEY is not set");
if (!COMPOSIO_USER_ID) throw new Error("COMPOSIO_USER_ID is not set");

What's happening:

This ensures missing credentials cause early, clear errors before the agent attempts to initialise.

7

Create a Tool Router session and build the agent function

async function buildAgent() {

  console.log(`Initializing Composio client...${COMPOSIO_USER_ID!}...`);
  console.log(`COMPOSIO_USER_ID: ${COMPOSIO_USER_ID!}...`);

  const composio = new Composio({
    apiKey: COMPOSIO_API_KEY,
    provider: new LlamaindexProvider(),
  });

  const session = await composio.create(
    COMPOSIO_USER_ID!,
    {
      toolkits: ["agent_mail"],
    },
  );

  const mcpUrl = session.mcp.url;
  console.log(`Composio Tool Router MCP URL: ${mcpUrl}`);

  const server = mcp({
    url: mcpUrl,
    clientName: "composio_tool_router_with_llamaindex",
    requestInit: {
      headers: {
        "x-api-key": COMPOSIO_API_KEY!,
      },
    },
    // verbose: true,
  });

  const tools = await server.tools();

  const llm = openai({ apiKey: OPENAI_API_KEY, model: "gpt-5" });

  const agent = createAgent({
    name: "composio_tool_router_with_llamaindex",
        description : "An agent that uses Composio Tool Router MCP tools to perform actions.",
    systemPrompt:
      "You are a helpful assistant connected to Composio Tool Router."+
"Use the available tools to answer user queries and perform Agent mail actions." ,
    llm,
    tools,
  });

  return agent;
}

What's happening here:

  • We create a Composio client using your API key and configure it with the LlamaIndex provider
  • We then create a tool router MCP session for your user, specifying the toolkits we want to use (in this case, agent mail)
  • The session returns an MCP HTTP endpoint URL that acts as a gateway to all your configured tools
  • LlamaIndex will connect to this endpoint to dynamically discover and use the available Agent mail tools.
  • The MCP tools are mapped to LlamaIndex-compatible tools and plug them into the Agent.
8

Create an interactive chat loop

async function chatLoop(agent: ReturnType<typeof createAgent>) {
  const rl = readline.createInterface({ input, output });

  console.log("Type 'quit' or 'exit' to stop.");

  while (true) {
    let userInput: string;

    try {
      userInput = (await rl.question("\nYou: ")).trim();
    } catch {
      console.log("\nAgent: Bye!");
      break;
    }

    if (!userInput) {
      continue;
    }

    const lower = userInput.toLowerCase();
    if (lower === "quit" || lower === "exit") {
      console.log("Agent: Bye!");
      break;
    }

    try {
      process.stdout.write("Agent: ");

      const stream = agent.runStream(userInput);
      let finalResult: any = null;

      for await (const event of stream) {
        // The event.data contains the streamed content
        const data: any = event.data;

        // Check for streaming delta content
        if (data?.delta) {
          process.stdout.write(data.delta);
        }

        // Store final result for fallback
        if (data?.result || data?.message) {
          finalResult = data;
        }
      }

      // If no streaming happened, show the final result
      if (finalResult) {
        const answer =
          finalResult.result ??
          finalResult.message?.content ??
          finalResult.message ??
          "";
        if (answer && typeof answer === "string" && !answer.includes("[object")) {
          process.stdout.write(answer);
        }
      }

      console.log(); // New line after streaming completes
    } catch (err: any) {
      console.error("\nAgent error:", err?.message ?? err);
    }
  }

  rl.close();
}

What's happening:

  • We're creating a direct terminal interface to chat with Agent mail
  • The LLM's responses are streamed to the CLI for faster interaction.
  • The agent uses context to maintain conversation history
  • The agent processes the request, selects appropriate Agent mail tools, and returns a result
  • We extract the answer from the result data structure and display it to the user
  • You can type 'quit' or 'exit' to stop the chat loop gracefully
  • Agent responses and any errors are streamed in a clear, readable format
9

Define the main entry point

async function main() {
  try {
    const agent = await buildAgent();
    await chatLoop(agent);
  } catch (err) {
    console.error("Failed to start agent:", err);
    process.exit(1);
  }
}

main();

What's happening here:

  • We're orchestrating the entire application flow
  • The agent gets built with proper error handling
  • Then we kick off the interactive chat loop so you can start talking to Agent mail
10

Run the agent

npx ts-node llamaindex-agent.ts

When prompted, authenticate and authorise your agent with Agent mail, then start asking questions.

Complete Code

Here's the complete code to get you started with Agent mail and LlamaIndex:

import "dotenv/config";
import readline from "node:readline/promises";
import { stdin as input, stdout as output } from "node:process";

import { Composio } from "@composio/core";
import { LlamaindexProvider } from "@composio/llamaindex";

import { mcp } from "@llamaindex/tools";
import { agent as createAgent } from "@llamaindex/workflow";
import { openai } from "@llamaindex/openai";

dotenv.config();

const OPENAI_API_KEY = process.env.OPENAI_API_KEY;
const COMPOSIO_API_KEY = process.env.COMPOSIO_API_KEY;
const COMPOSIO_USER_ID = process.env.COMPOSIO_USER_ID;

if (!OPENAI_API_KEY) {
    throw new Error("OPENAI_API_KEY is not set in the environment");
  }
if (!COMPOSIO_API_KEY) {
    throw new Error("COMPOSIO_API_KEY is not set in the environment");
  }
if (!COMPOSIO_USER_ID) {
    throw new Error("COMPOSIO_USER_ID is not set in the environment");
  }

async function buildAgent() {

  console.log(`Initializing Composio client...${COMPOSIO_USER_ID!}...`);
  console.log(`COMPOSIO_USER_ID: ${COMPOSIO_USER_ID!}...`);

  const composio = new Composio({
    apiKey: COMPOSIO_API_KEY,
    provider: new LlamaindexProvider(),
  });

  const session = await composio.create(
    COMPOSIO_USER_ID!,
    {
      toolkits: ["agent_mail"],
    },
  );

  const mcpUrl = session.mcp.url;
  console.log(`Composio Tool Router MCP URL: ${mcpUrl}`);

  const server = mcp({
    url: mcpUrl,
    clientName: "composio_tool_router_with_llamaindex",
    requestInit: {
      headers: {
        "x-api-key": COMPOSIO_API_KEY!,
      },
    },
    // verbose: true,
  });

  const tools = await server.tools();

  const llm = openai({ apiKey: OPENAI_API_KEY, model: "gpt-5" });

  const agent = createAgent({
    name: "composio_tool_router_with_llamaindex",
    description:
      "An agent that uses Composio Tool Router MCP tools to perform actions.",
    systemPrompt:
      "You are a helpful assistant connected to Composio Tool Router."+
"Use the available tools to answer user queries and perform Agent mail actions." ,
    llm,
    tools,
  });

  return agent;
}

async function chatLoop(agent: ReturnType<typeof createAgent>) {
  const rl = readline.createInterface({ input, output });

  console.log("Type 'quit' or 'exit' to stop.");

  while (true) {
    let userInput: string;

    try {
      userInput = (await rl.question("\nYou: ")).trim();
    } catch {
      console.log("\nAgent: Bye!");
      break;
    }

    if (!userInput) {
      continue;
    }

    const lower = userInput.toLowerCase();
    if (lower === "quit" || lower === "exit") {
      console.log("Agent: Bye!");
      break;
    }

    try {
      process.stdout.write("Agent: ");

      const stream = agent.runStream(userInput);
      let finalResult: any = null;

      for await (const event of stream) {
        // The event.data contains the streamed content
        const data: any = event.data;

        // Check for streaming delta content
        if (data?.delta) {
          process.stdout.write(data.delta);
        }

        // Store final result for fallback
        if (data?.result || data?.message) {
          finalResult = data;
        }
      }

      // If no streaming happened, show the final result
      if (finalResult) {
        const answer =
          finalResult.result ??
          finalResult.message?.content ??
          finalResult.message ??
          "";
        if (answer && typeof answer === "string" && !answer.includes("[object")) {
          process.stdout.write(answer);
        }
      }

      console.log(); // New line after streaming completes
    } catch (err: any) {
      console.error("\nAgent error:", err?.message ?? err);
    }
  }

  rl.close();
}

async function main() {
  try {
    const agent = await buildAgent();
    await chatLoop(agent);
  } catch (err: any) {
    console.error("Failed to start agent:", err?.message ?? err);
    process.exit(1);
  }
}

main();
Try it

Ask LlamaIndex for something with Agent mail

Start a new chat and try this prompt:

Create an email inbox for my agent with the username [name] and the display name [display name], kept for 1 month. Give me the email address.

LlamaIndex runs it on Instant and shows you the result. It doesn't ask you for a Agent mail key, and the cost comes out of your $2. You can see each call in your wallet.

Optional: connect your own Agent mail key

If you want Batch Update Message Labels, Complete File Upload, Create Agent Armor Feedback, Create Calendar Event, Create File, Create Inbox API Key and 61 more, you need your own key. Ask LlamaIndex to connect your Agent mail account, and it gives you a Composio link:

Connect my Agent mail account using Composio.

Open the link, paste your Agent mail API key and click Connect Account. You can get a key from AgentMail Console. After that, Composio uses your key first and doesn't charge Instant for those calls.

Starter prompts

Use your first $2: copy a prompt into LlamaIndex

Each prompt runs on Instant, and the cost next to it is about what it takes from your $2.

  • Give your agent its own email address

    $2 for one month

    Creates a [name]@composio.agentmail.to inbox that your agent can send from and get mail at, paid upfront for one month.

    Create an email inbox for my agent with the username [name] and the display name [display name], kept for 1 month. Give me the email address.

  • Grab a sign-up verification code

    Free with an inbox

    Finds the newest email from a service in your agent's inbox and pulls out the code or confirmation link.

    Check my agent inbox [inbox address] for the newest email from [service] and give me the verification code or confirmation link inside it.

  • Send an email and check for the reply

    Less than $0.01 with an inbox

    Sends an email from your agent's own address and later reads the reply from the same thread.

    From my agent inbox [inbox address], email [recipient email] with the subject "[subject]" and this message: [message]. When I check back later, look in that thread for their reply and tell me what they said.

  • Schedule an email for later

    Less than $0.01 with an inbox

    Writes an email now and sets it to send itself at the time you pick.

    From my agent inbox [inbox address], write an email to [recipient email] reminding them about [event] and schedule it to send on [date] at [time and time zone].

  • Get a summary of this week's emails

    Free with an inbox

    Reads the threads that came into your agent's inbox this week and sums up what still needs a reply.

    Go through the email threads in my agent inbox [inbox address] from the last 7 days. Give me a short summary of each one and flag the ones that still need a reply.

  • Reply to emails waiting on an answer

    About $0.01 with an inbox

    Drafts replies to the newest unanswered emails, shows them to you and sends the ones you approve.

    Find the 5 newest emails in my agent inbox [inbox address] that haven't been answered. Write a reply to each one, show me the replies, and send the ones I approve in the same thread.

  • Prepare an email draft for review

    Free

    Save an unsent message in an existing agent inbox.

    I have an AgentMail inbox with ID [inbox ID]. Draft an email to [recipient email] with the subject [subject] and this message: [message]. Save it as an unscheduled draft and show me the finished text and draft ID.

  • Find a specific email conversation

    Free

    Locate a thread by sender or subject and recap its messages.

    I want you to do this: In my AgentMail inbox [inbox ID], find the conversation with [sender email] about [subject]. Read the matching thread and give me the messages in date order, with who sent each and any unanswered question.

  • Check email activity for a date range

    Free

    See message-event counts for an existing inbox.

    I want you to do this: For my AgentMail inbox [inbox ID], show email-event counts from [start date] to [end date] by day. Summarize the busiest day and the event types that appear in the results.

What it can do

What LlamaIndex can do with Agent mail

Works without a key

  • An email inbox for one month
  • An email sent from your agent's inbox
  • A reply in the same thread
  • An email scheduled for later
  • A forwarded email

Needs your own Agent mail key

  • Batch Update Message Labels
  • Complete File Upload
  • Create Agent Armor Feedback
  • Create Calendar Event
  • Create File
  • Create Inbox API Key
  • Create Inbox in Pod
  • Create Inbox Polling Webhook
  • and 59 more
Tools and prices

Supported tools (94)

Agent mail tools and their Instant prices
ToolWhat it doesWorks without a keyCost on Instant
Batch Get MessagesReturn metadata for up to 500 messages from one inbox in a single request.Yes$0 per request
Create DraftCreate a draft, optionally scheduling its automatic delivery with send_at.Yes$0.002 per email scheduled with send_at
Create InboxCreate a new AgentMail inbox via API.Yes$2 per inbox per month, charged upfront for the months selected
Create PodCreate an AgentMail pod for grouping inboxes and related resources.Yes$0 per request
Delete DraftPermanently delete one unsent draft from an inbox.Yes$0 per request
Delete MessagePermanently delete one message from an inbox.Yes$0 per request
Delete ThreadPermanently delete one AgentMail thread and all of its messages.Yes$0 per request
Extend InboxAdd whole months before an AgentMail inbox deactivates, or reactivate a deactivated inbox for that many months.Yes$2 per inbox per month, charged upfront for the months selected
Forward MessageImmediately forward an existing message to new recipients with optional added content and attachments.Yes$0.002 per email sent
Get DraftRetrieve the complete contents and scheduling details of one draft.Yes$0 per request
Get InboxRetrieve one AgentMail inbox and its metadata by its inbox_id.Yes$0 per request
Get MessageRetrieve an email message from an AgentMail inbox, including sender, recipients, labels, and available subject, body and attachment metadata.Yes$0 per request
Get Message AttachmentGet a temporary download reference for one message attachment.Yes$0 per request
Get Raw MessageGet a temporary download reference for one message's raw RFC 5322 source, including its original headers and MIME structure.Yes$0 per request
Get ThreadRetrieve one AgentMail thread and a paginated page of its messages.Yes$0 per request
List DraftsList unsent drafts in an AgentMail inbox with filters and pagination.Yes$0 per request
List Inbox EventsList label-change events from an AgentMail inbox.Yes$0 per request
List MessagesList messages from an AgentMail inbox.Yes$0 per request
List Pod InboxesList one page of inboxes inside an AgentMail pod, or supply query to search addresses and display names.Yes$0 per request
List ThreadsList conversation threads in an AgentMail inbox with filters.Yes$0 per request
Show all 94 tools
More Agent mail tools and their Instant prices
ToolWhat it doesWorks without a keyCost on Instant
Query Inbox Event MetricsQuery timestamped email-event counts for an AgentMail inbox.Yes$0 per request
Reply To MessageReply to a selected message while preserving its AgentMail thread.Yes$0.002 per email sent
Send DraftImmediately send and consume a draft, optionally changing message labels.Yes$0.002 per email sent
Send MessageImmediately send a new email from an AgentMail inbox with optional HTML, attachments, custom headers, labels, and open tracking.Yes$0.002 per email sent
Update DraftEdit a draft, reschedule delivery with send_at, or cancel a scheduled send with cancel_scheduled_send=true.Yes$0.002 per email scheduled with send_at
Update InboxUpdate an inbox's display name, status, or custom metadata.Yes$0 per request
Update Message LabelsAdd or remove labels from one message in an inbox.Yes$0 per request
Batch Update Message LabelsAtomically add or remove the same labels on up to 50 messages in one inbox.Needs your own keyBilled to your own Agent mail key
Complete File UploadMark a pending Agent Drive file ready after its bytes have been PUT to the presigned URL returned by CREATE_FILE.Needs your own keyBilled to your own Agent mail key
Create Agent Armor FeedbackRecord whether Agent Armor's completed verdict on a message was correct.Needs your own keyBilled to your own Agent mail key
Create Calendar EventCreate a one-off or recurring event on a US-only inbox calendar.Needs your own keyBilled to your own Agent mail key
Create FileInitialize a pending Agent Drive file and return instructions for a direct storage upload.Needs your own keyBilled to your own Agent mail key
Create Inbox API KeyCreate an inbox-scoped bearer key and return its one-time secret.Needs your own keyBilled to your own Agent mail key
Create Inbox in PodCreate an inbox inside an explicitly selected AgentMail pod, optionally choosing its address, initial status, idempotency ID, and metadata.Needs your own keyBilled to your own Agent mail key
Create Inbox Polling WebhookCreate or resume a polling webhook scoped to one inbox.Needs your own keyBilled to your own Agent mail key
Create Inbox WebhookCreate a regular webhook scoped to one AgentMail inbox for a non-empty set of event types.Needs your own keyBilled to your own Agent mail key
Create Allowlist or Blocklist EntryAdd an email address or domain to an organization-wide send, receive, or reply allowlist or blocklist.Needs your own keyBilled to your own Agent mail key
Create Polling WebhookCreate or resume an organization-level polling webhook for a non-empty set of event types, optionally filtered to at most 10 inboxes and pods combined.Needs your own keyBilled to your own Agent mail key
Create WebhookCreate an organization-level webhook for a non-empty set of event types, optionally filtered to at most 10 inboxes and pods combined.Needs your own keyBilled to your own Agent mail key
Delete Calendar EventAccept asynchronous deletion of a US-only calendar event or cancel recurring dates.Needs your own keyBilled to your own Agent mail key
Delete FilePermanently delete a pending or ready Agent Drive file and free its path.Needs your own keyBilled to your own Agent mail key
Delete InboxPermanently delete one inbox by ID.Needs your own keyBilled to your own Agent mail key
Delete Inbox Polling WebhookPermanently delete an inbox-scoped polling webhook by webhook_id or client_id, invalidate its polling token, and free its subscription slot.Needs your own keyBilled to your own Agent mail key
Delete Inbox WebhookPermanently delete a regular webhook created for a selected AgentMail inbox and stop future deliveries.Needs your own keyBilled to your own Agent mail key
Delete Allowlist or Blocklist EntryRemove one email address or domain from an organization-wide send, receive, or reply allowlist or blocklist.Needs your own keyBilled to your own Agent mail key
Delete PodPermanently delete one AgentMail pod by its unique ID.Needs your own keyBilled to your own Agent mail key
Delete Pod InboxPermanently delete an inbox through its explicitly selected AgentMail pod, preserving the pod tenant boundary.Needs your own keyBilled to your own Agent mail key
Delete Polling WebhookPermanently delete an organization-level polling webhook by webhook_id or client_id, invalidate its polling token, and free its subscription slot.Needs your own keyBilled to your own Agent mail key
Delete WebhookPermanently delete an organization-level webhook and stop future deliveries.Needs your own keyBilled to your own Agent mail key
Get AgendaGet one page of non-cancelled calendar dates in a UTC window, expanding recurring events and ordering dates by start time.Needs your own keyBilled to your own Agent mail key
Get API KeyRetrieve API-key metadata without exposing bearer secret values.Needs your own keyBilled to your own Agent mail key
Get CalendarGet an inbox's US-only calendar settings, event count, and ETag.Needs your own keyBilled to your own Agent mail key
Get Calendar EventGet the full current form of a US-only calendar event or recurring-event date, including its opaque ETag for conditional mutations.Needs your own keyBilled to your own Agent mail key
Get Current IdentityReturn the connected AgentMail identity and its organization, pod, or inbox access boundary without exposing the credential itself.Needs your own keyBilled to your own Agent mail key
Get DomainReturn an AgentMail custom domain, its domain and tracking verification statuses, and all required DNS records.Needs your own keyBilled to your own Agent mail key
Get Domain Setup LinkBuild a one-click Domain Connect DNS setup link when supported.Needs your own keyBilled to your own Agent mail key
Get Domain Zone FileDownload the AgentMail-generated DNS zone file for a custom domain as a bounded binary file reference.Needs your own keyBilled to your own Agent mail key
Get Draft AttachmentGet a temporary download reference for one draft attachment.Needs your own keyBilled to your own Agent mail key
Get FileGet Agent Drive file metadata.Needs your own keyBilled to your own Agent mail key
Get Inbox Polling WebhookGet one inbox-scoped polling webhook by webhook_id or client_id.Needs your own keyBilled to your own Agent mail key
Get Inbox WebhookGet one regular webhook created for a selected AgentMail inbox.Needs your own keyBilled to your own Agent mail key
Get Inbox Webhook HeadersList only the names of custom delivery headers on an inbox-scoped regular webhook.Needs your own keyBilled to your own Agent mail key
Get OrganizationReturn the connected AgentMail organization's identifiers, current inbox and domain counts, configured resource limits, and timestamps.Needs your own keyBilled to your own Agent mail key
Get PodRetrieve one AgentMail pod by its unique ID.Needs your own keyBilled to your own Agent mail key
Get Pod InboxGet an AgentMail inbox through an explicitly selected pod, preserving the pod tenant boundary.Needs your own keyBilled to your own Agent mail key
Get Polling WebhookGet one organization-level polling webhook by webhook_id or client_id.Needs your own keyBilled to your own Agent mail key
Get Thread AttachmentGet a temporary download reference for an attachment using its thread and attachment IDs.Needs your own keyBilled to your own Agent mail key
Get WebhookGet one organization-level webhook configuration by ID.Needs your own keyBilled to your own Agent mail key
Get Webhook HeadersList only the names of custom delivery headers on an organization-level webhook.Needs your own keyBilled to your own Agent mail key
List Calendar Event InstancesList one page of non-cancelled dates computed for a recurring US-only calendar event in a UTC window, including dates beyond the agenda horizon.Needs your own keyBilled to your own Agent mail key
List Calendar EventsList one US-only calendar page of stored one-off events, recurring series, and edited series dates, including cancelled events, by most recent update.Needs your own keyBilled to your own Agent mail key
List DomainsList one page of AgentMail custom domains and return the continuation token for the next page.Needs your own keyBilled to your own Agent mail key
List FilesList one page of an inbox's Agent Drive files in path order, including pending files.Needs your own keyBilled to your own Agent mail key
List Inbox API KeysList API-key metadata scoped to an inbox without exposing secret values.Needs your own keyBilled to your own Agent mail key
List InboxesList a page of inboxes available to the authenticated AgentMail account.Needs your own keyBilled to your own Agent mail key
List Inbox Polling WebhooksList polling webhooks created through one inbox route.Needs your own keyBilled to your own Agent mail key
List Inbox WebhooksList one page of regular webhooks created for a selected AgentMail inbox.Needs your own keyBilled to your own Agent mail key
List Allowlist or Blocklist EntriesList one page of organization-wide send, receive, or reply allowlist or blocklist entries.Needs your own keyBilled to your own Agent mail key
List PodsReturn one page of AgentMail pods and its continuation token.Needs your own keyBilled to your own Agent mail key
List Polling WebhooksList organization-level polling webhooks created through the organization route.Needs your own keyBilled to your own Agent mail key
List WebhooksList AgentMail webhook configurations.Needs your own keyBilled to your own Agent mail key
Query MetricsQuery organization-wide email event counts or cumulative resource-usage time series over a bounded time range.Needs your own keyBilled to your own Agent mail key
Query Rate MetricsQuery organization-wide rolling bounce and complaint rates.Needs your own keyBilled to your own Agent mail key
Release Held MessageRelease a message that Agent Armor held for review, emit its delivery and security override events, and remove the agent-armor-held label.Needs your own keyBilled to your own Agent mail key
Respond to Calendar EventAccept, decline, or tentatively accept an email invitation on a US-only inbox calendar.Needs your own keyBilled to your own Agent mail key
Send EmailImmediately send an email from an AgentMail inbox with a plain-text and/or HTML body, cc, bcc, reply-to and labels.Needs your own keyBilled to your own Agent mail key
Update CalendarChange an inbox calendar's default time zone in US production.Needs your own keyBilled to your own Agent mail key
Update Calendar EventPatch a US-only calendar event, one recurring date, or that date and future dates.Needs your own keyBilled to your own Agent mail key
Update Inbox WebhookUpdate an inbox-scoped regular webhook's enabled state or replace its event types.Needs your own keyBilled to your own Agent mail key
Update Inbox Webhook HeadersAtomically set, replace, or remove custom delivery headers on an inbox-scoped regular webhook.Needs your own keyBilled to your own Agent mail key
Update Pod InboxUpdate the display name, active or paused status, or metadata of an inbox inside an explicitly selected AgentMail pod.Needs your own keyBilled to your own Agent mail key
Update Thread LabelsAdd or remove custom labels from every message in one thread.Needs your own keyBilled to your own Agent mail key
Update WebhookUpdate an organization-level webhook's enabled state, event types, or inbox and pod subscriptions.Needs your own keyBilled to your own Agent mail key
Update Webhook HeadersAtomically set, replace, or remove custom delivery headers on an organization-level webhook.Needs your own keyBilled to your own Agent mail key
Pricing

How you pay for Agent mail

  • Your first $2 is freeIt's added to your Composio wallet when you turn on Instant.
  • You pay for each callYou pay Agent mail's price with 0% markup, plus the regular Composio tool call charge.
  • Your own key comes firstIf you connect your own Agent mail key, Composio uses it and doesn't charge Instant for those calls.
  • You control the costYou can ask your agent to check with you before each paid call, and you can turn Instant off at any time.
  • You can see each callYour wallet shows each call and what it cost.
  • When your balance runs outYou can add funds to your wallet on a Pro plan or connect your own key.
Help

Troubleshooting

  1. 1. LlamaIndex asks me for a Agent mail API key

    You may have asked for something that needs your own key, like Batch Update Message Labels, Complete File Upload, Create Agent Armor Feedback, Create Calendar Event, Create File, Create Inbox API Key and 61 more. Those tools don't run on Instant. For everything else, check that Instant is turned on in your Composio wallet, then ask again.

  2. 2. I can't see my free $2

    Open your wallet in the Composio dashboard and check that Instant is turned on. If the $2 still isn't there, email support@composio.dev from the address you signed up with.

  3. 3. A Agent mail call failed with a balance error

    Your balance is empty. Add funds to your wallet on a Pro plan, or connect your own Agent mail key, then try again.

FAQ

Frequently asked questions

Start with Agent mail.It takes 30 seconds.

New accounts get a one-time $2 starter credit for Instant calls.Run Agent mail from your agent with no Agent mail key.

Get $2 starter credit