How arminsalmasi/intelligent-email-assistant works
Email Assistant is a human-approved email workflow: it loads and guards inbox threads, classifies and ranks them, then runs per-thread workers to summarize, draft, schedule, or propose follow-ups. The graph applies deterministic policy checks and pauses outgoing actions for human review before execution. The service composes the runtime, including LLM, memory, tools, and telemetry. README documents the main flow and worker routing; some wiring is inferred only from the SOURCE INDEX, so uncertain relationships are omitted.
Main entry points: thread_graph.py Thread graph · service.py Service composition · orchestrator.py Inbox orchestration · policy.py Action policy
Components 23
Inbox workflow
- Inbox orchestration
email_assistant/graph/orchestrator.py - Threat guard
email_assistant/safety/injection.py - Triage and ranking
email_assistant/agents/triage.py - Thread graph
email_assistant/graph/thread_graph.py
Thread workers
- Thread summaries
email_assistant/agents/summarizer.py - Reply drafting
email_assistant/agents/drafter.py - Meeting scheduling
email_assistant/agents/scheduler.py - Follow-up proposals
email_assistant/agents/followup.py
Approval and actions
- Action policy
email_assistant/safety/policy.py - Human review
email_assistant/schemas/review.py - Action execution
email_assistant/graph/thread_graph.py
Runtime services
- Service composition
email_assistant/service.py - Mail provider
email_assistant/tools/mail.py - Mail, calendar, reminders
email_assistant/tools - Long-term memory
email_assistant/memory/store.py - Thread checkpoints
email_assistant/memory/checkpointer.py - LLM gateway and cache
email_assistant/llm/client.py - Domain contracts
email_assistant/schemas - Telemetry
email_assistant/observability/metrics.py
Other components
- Mailbox owner
Connections 31
- Mailbox owner → CLI: uses
README.md - Mailbox owner → API: uses
README.md - Mailbox owner → Dashboard: reviews in
README.md - CLI → Service composition: builds
email_assistant/cli.py - API → Service composition: builds
email_assistant/api/main.py - Dashboard → API: uses
README.md - Service composition → Inbox orchestration: constructs
email_assistant/service.py - Inbox orchestration → Mail provider: fetches threads
README.md - Inbox orchestration → Threat guard: scans threads
README.md - Inbox orchestration → Triage and ranking: triages and ranks
README.md - Inbox orchestration → Thread graph: runs per thread
README.md - Thread graph → Thread summaries: routes to
README.md - Thread graph → Reply drafting: routes to
README.md - Thread graph → Meeting scheduling: routes to
README.md - Thread graph → Follow-up proposals: routes to
README.md - Thread graph → Action policy: checks proposals
README.md - Action policy → Human review: requests approval
README.md - Human review → Thread graph: resumes graph
README.md - Thread graph → Action execution: dispatches approved
README.md - Action execution → Mail, calendar, reminders: executes actions
README.md - Reply drafting → Long-term memory: retrieves context
README.md - Action policy → Long-term memory: checks protected facts
email_assistant/safety/policy.py - Action policy → Mail, calendar, reminders: validates calendar
email_assistant/safety/policy.py - Thread graph → Thread checkpoints: checkpoints runs
README.md - Service composition → LLM gateway and cache: configures
email_assistant/service.py - Service composition → Long-term memory: builds
email_assistant/service.py - Service composition → Mail, calendar, reminders: builds
email_assistant/service.py - Service composition → Telemetry: initializes
email_assistant/service.py - LLM gateway and cache → Telemetry: records calls
email_assistant/llm/client.py - Triage and ranking → Domain contracts: uses contracts
email_assistant/agents/triage.py - Thread graph → Domain contracts: uses contracts
email_assistant/graph/thread_graph.py