mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-23 04:17:34 +00:00
Add user-configurable timezone and 12/24-hour preferences, then wire them through settings, runtime snapshots, scheduler payloads, wait handling, notifications, backups, memory, plugin metadata, and frontend formatters. Keep UTC as the boundary for absolute instants while serializing user-facing dates in the configured or browser-resolved timezone. Preserve scheduler wall-clock inputs in the selected timezone, propagate TZ into desktop/runtime process environments, and restart active desktop sessions when the runtime timezone changes. Cover the risky paths with timezone regression tests for settings normalization, auto and fixed timezone resolution, scheduler round-trips, memory timestamp conversion, and desktop timezone sync. |
||
|---|---|---|
| .. | ||
| api | ||
| extensions/python | ||
| helpers | ||
| prompts | ||
| webui | ||
| default_config.yaml | ||
| plugin.yaml | ||
| README.md | ||
Email Integration
Communicate with Agent Zero through email inboxes and send replies back over SMTP.
What It Does
This plugin polls configured mailboxes, downloads incoming messages and attachments, decides whether a message should continue an existing chat or start a new one, and sends replies back by email.
It supports both:
- IMAP inbox polling
- Exchange inbox polling
- SMTP replies
Main Behavior
- Mailbox polling
- Tracks per-handler mailbox state in
usr/email/state.json. - Uses UID tracking for IMAP accounts so only new mail is processed after initialization.
- Tracks per-handler mailbox state in
- Attachment handling
- Downloads attachments into
usr/email/attachments.
- Downloads attachments into
- Dispatcher workflow
- Reuses or creates a background
Email Dispatchercontext. - Uses model prompts to decide whether an email belongs to an existing chat or should open a new one.
- Supports handler-level model presets for new chats, in addition to the dispatcher's utility/chat routing mode.
- Reuses or creates a background
- Thread routing
- Can continue an existing chat by thread ID found in the email subject.
- Falls back to model-based dispatch if no direct thread match is available.
- Email replies inside an existing Agent Zero thread can use
/project,/config, and/sendcontrol commands.
- Notifications and persistence
- Saves chats after routing and emits notifications about new or continued conversations.
Key Files
- Core orchestration
helpers/handler.pymanages polling, state persistence, dispatching, and reply flow.
- Mail helpers
helpers/imap_client.pyhandles IMAP and Exchange fetching.helpers/smtp_client.pyhandles outbound replies.helpers/dispatcher.pyformats chat summaries and parses dispatcher decisions.
- API and extensions
api/andextensions/connect the polling loop and UI-facing operations into the main app.
Configuration Scope
- Settings section:
external - Per-project config:
false - Per-agent config:
false
Plugin Metadata
- Name:
_email_integration - Title:
Email Integration - Description: Communicate with Agent Zero via email. Supports IMAP/Exchange inbox polling with SMTP replies.