AI coding assistants often hallucinate outdated Nx commands and lack context about your workspace structure. Without workspace awareness, they suggest commands that don’t exist or miss project relationships entirely. The Nx AI integration gives assistants accurate, real-time information about your workspace, projects, and available commands — making them smarter when working in an Nx monorepo and more autonomous when iterating on CI failures.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nrwl/nx/llms.txt
Use this file to discover all available pages before exploring further.
Configure Nx AI integration
Automatic setup
To automatically configure your Nx monorepo to work best with AI agents and assistants, run:- The Nx MCP server — gives your AI real-time access to workspace structure, project graph, and available tasks
- Agent configuration files —
AGENTS.md,CLAUDE.md, and similar files that prime the agent with workspace-specific guidance - Agent skills — for workspace exploration, code generation, and task execution
Alternatively, you can install just the skills without the Claude Code plugin:This copies the skills into your workspace but does not install the Claude Code plugin.
What the Nx MCP server provides
The Nx MCP server exposes structured, real-time workspace data to your AI agent. Instead of the agent grepping through files and guessing, it gets:Workspace understanding
Graph-aware exploration of project dependencies and relationships. The agent gets structured data about every project, target, and how they connect.
Real-time terminal integration
The AI can read your terminal output, running processes, and error messages directly — no copy-pasting required.
Reliable code generation
The agent invokes Nx generators for predictable scaffolding, then adapts the result to your workspace. Faster, standardized, and fewer hallucinations.
Autonomous CI workflows
The CI monitor skill bridges your local agent with Nx Cloud. Push, monitor, get failures, fix, repeat — until CI is green. You review the final PR, not every intermediate fix.
Files Nx manages for AI agents
After runningnx configure-ai-agents, Nx creates and manages several files that help AI agents understand your workspace:
AGENTS.md
AGENTS.md
A markdown file at the root of your workspace that describes the workspace structure, available commands, and conventions. AI agents that support
AGENTS.md (such as Claude Code) automatically load this file at the start of each session.CLAUDE.md
CLAUDE.md
A Claude Code-specific configuration file that provides additional context and primes the agent with Nx-specific knowledge, including which commands to use and which to avoid.
.cursor/ directory
.cursor/ directory
For Cursor users, Nx writes rule files into
.cursor/rules/ that configure how Cursor’s AI understands the workspace. These rules cover available generators, workspace conventions, and Nx-specific patterns.AI-enhanced CI
Nx also integrates AI directly into your CI runs to automatically detect failed tasks, analyze errors, and propose fixes that can be reviewed and applied directly to your pull request. This is called Self-Healing CI: an AI agent on your CI pipeline detects failures, analyzes the root cause, proposes a fix, and verifies it — automatically.Self-Healing CI
Learn how Nx Cloud’s AI agent automatically detects, analyzes, and fixes CI failures before you even see them.
Creating new workspaces with AI
When using AI assistants to create new Nx workspaces, use the CLI command:react-template, angular-template, and typescript-template. For adding Nx to an existing project:
Learn more
- Autonomous AI Agents at Scale — Infrastructure requirements for scaling AI agent workflows
- Why Nx and AI Work So Well Together
- Nx MCP CLI reference
