Command
nylas ai config
Configure AI provider.
Written by Qasim Muhammad Staff SRE
What does nylas ai config do?
The nylas ai config command sets up which AI provider the CLI uses for smart compose, inbox analysis, and natural language scheduling. Choose between local models (Ollama, LM Studio) for privacy or cloud providers (OpenAI, Anthropic) for capability.
Usage
nylas ai configFlags
| Flag | Description |
|---|---|
| --json | Output as JSON |
| --no-color | Disable color output |
| --verbose(-v) | Enable verbose output |
| --config | Custom config file path |
| --help(-h) | Show help for the command |
| --limit | Limit results (most list commands) |
| --yes(-y) | Skip confirmations |
Examples
The nylas ai config command sets up which AI provider the CLI uses for smart compose, inbox analysis, and natural language scheduling.
Interactive setup
nylas ai configCheck current AI provider
nylas ai config --jsonExample output
AI Configuration (~/.config/nylas/config.yaml)
default_provider: ollama
ollama.host: http://localhost:11434
ollama.model: llama3.1:8b
claude.model: claude-3-5-sonnet-20241022
fallback: claudeTroubleshooting
AI features return errors after config
Verify your AI provider API key is valid. For local models, ensure Ollama or LM Studio is running.
Smart compose is slow
Local models are slower than cloud providers. Switch to OpenAI or Anthropic for faster responses: `nylas ai config`.
Recommended guides
Build a Strands Email Agent
Give a Strands Agents SDK agent email access using the Nylas CLI as a @tool. One function reaches Gmail, Outlook, and 4 more providers — no OAuth code needed.
Cloudflare Agents Email Tools
Use the Cloudflare Agents SDK to build a stateful email agent on Workers — connect to the Nylas MCP server over HTTP and call email tools in TypeScript.
AI Calendar Assistant from the Terminal
Use nylas calendar schedule ai and calendar ai for natural-language scheduling, focus-time protection, conflict resolution, and meeting-context extraction.
Set Up an MCP Calendar Server
Expose calendar tools to an AI client over MCP. Install nylas mcp, configure your assistant, and let it check availability and create events.
Give an AI Agent Calendar Access
Wrap nylas calendar availability and events as agent tools: read-only by default, draft-before-create for writes, and an OAuth scope the agent can't widen.
Set Up an MCP Contacts Server
Expose contact search and read tools to an AI client over MCP with nylas mcp install. Configure, verify, and call address-book tools.
Run nylas ai config --help for full help output.