Organize your agents into workspaces by domain Nylas introduces workspaces to manage agent accounts at scale, grouping grants under a single policy and rule set. Workspaces allow automatic assignment of new accounts based on email domain, eliminating the need to configure each grant individually. The system uses auto-grouping to ensure consistent policy inheritance across fleets. The first agent you give an inbox to is easy. You set a send cap, maybe a spam policy, attach a couple of inbound rules, and you're done. The trouble starts at the tenth agent. And the fiftieth. Because the obvious way to apply limits — configure each grant when you create it — doesn't have an "all of them" button. You end up writing a loop that re-applies the same policy to every new account, hoping nobody provisions one out of band, and discovering three weeks later that the support fleet and the sales fleet drifted into two slightly different configurations nobody can fully account for. Configuring limits grant-by-grant doesn't scale past a handful of agents. That's the whole reason workspaces exist. A workspace is a container that groups Agent Accounts and carries exactly one policy plus a list of rules. Set the policy once on the workspace, and every account inside inherits it — including accounts that don't exist yet. Move the boundary up one level, from "configure each grant" to "configure the group," and the fleet manages itself. I work on the Nylas CLI, so the terminal commands below are the exact ones I reach for. Every one is checked against nylas v3.1.27, and every curl call against the published OpenAPI spec. The two-angle tour — API and CLI side by side — is here because half of this work happens in a provisioning script and the other half happens at 2am when you're poking at a misbehaving fleet by hand. If you've used Agent Accounts, you already know the spine: an Agent Account is a grant. It carries a grant id and works with every grant-scoped endpoint — Messages, Drafts, Threads, Folders, Contacts, Calendars, Events, Webhooks. There's nothing new to learn on the data plane. Sending mail from an agent is POST /v3/grants/{grant id}/messages/send , same as any grant. Workspaces add one field to that picture. Every grant carries a workspace id , and the workspace it points at holds a policy id limits and spam settings and a rule ids array inbound and outbound mail filtering . The chain is short: List → holds values domains, TLDs, addresses Rule → match conditions + actions; references lists via in list Policy→ send caps, storage, retention, spam detection Workspace → one policy id + an array of rule ids Grant → carries workspace id → inherits all of the above Change the policy on the workspace and you've reconfigured every account in it at once. That's the leverage. You're not editing fifty grants; you're editing one workspace that fifty grants point at. This is the part that makes the fleet self-organizing, and it's worth getting exactly right. When a new Agent Account is created, Nylas runs a three-step decision to pick its workspace: POST /v3/connect/custom payload includes a workspace id , the grant joins that workspace immediately. No guessing. workspace id was passed, Nylas looks for a custom workspace whose domain matches the new account's email domain auto group is true . If one matches, the grant joins it.Step 2 is the interesting one. auto group is a boolean on the workspace, and the spec describes it plainly: when true , "newly created grants in the application are automatically assigned to the workspace if their email address' domain matches the domain ." So if you create a workspace with domain: "support.yourcompany.com" and auto group: true , then every account you later provision as triage@support.yourcompany.com or escalations@support.yourcompany.com joins that workspace and inherits its policy without you passing a single extra field. The CLI agent account create command deliberately has no --workspace flag — auto-group is meant to carry that weight. You set the domain rule once and let provisioning be dumb. That's the design choice I like as an SRE: the policy decision lives in the infrastructure, not in every caller. A teammate writing a provisioning script doesn't need to know which policy a @sales.yourcompany.com agent should get. They create the account; the domain match routes it. You'll need: https://api.us.nylas.com and Authorization: Bearer