Skip to main content
Langmail classifies every incoming message into an email type and flags the ones that need action. Your agent can use those types as structured search filters instead of paging through an inbox. This guide shows common tasks as the prompt you give, the tool call the agent makes, and what comes back. The three email tools divide the work:

Find what needs action

Prompt
The agent combines the todo flag with a date filter:
Tool call — search_emails
Result

Filter by email type

The keywords filter takes any of the ten classified types — direct, newsletter, promotional, notification, ticket, receipt, order, scheduling, security_alert, terms — plus the orthogonal todo flag, combined with OR:
Prompt
Tool call — search_emails
What the types mean and how they get applied is covered in Email intelligence.

Find transactional mail that never says what it is

A booking confirmation is titled after the film, an invoice after the vendor — the word you would search for appears nowhere in the message. This is where the type filter replaces free text rather than narrowing it:
Prompt
Tool call — search_emails
Note the window: after/before filter the received date, and the confirmation arrived when the seats were booked, not when the film ran. Anchor on the event, then widen the start by a booking lead time. Paired with the type filter, that wide window costs nothing — the newsletters advertising cinema tickets are typed newsletter and never appear. Mail analyzed before classification existed carries no type; if a type filter comes back empty, fall back to a free-text query.

Search by sender and text

from matches a substring of the sender’s name or address; query is free-text over subject, body, and addresses — terms are OR’d, so a message matches if it contains any of them, and messages matching more terms rank first (quote a phrase to require all its words in the same field). They compose:
Prompt
Tool call — search_emails

Read the full message

Search results are deliberately body-free to stay light on tokens. The agent opens a specific hit by id:
Tool call — get_email
Result

Follow a conversation

Given any message id, get_thread returns the whole conversation oldest-first, so the agent can reconstruct context before answering:
Tool call — get_thread
Result
The email surface is read-only: agents can search and read but not send, draft, or delete mail. If a to-do needs a reply, the agent drafts the text and you send it from webmail or your mail client.