Your AI Connector for JetBrains
JetBrains developers, is your AI assistant truly integrated, or just another tab? Which loses context time and time again, and you have to repeat yourself and switch between models and tools. Let me introduce you to Pieces. It functions as your dedicated AI connector for JetBrains, embedding intelligent assistance directly into your workflow. Leveraging AI within powerful IDEs like IntelliJ IDEA, PyCharm, or Rider shouldn't mean breaking your focus
This article will explore how you can make Pieces your go-to AI Connector. It eliminates this friction and remembers everything for you locally, it is privacy-focused and is built edge-first, meaning you have maximum control over everything.
What sets Pieces Apart?
Pieces truly understands your project, your files, and your code, not just generic prompts, setting it apart from just another AI extension for JetBrains.
We remember everything! The documentation you visited yesterday? We remember it. The code snippet you saw on StackOverflow? We saved it for you. Everything Hands-off, it just works for you!
Pieces is available directly in JetBrains, which means no switching back and forth between apps.
This enables you to spend less time searching for answers or debugging, and more time building.
Connecting your code with context via Pieces in JetBrains
Getting set up with Pieces means connecting your JetBrains environment to a powerful AI Connector - Pieces that understands your development needs.
Step 1: Establishing the connection (installation & prerequisites)
To function as your AI connector, Pieces relies on a robust PiecesOS Agent and comes with a beautiful UI, Pieces Copilot. For our needs, we will get started with PiecesOS first.
Install PiecesOS: runs on Windows, macOS, and Linux. Download here.
JetBrains IDE: Ensure your preferred JetBrains IDE (e.g., IntelliJ IDEA, PyCharm, WebStorm, PhpStorm, CLion, GoLand, Rider, RubyMine, DataGrip, AppCode, Android Studio) is installed (you can use any one). The minimum version required for the Pieces for JetBrains Plugin is 2023.1. (To check and update your IDE version, navigate to
Help
>About
within your JetBrains product).Pieces for JetBrains Plugin:
Open your JetBrains IDE.
Go to
Settings/Preferences
>Plugins
(or directly from the welcome screen'sPlugins
tab).Search for "Pieces for JetBrains" in the Marketplace tab.
Click "Install." This is your essential AI connector for the JetBrains download step.
Restart your JetBrains IDE after installation to finalize the connection.
Sign-in or Sign-up: You can create a new Pieces account (or sign in to an existing one), and access cloud-enhanced features like advanced AI models, shareable links and more. Pieces offers a generous free tier for all your needs. All your Long-term memory data remains on-device. Read more about our security practices here.
Your JetBrains IDE is now connected, and you can start asking questions and using Long-term memory to bring in all the context from PiecesOS.
Pro Tip: You don't have to take any extra steps to make Pieces remember your work; you can just browse like you do, and Pieces will create memories for you automatically. You can look at the workstream activity to see what memories Pieces collects and also export them.
Step 2: Supercharging your Context with AI (PiecesOS)
PiecesOS is an OS-level agent that helps you build context over time and allows you to work worry-free, as it remembers everything for you. Its role as an AI connector is crucial for providing a rich, persistent context for your AI interactions. PiecesOS runs locally for maximum privacy for you and your data. Learn more about how your data is handled.
Saving AI-enhanced Context from your activity:
In the PiecesOS, select Enable Long-term memory. Browse and do things you usually would. PiecesOS will start forming memories for you and begin collecting context and storing it on your device. You can also see the sources and disable or enable more sources.

Searching Your AI-Organised memory:
You can access this memory across your IDEs. (We support the majority of them) Or use the Pieces Desktop App to interact with your memories. You can simply ask, “What was I doing yesterday?”
or go more complex with your prompt and ask for something specific like “Give me the code snippet I was looking for yesterday to fix the getProfile function?”
Step 3: Activating your AI connector (using Pieces Copilot)
The Pieces Copilot is the central component of your direct AI connection within JetBrains IDEs. It provides a direct channel to all the interactions, contextualised to your active development session.
It's an intelligent AI connector for JetBrains IDEs designed for deep context, which makes Pieces a more deeply integrated experience than a standalone JetBrains AI plugin.
Open the Pieces Copilot: This is your primary interface for all your conversations with Pieces. It has multiple models to choose from, like OpenAI o3, o4 Mini, GPT 4o, Anthropic Claude 3.7 Sonnet, Google Gemini 2 Flash and more!
Access it from your JetBrains IDE's Tool Windows sidebar (typically on the left or right, or via
View
>Tool Windows
). This is your primary interface for AI-driven conversations.

Provide Context: This is where Pieces shines as an intelligent long-term memory tool.
Add files/folders as context: Drag and drop files, entire folders, or even your whole repository into the Copilot chat. This connects Pieces directly to your project's architecture and existing code, enabling it to provide far more accurate and relevant assistance, whether you're working on building a new feature or fixing bugs.
Leverage Long-Term Memory (LTM): With LTM enabled, the AI remembers past interactions, documents you've viewed, the package you were researching, discussions, and code snippets, allowing for richer, more informed conversations.
Prompt Guide: You can simply ask Give me the code snippet I was looking for yesterday to fix the getProfile function? Learn more about long-term context prompting here.

Direct Code Actions (right-click menu): Select a code snippet in your editor, right-click, and hover over "Pieces." This menu offers immediate, context-aware AI operations:
Modify selection with Copilot: Need to optimise, refactor, or transform selected code? This action sends your precise code to our Copliot for intelligent modifications, with complete context. Instantly improve code quality or adapt functions without manual rewrites right within your JetBrains IDE, letting AI handle the heavy lifting.
Explain Selection with Copilot: Get a clear, concise explanation of any selected code, right within your IDE. The Copilot understands complex logic and breaks it down for you. Quickly grasp unfamiliar code, accelerate onboarding, and reduce time spent deciphering complex functions.
Comment Selection with Copilot: Automatically generate relevant inline comments for your selected code. The Copilot connects your code's function to human-readable comments, and you can also use it to generate documentation. Ensures consistent, high-quality documentation with minimal effort, improving code clarity for your team.
AI Quick Actions (CodeLens Style): Pieces integrates AI suggestions directly into your code view. Look for "AI Quick Actions" that appear near functions:
1) Pieces: Comment: Click to generate immediate, meaningful documentation for your functions.
2) Pieces: Explain: Get a quick breakdown of code logic and kick off a deeper AI chat for more details. Instant insights at the point of need, seamlessly integrated into your coding rhythm, right where your code is.

Why Pieces is the go-to AI connector you need for your JetBrains workflow?
Pieces goes beyond simple AI features. It builds a genuine AI connection with your development environment by creating long-term memory of your work across your system, and enables you to use it via JetBrains or MCP.
Maintain deep context: The AI doesn't work in a vacuum. By integrating with your active files, folders, and saved snippets, it gains an understanding of your project, which is especially beneficial for complex projects.
Streamlining AI Interaction: No more copying code to external websites. All your AI-powered tasks: from code generation to explanation, happen directly within JetBrains, reducing friction and maximising flow state. This makes Pieces a reliable AI connector for JetBrains compared to the generic one offered within JetBrains.
Empowering informed decisions: With AI insights readily available and truly contextual, you can make quicker, more confident decisions for your workflow.
Ready to experience AI as a seamless, integrated part of your coding process in JetBrains? Download the Pieces for JetBrains Plugin and connect your code to intelligence today.