Setting Up an ACP Agent in JetBrains IDEs

    This guide explains how to connect a coding agent to a JetBrains IDE through the Agent Client Protocol (ACP). It covers checking IDE and plugin versions and the runtime environment, installing and configuring the agent, verifying the connection, troubleshooting common issues, and managing security and cost.

    Why Connect a Coding Agent to Your IDE

    Command-line coding agents work well in a terminal. Outside the terminal, however, they often cannot see the open files, the project structure, or compile errors in the IDE. Developers end up copying code snippets by hand, and completions can drift away from the context in the editor.

    Passing IDE context to an external agent reduces manual copying and pasting. The key is a shared communication contract between the IDE and the agent. The Agent Client Protocol (ACP) is one such protocol. It defines how a client and an agent service exchange requests and responses. To connect them, confirm that your IDE supports the protocol and that the agent service implements it.

    This article does not list fixed package names or version numbers. That information changes quickly, and outdated details can mislead readers. Commands and fields appear as placeholders. Replace them with the content from the official documentation before use.

    Three Things to Check Before You Start

    First, IDE version. Check the JetBrains release notes to see whether your IDE includes the AI Assistant and supports ACP. Feature sets vary widely between versions. On an older version, the right-hand tool bar may not show the entry point.

    Second, plugin version. Search for AI Assistant in the Marketplace and review its version number and changelog. Confirm that the release notes mention custom agents or ACP support. If the feature description does not match your IDE version, follow the official page.

    Third, runtime environment. Most agents depend on Node.js or another runtime. Read the agent project’s README to find the required runtime version, then run a version check command in the terminal. Also confirm that your machine can reach the package registry and the model service endpoints. On a private network, configure an HTTP proxy or a package mirror in advance.

    Step 1: Install and Check the AI Assistant Plugin

    In the IDE, open Settings, go to the Plugins Marketplace, search for AI Assistant, and install it. After installation, restart the IDE when prompted so the plugin loads.

    After the restart, check whether the AI Assistant icon appears in the right-hand tool bar. If it does not, first check whether the plugin is enabled in the plugin list. A disabled plugin hides its entry point.

    Step 2: Choose and Install an Agent Service

    Get the agent service from its official repository or official documentation. Do not copy install commands from blogs or forums. Package names may be outdated, and some may be impostors. Before installing, verify the package name and publisher, the license, recent maintenance activity, and the installation method in the README.

    Once you confirm the package name, pin the version before installing:

    1. npm install -g <package-name>@<version>

    Replace the values in angle brackets with the ones you have verified. Pinning a version keeps the agent’s behavior consistent across launches. If your configuration uses npx, which fetches the latest version each time it runs, evaluate the supply chain risk. Use that approach only if you trust the package source.

    After installation, run the agent’s help command in the terminal to confirm that it runs correctly.

    Step 3: Configure the Agent Launch Entry

    Return to the AI Assistant panel, open the settings menu, and look for an option such as Add Custom Agent or Manage Agents. The IDE usually opens a configuration file that records each agent’s display name, startup command, and arguments.

    The JSON below shows structure only. Field names and nesting depend on the current version, so follow the official documentation.

    1. {
    2. "agent_servers": {
    3. "<agent display name>": {
    4. "command": "<startup command>",
    5. "args": ["<argument 1>", "<argument 2>"]
    6. }
    7. }
    8. }

    The fields work as follows. The display name appears in the agent selection list, which helps you tell multiple agents apart. The startup command is the executable the IDE uses to launch the agent process. The arguments are extra options passed to that command.

    If the agent reads environment variables, such as an API endpoint or an access token, set them in your system environment rather than in the configuration file. Configuration files may be synced to a repository or seen by others, so storing secrets there creates a leak risk.

    After you save the configuration, the agent selection list should refresh and show the new entry. Select it to start sending prompts.

    Step 4: Verify the Connection

    After configuration, run the following three checks.

    Check 1: The agent starts on its own. In the terminal, run the startup command from your configuration by hand. If the output shows errors, such as a missing command, a port already in use, or a missing key, fix them before you test inside the IDE.

    Check 2: The IDE receives a reply. In the IDE, select the new agent and send a simple prompt, such as “List the function names in the current file.” If the function names in the reply match the file contents, the agent has read the editor context.

    Check 3: Diagnostics reach the agent. Add a deliberate syntax error to a test file, then ask the agent how to fix it. If the reply identifies the correct error location, the agent has received the IDE’s diagnostic information.

    The connection counts as successful only when all three checks pass. If one fails, review the logs first, then decide whether to change the configuration or switch agents.

    Troubleshooting Common Issues

    Issue 1: No AI Assistant entry in the right-hand panel. First confirm that your IDE and plugin versions meet the official requirements. Then check whether the plugin is disabled. Finally, try clearing the plugin cache and restarting the IDE.

    Issue 2: No response after configuring the agent. Run the startup command in the terminal and read the error message. Check three things: whether Node or the other runtime is on the PATH, whether a system proxy blocks requests to the package registry or model service, and whether environment variables such as API keys are in effect.

    Issue 3: Replies are unrelated to the current project. Confirm that the project is open correctly and that the IDE has recognized the project SDK. Go to the Languages & Frameworks page in the project settings and check the SDK path. For large projects, name the target file or module in your prompt. This usually improves results noticeably.

    Issue 4: Checking logs. You can open the IDE logs from the log entry in the Help menu. For the agent’s own log location, see its official documentation, since paths differ between implementations.

    Security and Cost Considerations

    The agent sends code snippets to a model service. If your project contains private code, customer data, or internal interfaces, confirm your company’s data usage policy first. If needed, point the agent to an internal gateway that meets your compliance requirements.

    Also review the permissions the agent requests. If it asks to read or write files or run commands, grant only the permissions the task requires. Do not open all permissions just for convenience.

    Model calls are usually billed by usage. Before heavy or long-running use, review the billing model and set a usage cap in the provider’s dashboard to avoid unexpected charges.

    Advanced: Multiple Agents and Private Gateways

    The configuration file can declare several agent entries, for example one for quick code generation and another for code review. To switch, select the agent from the list. Each agent’s startup command and environment variables are independent.

    If your team runs a private model gateway that supports the protocol in use, you usually only need to change the startup command or environment variables. The IDE-side structure can stay the same. Before rollout, compare the old and new agents on a fixed set of test prompts, and record the results.

    Summary

    This article describes one integration path and a set of verification steps. For specific package names, configuration fields, and version requirements, follow the JetBrains official documentation and the agent project’s README. Verify each step as you complete it. If a problem appears, you can quickly tell whether the fault lies in the IDE, the plugin, the agent, or the network.