JetBrains Central Console main Help

Getting started with JetBrains Context

Most problem-solving and feature development tasks require agents to perform extensive code exploration to understand the current state or get a reference for the planned changes. In practice this means running searches, spinning up exploration subagents, and reading files – activities that often consume a lot of time and tokens.

JetBrains Context uses semantic search to solve the problem of code search and code exploration for agentic tasks. It indexes your codebases and lets agents query them semantically instead of performing ad-hoc searches and file reads. JetBrains Context is a cloud service: it indexes and stores your code on the JetBrains Context server rather than on your machine, so an internet connection is required to index and search.

Specifically, JetBrains Context provides the following functionalities:

  • Indexes code using an embedding backend, incrementally and at scale.

  • Preserves code privacy by storing vector representations of your code rather than the raw source.

  • Exposes semantic search tools and skills that agents call to “ask” for relevant files, APIs, tests, patterns, or examples instead of manual grep-style exploration.

  • Lets agents understand and navigate large, complex codebases faster and cheaper, while maintaining or improving solution quality.

  • Provides its own JetBrains Context CLI to manage agent integration, indexing and to run searches. It also integrates seamlessly into Air and JetBrains IDEs.

Getting started

The JetBrains Context service is available to all users who have a JetBrains license with AI (AI Free, AI Pro, AI Ultimate, or AI Enterprise), or an IDE license.

For members of an organization that manages AI centrally through JetBrains Central, an administrator must first enable AI for the organization before they can use JetBrains Context.

Repository indexing and search through JetBrains Context is available through multiple tools:

JetBrains Context CLI

JetBrains Context CLI is a command-line tool that lets you index and search your codebases. It is available for Linux, macOS, and Windows. To start using JetBrains Context CLI, follow the instructions below:

  1. Install the CLI:

    curl -fsSL https://download.jetbrains.com/jetbrains-context/release/download-jbcontext.sh | bash
    irm https://download.jetbrains.com/jetbrains-context/release/download-jbcontext.ps1 | iex
  2. Run jbcontext login and log in with your JetBrains Account. If you are already logged in, JetBrains Context CLI will automatically detect it.

  3. Run jbcontext setup-agent to set up JetBrains Context in your AI agents.

Alternatively, you can install JetBrains Context in your AI agent by pointing the agent to the following URL: https://jb.gg/context-install.

After the setup is complete, start an agent for which you have set up JetBrains Context. Each time the agent starts a session, it triggers indexing automatically. Indexing is incremental, so only content that has changed since the last indexing is processed rather than the whole repository. Both Git repositories and non-Git folders can be indexed.

Running indexing manually with the jbcontext index command is optional. Once indexing finishes, your agents can query the codebase through JetBrains Context automatically. You can also run a search directly from the command line with jbcontext search.

AI Assistant in JetBrains IDEs

In JetBrains IDEs, AI Assistant reuses the agent configuration you already created with the JetBrains Context CLI. If you have set up JetBrains Context for your agents (see JetBrains Context CLI), those agents also use it in AI Assistant, with no additional setup in the IDE.

This applies to Claude Agent, Codex, and Junie CLI.

Air

JetBrains Context is supported by Air, both the desktop and web versions. In Air desktop, JetBrains Context is not installed automatically. Instead, it is offered to customers covered by JetBrains Central. Background indexing through JetBrains Context prepares semantic indexes for the connected repositories. Agents inside Air call JetBrains Context instead of ad-hoc grep commands or file reads for most non-trivial exploration tasks, which improves quality and reduces token and time usage.

For information about connecting repositories in Air, see Connect repositories.

Data privacy

JetBrains Context is a cloud-based service that indexes code and stores it in a vector database on the JetBrains Context server.

The following list represents the exact data stored by JetBrains Context:

  • Code chunks stored as vector embeddings. Chunks of source code are converted to embeddings and stored in a vector database. Raw source code is not stored.

  • File paths. JetBrains Context stores file paths to trace back the location of code chunks to the corresponding files in the repositories they originated from.

  • Code chunk offsets. JetBrains Context stores offsets that point to the exact location of the stored chunk in the source file.

  • Repository ID and revision ID. The identifiers of the repository and the specific Git revision that were used as the base for code indexing.

Data retention

JetBrains Context retains stored data for 14 days after it was last searched, while searching the index resets this period. There is currently no option to extend retention without searching or re-indexing. The stored data is never used for model training.

Storage locations

Repository data is stored within the JetBrains cloud infrastructure on Google Cloud. The geographical location of the primary storage is Ireland, with index replicas on Google Cloud in the United States. The replicated US-based storage is used only for faster retrieval, while data processing and storing into vector databases only take place in the primary location in Ireland.

Data sharing and access

Access to indexed repository data depends on whether the user belongs to an organization:

  • Organization members. Indexed repository data is available only within the same organization.

  • Individual users. For users who are not organization members, indexed data is available only to the user who indexed it.

Data removal

As of JetBrains Context CLI version 0.9.5, you can delete indexed data using the jbcontext remove-index command. For more information on how to use the command, type jbcontext remove-index --help in the terminal.

Data flow

To understand what happens to your code during indexing, storage, and retrieval, here is a simplified explanation of the JetBrains Context data flow.

  1. Indexing is triggered. Indexing is triggered automatically when an agent set up to use JetBrains Context starts a session, or manually from the JetBrains Context CLI (jbcontext index), an IDE, or Air. Indexing runs on a specific code snapshot, identified by a repository ID and a revision ID. This is typically Git-tracked content, but non-Git folders can also be indexed.

  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. Chunks and accompanying data are sent to the server. Batches of code chunks are sent to the JetBrains Context server, along with file paths and offsets.

  4. The server indexes the chunks. The JetBrains Context server computes embeddings, stores them, and builds an index once all vectors are in.

  5. Search returns coordinates, not code. The server converts the query into a vector and matches it against the stored embedding vectors. 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 JetBrains Context storage.

The following diagram gives a simplified view of the JetBrains Context data flow, showing how the indexing, storage, and retrieval processes work together.

JetBrains Context data flow diagram
03 August 2026