Full tutorial: https://springaicommunity.mintlify.app/acp-java-sdk/tutorial/29-jetbrains-integration
Connect your Java ACP agent to JetBrains IDEs (IntelliJ IDEA, PyCharm, WebStorm, etc.) — and, with the same JAR, to Zed and VS Code (see Other ACP editors below).
JetBrains joined the ACP initiative in October 2025, collaborating with Zed to create a unified standard rather than competing protocols. ACP support is available in IDE versions 2026.1 and later.
Key insight: The same agent JAR works in Zed, JetBrains, and VS Code. Only the configuration differs!
- JetBrains IDE version 2026.1 or later (IntelliJ, PyCharm, WebStorm, etc.)
- JetBrains AI Assistant plugin enabled (no AI subscription required)
- Java 17+ installed
- This module built (see below)
# From the tutorial root directory
./mvnw package -pl module-29-jetbrains-integration -q
# Verify the JAR was created
ls -la module-29-jetbrains-integration/target/jetbrains-agent.jarrealpath module-29-jetbrains-integration/target/jetbrains-agent.jarExample: /home/user/projects/acp-java-tutorial/module-29-jetbrains-integration/target/jetbrains-agent.jar
Follow the official JetBrains ACP documentation for the current UI flow:
https://www.jetbrains.com/help/ai-assistant/acp.html#add-custom-agent
The JetBrains UI may change over time, so this tutorial intentionally avoids listing menu paths that can become outdated.
Create or edit ~/.jetbrains/acp.json:
{
"default_mcp_settings": {},
"agent_servers": {
"Java Tutorial Agent": {
"command": "java",
"args": [
"-jar",
"/absolute/path/to/jetbrains-agent.jar",
"acp"
]
}
}
}Replace /absolute/path/to/jetbrains-agent.jar with the path from Step 2.
- Open the AI Chat tool window
- Click the agent selector dropdown
- Select "Java Tutorial Agent"
- Start chatting!
- Open AI Chat (Alt + Shift + C)
- Select "Java Tutorial Agent" from the agent dropdown
- Try prompts like
hello,help,tour, ortell me about jetbrains
ACP has no agent-to-client "open this file" request. Instead, tool call
updates carry a locations field, and clients that support follow-along
navigate to each location as it arrives. The spec calls this
"Following the Agent":
Tool calls can report file locations they're working with, enabling Clients to implement "follow-along" features that track which files the Agent is accessing or modifying in real-time.
Each location is an absolute path plus an optional 1-based line:
context.sendUpdate(sessionId, new ToolCall(
"tool_call", toolCallId,
"Visiting pom.xml",
ToolKind.READ, ToolCallStatus.IN_PROGRESS,
List.of(),
List.of(new ToolCallLocation("/abs/path/to/pom.xml", 1)),
null, null, null));Say tour to the agent. It walks well-known files in the project
(pom.xml, README.md, ...), reporting each as a tool call location —
opening the file at line 1, then scrolling to the middle via a
tool_call_update. See tourProject() in JetBrainsAgent.java.
Client support differs:
| Client | Behavior |
|---|---|
| Zed | Click the crosshair icon at the bottom left of the Agent Panel (or hold cmd/ctrl when submitting). The editor jumps to every location the agent reports. |
| JetBrains | Locations render on the tool call cards in AI Chat. No auto-follow toggle yet (as of June 2026) — report locations anyway, so your agent is ready when it ships. |
Two things locations is not:
- Not
fs/read_text_file/fs/write_text_file(context.readFile()/context.writeFile()) — those are request/response calls that access the editor's buffer state (including unsaved changes); they don't navigate. - Not imperative — it's a one-way notification. The editor follows only if the user enabled follow mode; there is no guaranteed "force open" in ACP.
- Verify IDE version is 2026.1 or later
- Ensure AI Assistant plugin is enabled
- Check
acp.jsonis valid JSON - Restart the IDE after configuration changes
- ACP agents are not supported in WSL
In the AI Chat tool window, click the more options button and select "Get ACP Logs" to download agent logs. For detailed diagnostics, enable the llm.agent.extended.logging registry key via Navigate > Search Everywhere.
java -jar module-29-jetbrains-integration/target/jetbrains-agent.jar
# Should print:
# [JetBrainsAgent] Starting Java ACP agent...
# [JetBrainsAgent] Ready - waiting for IDE to connect...The same agent JAR works in any ACP client; only the configuration differs.
Zed was the first editor with full ACP support. Open Zed settings (Cmd/Ctrl+,) and add:
{
"agent_servers": {
"Java Tutorial Agent": {
"type": "custom",
"command": "java",
"args": ["-jar", "/absolute/path/to/jetbrains-agent.jar"]
}
}
}Pick the agent in Zed's Agent Panel. Hold cmd/ctrl when submitting (or click the
crosshair icon) to enable follow-along navigation.
VS Code has no native ACP support yet, but the community
vscode-acp
extension provides it. Install it (code --install-extension omercnet.vscode-acp),
then expose the agent on your PATH with a wrapper script — the extension
auto-detects agents from PATH:
cat > ~/.local/bin/java-tutorial-agent <<'EOF'
#!/bin/bash
exec java -jar /absolute/path/to/jetbrains-agent.jar "$@"
EOF
chmod +x ~/.local/bin/java-tutorial-agentThe same agent code works across every ACP-compatible editor — JetBrains, Zed, and VS Code all launch the one JAR you built. Write once, run in any IDE. That's the power of ACP.