Each agent identity can have one inbox. Email operations scope to it automatically, your agent always sends from the same address, receives replies in the same place, and builds up a searchable message history over time. This makes it possible for agents to hold real, ongoing email conversations with people, not just fire off one-off messages.
Sending email
The simplest case is a plain-text or HTML email to one or more recipients.
Threaded replies
When your agent needs to continue a conversation, pass in_reply_to_message_id with the ID of the message you're replying to. Inkbox links the reply to the existing thread, so the recipient sees one continuous conversation rather than a new email.
Attachments
Attachments are passed as base64-encoded content with a filename and MIME type.
Reading the inbox
iter_emails() pages through the identity's entire inbox. Use it in an agent processing loop to handle new messages as they arrive.
For event-driven agents that only need to act on new messages, use iter_unread_emails() and mark messages as read once processed so you don't handle them twice.
Threads
Every email exchange is grouped into a thread. Use get_thread() to load all messages in a thread at once — for example, to give your LLM full conversation context before generating a reply.
Org-level mailboxes
Most mail operations go through the identity, but sometimes you need to manage the mailbox resource itself — creating one outside of the identity flow, updating its webhook, searching across all messages, or deleting it. For that, use inkbox.mailboxes.