Support Threads That Span Days: Agent Memory via Email Nylas has released a recipe for building multi-day support agents that use email threading headers as durable memory. By leveraging Message-ID, In-Reply-To, and References headers, the agent can maintain conversation context across days and process restarts. The pattern is implemented via Nylas Agent Accounts and webhooks, with thread_id serving as the persistent session identifier. Most conversational state management assumes the conversation is happening — a chat session, a websocket, a context window. Email breaks that assumption rudely: a customer replies five days after your agent's last message, and your code is expected to pick up exactly where things left off, with no session, no socket, and a process that has restarted twelve times since. The good news: email already solved durable conversation tracking, decades ago, in three headers. Build on them properly and the thread itself becomes the agent's memory. This is the pattern behind the multi-day support agent recipe https://developer.nylas.com/docs/cookbook/use-cases/act/support-agent-multi-day-threads/ , which runs an LLM support agent on its own mailbox via Agent Accounts https://developer.nylas.com/docs/v3/agent-accounts/ — currently in beta. Every email carries a globally unique Message-ID . A reply adds In-Reply-To the Message-ID being answered and References the full chain of Message-IDs, oldest to newest . That's how Gmail, Outlook, and Apple Mail all decide what belongs to one thread — subject-line matching is only a fallback, and the email threading docs https://developer.nylas.com/docs/v3/agent-accounts/email-threading/ explain why relying on it breaks: recipients edit subjects, two prospects can receive identical subjects, and forwards keep the subject while changing the conversation entirely. You don't manage these headers yourself. Pass reply to message id on a send and the platform populates In-Reply-To and References automatically: curl --request POST \ --url "https://api.us.nylas.com/v3/grants/