Source: https://cli.nylas.com/docs/commands/ai-config

# nylas ai config

Configure AI provider.

Written by [Qasim Muhammad](https://cli.nylas.com/authors/qasim-muhammad) Staff SRE

Published February 13, 2026

Updated June 21, 2026

## 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

```bash
nylas ai config
```

## Flags

| 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

```bash
nylas ai config
```

### Check current AI provider

```bash
nylas ai config --json
```

## Example output

```text
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:         claude
```

## Troubleshooting

### 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

[ai-catalog.json: Agent Discovery for Your SitePublish ai-catalog.json at /.well-known so AI agents can discover your MCP servers, APIs, and knowledge files. The draft Google-backed spec, schema, and a live example.](https://cli.nylas.com/guides/ai-catalog-json-agent-discovery)

[Build a Strands Email AgentGive 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.](https://cli.nylas.com/guides/strands-email-agent)

[Cloudflare Agents Email ToolsUse 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.](https://cli.nylas.com/guides/cloudflare-agents-email)

[AI Calendar Assistant from the TerminalUse nylas calendar schedule ai and calendar ai for natural-language scheduling, focus-time protection, conflict resolution, and meeting-context extraction.](https://cli.nylas.com/guides/calendar-ai-assistant-cli)

[Set Up an MCP Calendar ServerExpose calendar tools to an AI client over MCP. Install nylas mcp, configure your assistant, and let it check availability and create events.](https://cli.nylas.com/guides/mcp-calendar-server-setup)

[Give an AI Agent Calendar AccessWrap nylas calendar availability and events as agent tools: read-only by default, draft-before-create for writes, and an OAuth scope the agent can&apos;t widen.](https://cli.nylas.com/guides/give-agent-calendar-access)

Run `nylas ai config --help` for full help output.
