llms.txt: machine-readable documentation index. Markdown version of this page is also available.

JetBrains Air Help

Indexing and search

Air Context builds an embedding vector index of your codebase that AI agents can query by meaning. Indexing runs at scale, using an embedding backend on the Air Context server by default. Instead of searching for names of files, functions, or identifiers, you or your agent describe the intent or purpose of the code you're looking for, such as "where do we validate authentication tokens". Air Context matches the description against the embeddings of your indexed code and returns the locations.

Where your code is indexed and stored

What JetBrains can access, where the embeddings are computed, and where the index is stored depend on how you index. Choose the setup by what your organization allows:

Setup

Access to your repositories

Embeddings are computed

Index is stored

Indexing managed in JetBrains Console

JetBrains reads the repositories that an administrator selects

On the Air Context server

On the Air Context server

CLI with server storage, on a developer machine or in CI

JetBrains has no access to the repository. The CLI sends code chunks from your checkout

On the Air Context server

On the Air Context server

CLI with local storage

JetBrains has no access to the repository. The CLI sends code chunks from your checkout

On the Air Context server

On your machine

CLI with local inference

JetBrains has no access to the repository. Code chunks aren't sent

On your machine

On your machine

For what the index contains, see What is stored.

How indexing works

Here is a simplified explanation of what happens to your code during indexing, storage, and retrieval. Where the embeddings are computed and where the index is stored depend on the setup, as described in Where your code is indexed and stored.

  1. Indexing is triggered. Indexing starts automatically or manually, as described in When indexing runs. It runs on a specific code snapshot, identified by a repository ID and a revision ID, as described in What you can index.

  2. Code is processed. The client fetches and checks out the revision and groups files into a dataset of clusters for parallel, incremental indexing. Using dedicated language parsers, it splits files into code chunks (functions, classes, symbols, file-level docs) and attaches the file path and byte offsets to each chunk.

  3. Embeddings are computed. By default, batches of code chunks are sent to the Air Context server, along with file paths and offsets, and the server computes vector embeddings for the chunks. With local inference, the Air Context CLI computes the embeddings on your machine, and the chunks aren't sent.

  4. The index is stored. The embeddings and the index are stored on the Air Context server or, with local storage or local inference, on your machine. Local storage is the default for small repositories indexed by users who aren't members of an organization in JetBrains Console.

  5. Search returns coordinates, not code. Air Context converts the query into a vector on the Air Context server or, with local inference, on your machine, in which case the query isn't sent to the server. It then finds the chunks whose vectors are closest to the query, on the server or on your machine, depending on where the index is stored. Search results are chunk IDs with the file path and offsets, not code. The agent or IDE then opens the actual code from your own checkout or storage, not from Air Context storage.

The following diagram gives a simplified view of the Air Context data flow when the Air Context server computes the embeddings and stores the index.

Air Context data flow diagram

What you can index

  • Git repositories, identified by the remote URL and the indexed revision, which defaults to HEAD.

  • Non-Git folders, identified by a hash of the folder path and the host name.

For more information about these identifiers, see What is stored.

When indexing runs

  • Manually, with the jbcontext index command run in the project directory. When you work with a repository through the CLI and agent hooks, the first index is created this way.

  • Automatically, through the session hooks that jbcontext setup-agent installs, which refresh an existing index each time a configured agent starts a session and, depending on the agent, when it ends. For a repository that has no index yet, the hooks neither create one nor download one from a share point. An index created from JetBrains Console or Air Teams counts as existing.

  • In Air Teams, when a cloud task starts, for connected repositories. If the repository has no snapshot yet, Air Teams creates the first index; otherwise it refreshes the existing one.

  • In CI, on a build agent with an organization service account. This is how large repositories are indexed. See Index repositories in CI.

  • In JetBrains Console, for the organization's GitHub repositories after an administrator connects to GitHub. An administrator can also block indexing for the whole organization, or block on-demand indexing (any run started by the CLI, including session hooks and CI). See Air Context in JetBrains Console.

Indexing is incremental: only content that has changed since the last run is processed rather than the whole repository.

Local changes in search

In a Git repository, jbcontext search covers the indexed snapshot and your local changes: commits that aren't indexed yet, staged and unstaged edits, and untracked files. You can find the code you're working on without running jbcontext index again.

The Air Context CLI keeps a separate index of these changes on your machine, and the watch daemon updates it in the background. By default, jbcontext index starts the daemon and makes it watch the repository. The CLI sends chunks of the changed files to the Air Context server so that it can compute embeddings, unless you use local inference. Files excluded by a committed .gitignore or .jbcontextignore file aren't sent or searched. See Exclude files from indexing.

A search that you limit to a branch or revision with --branch or --revision doesn't cover local changes. In very large repositories where Git can't check for changes quickly, search over local changes is turned off by default.

If search doesn't find your local changes, see Search does not find local changes.

Exclude files from indexing

To keep parts of a repository out of the index, add a .jbcontextignore file. It uses .gitignore syntax, can be placed in any directory of the repository, and its patterns are relative to that directory. A .jbcontextignore file without patterns excludes the whole directory it's in; in the project root, it excludes the entire repository, and jbcontext index reports the skip and exits successfully.

Paths excluded by .gitignore, .aiignore, .aiexclude, .cursorignore, or .codeiumignore are also skipped.

In a Git repository, ignore files are read from the indexed revision, so an ignore file takes effect only after you commit it. The exception is a .jbcontextignore file without patterns in the project root, which excludes the repository even if it isn't committed.

Committing a change to a .jbcontextignore file makes the next indexing run process the repository in full.

After you set up an agent with jbcontext setup-agent, it queries Air Context automatically instead of performing ad hoc searches and file reads. Depending on the installed components, an agent uses:

  • Skills, such as context-search, which run the jbcontext search command for the agent. Further skills, such as context-research for deeper codebase exploration, are available in the JetBrains/context repository.

  • The exploration subagent (context-explorer), which runs multiple jbcontext search queries in an isolated context and returns file and line references with code snippets.

  • The MCP server, started with jbcontext mcp, which exposes the semantic code search tool (code_search) over stdio.

For the full list of components and supported agents, see Agent integrations.

Search results are coordinates of relevant code, not the code itself. For more information, see How indexing works.

Search from the command line

You can also run the same command yourself from the terminal:

jbcontext search "where do we validate authentication tokens"

Options for narrowing the scope, such as --path-filter, --branch, and --limit, are listed in the CLI reference.

Monitor and manage indexes

In JetBrains Console

An administrator sees the indexing status of each repository of the organization and can restrict indexing or delete indexes. See Manage repository indexing.

With the Air Context CLI

Run jbcontext status to see the indexed snapshots of the current repository, where the index is stored, and whether search covers your local changes, jbcontext stats to open a local dashboard of search, repository, and indexing activity, and jbcontext remove-index to remove your indexed snapshots of the current repository. See CLI reference.

30 November 2026