agent-getting-started

A command-line walkthrough for setting up and managing Nylas agent accounts, workspaces, policies, rules, and lists.

In plain words
What is it for?
Use it to create and configure agent mailboxes, attach policies and mail-flow rules to workspaces, and manage address or domain lists.
Why use it?
It explains how these Nylas resources relate and shows the setup needed before email automation rules take effect.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/nylas/cli/agent-getting-started
Clone the repo
git clone --depth 1 https://github.com/nylas/cli
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,794 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02794
Opus 5 $0.00000 $0.01397
Sonnet 5 $0.00000 $0.00559
Haiku 4.5 $0.00000 $0.00279

Measured yesterday against content hash 545cfbbd0400, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-getting-started scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/agent-getting-started.md · 334 lines

How it starts

The opening of the file, as written. The whole thing — 334 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Getting Started with Agent Accounts

A hands-on walkthrough for setting up and operating Nylas agent accounts from the CLI — accounts, workspaces, policies, rules, and lists, with examples for every step.

What Agent Accounts Are

Agent accounts are Nylas-managed email identities (provider nylas). Unlike OAuth grants, they don't connect to Gmail or Outlook — Nylas itself hosts the mailbox (e.g. [email protected]). They're built for AI agents and automation: a real inbox your agent can send from, receive to, and automate, without a human's mailbox behind it.

How the resources fit together

Application
├── Policies              coarse settings bundles (limits, options, spam)
├── Rules                 mail-flow automation (trigger → conditions → actions)
│     └── in_list ──────► Lists (typed value sets: domain / tld / address)
└── Workspaces            the attachment point that makes it all take effect
      ├── policy_id       one policy per workspace
      ├── rule_ids[]      many rules per workspace
      └── Agent accounts  mail through these is governed by the workspace

A rule or policy does nothing until a workspace references it, and an agent account is governed by whatever its workspace references.

API reference: https://developer.nylas.com/docs/v3/agent-accounts/

Prerequisites

nylas init                      # one-time CLI setup (API key, region)
nylas doctor                    # verify configuration is healthy

You need an API key with admin access. Agent account emails use your application's agent domain (e.g. yourapp.nylas.email).

Step 1 — Create an Agent Account

nylas agent account create [email protected]

Example output:

✓ Agent account created successfully!

[email protected]
  ID:           11111111-1111-1111-1111-111111111111
  Workspace ID: aaaaaaaa-1111-1111-1111-111111111111
  Status:       active

Notes:

  • the nylas connector is created automatically on first use
  • the API auto-creates a default workspace and policy for the account
  • add --name 'Support Bot' to set a display name on the account (1–256 characters)
  • add --app-password 'ValidAgentPass123ABC!' to also enable IMAP/SMTP mail-client access (see Step 7)
  • --json prints the raw payload for scripting:

Read the full file on GitHub · 334 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 334 lines · 0 tokens per session scan A 545cfbbd0400

Subscribe to this mod's changes

agent-getting-started is a command published in the GitHub repository nylas/cli (68 stars, last pushed 13d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,794 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.