Airpost
Using Airpost

AI features

Thread summaries, reply suggestions and inbox sorting, with your own API key or a local model.

AI in Airpost is optional and off until you set it up. You bring the model: a cloud API with your own key, or a model running on your computer or network. Nothing is sent anywhere until you add a provider, turn on a feature, and turn on AI for at least one account.

The AI work runs in the engine, not in the window. The engine builds what the model sees from its local store, calls the provider, validates the answer and caches it. That is why the same features are available from the CLI (airpost ai ...) and keep working while the window is closed.

Features

FeatureWhat it doesWhen mail is sent to the model
Thread summariesA Summarize button above long threads. The summary streams in as the model writes it.When you click Summarize.
Reply suggestionsSuggested replies, or a draft written from a few words you type.When you click Get Suggestions or Write, or pick a suggestion.
Inbox sortingTags inbox threads with a category and a short reason, shown as a chip in the thread list.When new mail arrives in the inbox, or you click Sort now.

Inbox sorting categories

Sorting uses a fixed set of categories. The model’s answer is checked against this list, and anything else is rejected rather than shown.

CategoryMeaning
Needs replySomeone is waiting on you.
ImportantWorth your attention, but no reply is expected.
NewsletterRegular editorial mail you subscribed to.
NotificationAutomated mail from a service: alerts, receipts, status updates.
PromotionMarketing and offers.
OtherAnything that doesn’t fit.

Each result also carries a reason of up to 200 characters, which the thread list shows as a tooltip on the chip. Sorting results are stored on this computer only.

Reply suggestions

Suggestions come back as short labelled options. The engine keeps each label to 40 characters and each suggested text to 300, and drops anything malformed, so a confused model produces fewer suggestions rather than broken ones. Picking one inserts it into the composer, where you edit it like any other text.

Set up a model

Open Preferences > AI

Click + Add a model and pick a provider.

Fill in the provider

ProviderDefault addressKey
Anthropichttps://api.anthropic.comRequired
OpenAI-compatiblehttps://api.openai.com/v1Depends on the server
Ollamahttp://127.0.0.1:11434Not needed

OpenAI-compatible works with any server that speaks that API, including local ones like LM Studio or llama.cpp (for example http://localhost:1234/v1).

Choose a model and test it

Click Load models to list what the server offers, pick one under Available models or type it in Model, and click Test.

Turn on features and accounts

Under Features, choose which model each feature uses. Then turn AI on for the accounts you want. An account with AI off is never sent to a model.

API keys are stored encrypted by the engine, like your account passwords, and aren’t shown again after you save them. Forget key removes one.

Context window and output limits

Each provider has a Context window setting: how many tokens of thread the engine may send. The defaults depend on the provider.

Provider kindDefault context windowLongest answer
Ollama8,192 tokens1,024 tokens
Anthropic and OpenAI-compatible16,384 tokens4,096 tokens

Ollama’s default is smaller because Ollama silently cuts input past the model’s window. If you run a model with a larger window, raise the setting to match.

What the model sees

The engine prepares the thread before anything leaves your computer:

  • Message bodies are converted to plain text, with quoted replies and signatures removed.
  • Spam, Trash, drafts and encrypted messages are always left out.
  • Attachments are never sent, only their file names.
  • Email addresses are replaced with display names, in the people list, the text, subjects and file names, unless you turn on Include email addresses.
  • The thread is fitted into the context window. When it doesn’t fit, older message text is cut or replaced with “[message text left out]”, and the request is marked as truncated.

Preferences > AI > What is sent to the model shows the exact list per feature:

FeatureWhat leaves Airpost
SummaryThe thread’s subject, sender names, dates and the plain text of its messages, without quoted replies and signatures.
Reply suggestionsThe same, plus what you asked for and your name.
Inbox sortingThe subject, sender names and the plain text of the thread’s newest message you received.

Summaries are kept in memory only. Each provider is labelled with where requests go: “On this computer” (loopback), a host on your network, or a cloud host. If the provider runs on your computer, your mail stays on your computer.

Timeouts and errors

The engine gives up if the model doesn’t start answering in time, or if the whole answer takes too long, and shows that as the error instead of a spinner that never ends. Provider error messages are shown shortened. If a provider rate-limits you and says when to retry, the engine respects it.

Usage

Usage today and Tokens a day, last 7 days in Preferences > AI show how many tokens each provider and feature used. With a paid API this is the number to watch.

From the command line

The CLI uses the provider and features you set up in Preferences > AI.

# Summarize a thread (prints the cached summary if there is one)
airpost ai summarize <thread-id>
airpost ai summarize <thread-id> --refresh

# Sort the last two weeks of inbox mail, or specific threads
airpost ai triage --since 2w
airpost ai triage <thread-id> <thread-id>

# Tokens per day, provider and feature
airpost ai usage --days 7

airpost ai triage waits until sorting finishes. If you interrupt it, the engine finishes the job anyway. Find thread ids with airpost threads or airpost search; see CLI commands.

Using AI agents instead

The features above are Airpost calling a model. The other direction is an agent such as Claude Desktop, Claude Code or Codex calling Airpost, to search, read or draft mail. That goes through the MCP server, with access limited to the accounts, folders and level you allow. See Agents and Access levels.

Troubleshooting