Author profile
Pouya Sanooei
Software Architect
Pouya Sanooei is a software architect at Nylas who makes the high-level design decisions that keep the platform secure, reliable, and fast as it scales. His recent work has centered on Agent Accounts, the system that gives an AI agent its own email address, mailbox, calendar, contacts, and webhooks as first-class infrastructure, with spam detection and rules-based controls over what each agent can send and receive. He also helped ship Nylas API v3, the rebuild that made the platform 2.5x faster and 10x more reliable, and works on the authentication, identity, and deployment layers underneath. He builds primarily in Go, Rust, and Kubernetes across GCP and AWS, with Temporal, HashiCorp Vault, and distributed databases in the mix. His guides cover CLI internals, agent-account workflows, and the commands developers use to send, read, and automate mailbox activity.
Areas of expertise
- Software Architecture
- Distributed Systems
- Go
- Rust
- Kubernetes
- Email APIs
- Agent Accounts
- Authentication & Identity
Guides on this site
- neomutt vs Nylas: IMAP reader vs email API
neomutt is a configurable IMAP terminal mail reader. Compare it to an API-backed email CLI on OAuth setup, scripting, offline access, and calendar reach.
- Microsoft Graph Mail Query Filters
Microsoft Graph mail query guide: $filter (OData) vs $search (KQL) on /me/messages, why you cannot combine them, plus $select, $top, paging, and a CLI shortcut.
- Gmail API: Send Raw MIME Messages
Build and send raw RFC 5322 messages with the Gmail API: base64url encode the MIME, set required headers, thread replies, and skip the work with the Nylas CLI.
- Google Calendar API Free/Busy Query
Query the Google Calendar API freeBusy endpoint for busy intervals. See freebusy.query vs events.list, then check availability across providers from the CLI.
- Build a ControlFlow Email Agent
Give a ControlFlow task email by wrapping the Nylas CLI as a tool — one subprocess call per action, JSON in and out, across 6 providers, no per-provider SDK.
- Build a Semantic Router Email Agent
Route email intents to the Nylas CLI with Semantic Router — one subprocess call per action, JSON in and out, across 6 providers, with no provider SDK.
- Build an Instructor Email Agent
Give Instructor typed email by piping the Nylas CLI JSON into a Pydantic model — one subprocess call per read, structured out, across 6 providers, no SDK.
- Build a Rivet Email Agent
Give a Rivet agent email by wrapping the Nylas CLI as a graph tool — a Code node shells out per action, JSON in and out, across six providers, no SDK.
- Build a Returns and RMA Email Agent
An AI agent reads return requests, classifies the reason, issues an RMA number for valid ones, and routes exceptions to a human — no refund power of its own.
- Build a Referral-Program Email Agent
An AI agent on a dedicated inbox sends referral invites, tracks who converts, flags self-referral fraud, and routes reward approvals to a human reviewer.
- Connect an Agent to Gmail and Outlook
Give one AI agent a single inbox view across Gmail and Outlook. Connect both mailboxes over OAuth and read, search, and send with the same CLI commands.
- Extract Attachment Data With an AI Agent
An AI agent reads attachments off its own inbox, extracts structured fields from every PDF or invoice with a model, and routes the clean data downstream.