Alphakdeps.io is experimental and evolving — the registry and packages may change or reset.

kdeps-ai-email-client

workflowv1.0.0

AI email client — triage, summarize, draft, reorganize labels, and unsubscribe, with a web UI

Install

kdeps registry install kdeps-ai-email-client

Then run locally:

kdeps exec kdeps-ai-email-client

Configure LLM provider in ~/.kdeps/config.yaml (created automatically on first run).

README

ai-email-client

An AI email client as a kdeps workflow: triage, summarize, draft, reorganize labels, and unsubscribe — with a single-page web UI. IMAP/SMTP for mail, an LLM (DeepSeek by default) for the intelligence.

One API route (POST /api/v1/mail) dispatches on an action field; the browser UI is served on the same port.

Actions

actionwhat it does
inboxFetch the inbox over IMAP and triage each email (category, priority, summary, folder). Per-email cache — only new mail hits the LLM.
reorganizePropose a destination folder per email (reusing your real IMAP folders).
applyMove the selected emails into their folders (auto-creates missing folders, case-insensitive match).
labelsAI plan to consolidate duplicate/near-duplicate folders (merge + delete).
labelsApplyExecute the label plan: move mail from redundant folders into canonical ones, then delete the emptied ones.
protectSet a protected-labels list that label cleanup never merges away or deletes.
summarizeSummarize one email.
draftDraft a reply in a chosen tone.
sendSend a drafted reply over SMTP.
unsubscribeList senders with a List-Unsubscribe header (RFC 2369/8058).
unsubApplyUnsubscribe from the selected senders (one-click POST or GET).

Configure

Credentials live in ~/.kdeps/config.yaml (never in the workflow):

llm:
  backend: deepseek
  deepseek_api_key: sk-...
smtp_connections:
  default: { host: smtp.gmail.com, port: 587, username: you@gmail.com, password: app-password, tls: true }
imap_connections:
  inbox:   { host: imap.gmail.com, port: 993, username: you@gmail.com, password: app-password, tls: true }

Gmail: use an App Password, not your login password.

Run

export KDEPS_API_AUTH_TOKEN=dev-token   # required whenever apiServer is set
kdeps run .                             # API + web UI on http://127.0.0.1:16395

Open http://127.0.0.1:16395/, paste the bearer token, and use the unified view: per-email Original / Summarize / Draft / Unsub plus folder Move, with Reorganize, Label cleanup, and Find subscriptions in the toolbar.

Notes

  • Actions that change your mailbox (move, label cleanup, unsubscribe, send) are always preview-then-confirm — the LLM never mutates mail on its own.
  • The Original view renders HTML in a sandboxed iframe with a strict CSP; remote images are blocked until you toggle "Load remote images".

License: Apache-2.0

Versions

VersionPublishedStatus
1.0.07/19/2026active

Details

Author
kdeps
License
Apache-2.0
Latest Version
1.0.0
Published
7/19/2026

Tags

llmemailapiwebagent