Codebase Indexing and Context

All plans1 min read
🔍
Semantic Search

Find code by meaning, not keywords. Ask questions in natural language and get accurate results across the entire codebase.

📎
@-Mentions

Point the agent at files, folders, docs, the web, or git history. Precise context control for every conversation.

🔒
Privacy Controls

Org-wide privacy mode, file exclusions, and configurable data policies. Enterprise grade security for sensitive codebases.

Instant Re-indexing

Securely reuse a teammate's index so new developers get full codebase understanding in seconds, not hours.

🧠
Custom Embeddings

Purpose-built embedding model gives Cursor best-in-class recall across codebases of any size and complexity.

🌐
Web and Docs

Agent can search the web and reference configured documentation URLs, combining codebase knowledge with external context.

1

Project opened

Cursor detects the project and begins indexing files using the custom embedding model

2

Embeddings generated

Each file is converted into semantic vectors that capture meaning, structure, and relationships

3

Index stored

The semantic index is stored locally (or shared securely for teams) for instant querying

4

Context available

Agent, Tab, and search all draw from the index to provide accurate, codebase-aware results

Maximizing codebase context

Use @codebase in agent conversations when you want Cursor to search broadly. Use @file or @folder when you know exactly where the relevant code lives. Combine @web with @codebase to let the agent cross-reference your code against external documentation. For large monorepos, configure .cursorignore to exclude build artifacts, node_modules, and generated files from indexing.