PyCharm Integration

Ask Sage Plugin for PyCharm

Bring Ask Sage's governed AI models directly into PyCharm — chat, editor context actions, and knowledge-base training, with support for any JetBrains IDE

The AskSage plugin is an open-source IntelliJ Platform plugin, published by BigBear.ai LLC, that integrates the Ask Sage API directly into PyCharm. It works in any JetBrains IDE built on the IntelliJ Platform (IntelliJ IDEA, WebStorm, PhpStorm, GoLand, and more) — this page uses PyCharm as the running example since it's the most common entry point for Ask Sage users writing Python.


Table of Contents
  1. At a Glance
  2. Requirements
  3. Step 1 — Create an Ask Sage Account & API Key
  4. Step 2 — Get the Plugin ZIP
  5. Step 3 — Install in PyCharm
  6. Step 4 — Configure Credentials
  7. Using the Plugin
  8. API Coverage
  9. Known Limitations
  10. Troubleshooting
  11. Resources & Support

Instance-Specific Base URL: The endpoints and configuration shown reflect the instance at chat.asksage.ai, with an API base URL of https://api.asksage.ai. The api. prefix and path suffix stay the same across deployments — only the instance segment in the middle changes based on which Ask Sage instance you are logging into. Always use the instance approved by your organization and applicable regulatory requirements, and match the Base URL in the plugin’s settings to the instance you authenticate against.

Not yet on the JetBrains Marketplace: This plugin is pending legal/trademark sign-off before its first Marketplace submission. Until that’s complete, install it from the prebuilt ZIP or by building from source (below) — the steps to install from the Marketplace will be added to this page once it’s published.


At a Glance

Chat Tool Window

Multi-turn chat, markdown rendering, persona selection

Editor Context Actions

Explain, Refactor, Generate Docs, Ask About File, Send Selection — with keyboard shortcuts

Real-Time Web Search

A per-message Web Search toggle grounds answers in live results, with sources listed under the answer

File-Attached Queries

Attach a file directly to a chat query instead of inlining its text

Secure by Default

API key stored in IntelliJ PasswordSafe; 24-hour token exchange

Perfect for: Python (and any JetBrains-IDE) developers who want Ask Sage's governed model catalog, real-time web search, and knowledge-base datasets available directly in their editor, without switching to a browser tab.

Requirements

Before you begin

ComponentVersion
JetBrains IDE2025.2+ (PyCharm, IntelliJ IDEA, or any IntelliJ Platform IDE)
JDK21 (only needed to build from source)
Ask Sage AccountWith API key access

Step 1 — Create an Ask Sage Account & API Key

Get access

If you already have an Ask Sage account and API key, skip to Step 2.

1

Register

Go to chat.asksage.ai/register and fill in the required fields.

2

Verify your email

Enter the verification code emailed to you. If it doesn't arrive, email support@asksage.aim.

3

Generate an API key

Sign in at chat.asksage.ai, open Settings → Account, and generate a key under Manage your API Keys. Save it securely — you'll enter it into the plugin in Step 4.


Step 2 — Get the Plugin ZIP

Option A — Download the prebuilt ZIP

The fastest path until this plugin reaches the JetBrains Marketplace:

AskSage-1.0.6.zip

Option B — Build the plugin ZIP from source

Clone the repository and build the distributable plugin ZIP with Gradle:

Clone and build
git clone https://github.com/jlayman-BBAI/pycharm-asksage-plugin.git
cd pycharm-asksage-plugin
./gradlew buildPlugin

The built plugin ZIP is written to build/distributions/.

Optional — try it in a sandboxed IDE first: Run ./gradlew runIde to launch a throwaway IDE instance with the plugin pre-installed, without touching your main PyCharm installation.


Step 3 — Install in PyCharm

Install from disk

1

Open Plugin settings

In PyCharm, go to Settings/Preferences → Plugins.

2

Install from disk

Click the gear icon (⚙) next to the plugins search bar and choose Install Plugin from Disk…, then select the ZIP from Step 2.

3

Restart the IDE

PyCharm will prompt you to restart to activate the plugin.


Step 4 — Configure Credentials

Connect the plugin to Ask Sage

Go to Settings → Tools → AskSage and enter:

FieldDescription
EmailThe email address associated with your Ask Sage account.
API KeyYour Ask Sage API key, exchanged for a 24-hour access token. Stored in IntelliJ PasswordSafe, not in plain-text config.
Base URLDefault: https://api.asksage.ai. Change only if your organization uses a different Ask Sage instance (see the callout at the top of this page).

Test before you trust it: Click Test Connection to validate your credentials, then Test Model Discovery to confirm the model list loads. A successful test saves your credentials and live-refreshes the plugin's dropdowns — no IDE restart needed.


Using the Plugin

Chat tab

Open the AskSage tool window (right sidebar). Pick a model and optionally a persona under Tools, then start chatting. Check Web Search to ground a response in real-time web results — when it fires, a Sources list with the actual URLs used appears under the answer, so you can see it happened rather than just trusting the model's word for it. Responses render as markdown, with clickable follow-up-question suggestions. Use the attach-file button next to the input to send an actual file alongside your question (via /server/query_with_file) instead of pasting its contents as text — useful for PDFs, spreadsheets, and other non-code files.

Editor context actions

Right-click in the editor for:

ActionShortcut
Explain CodeCtrl+Shift+Alt+E
RefactorCtrl+Shift+Alt+R
Generate DocsCtrl+Shift+Alt+D
Ask About FileCtrl+Shift+Alt+A
Send Selection to AskSageUnassigned — add one in Settings > Keymap if desired
Add to Knowledge BaseCtrl+Shift+Alt+K

Ask About File uploads the actual file via /server/query_with_file, so it works for any file Ask Sage can process, not just what fits cleanly as inlined text.

Usage tab

Shows monthly token usage for the current Ask Sage application.


API Coverage

EndpointUsed for
/user/get-token-with-api-keyAuthentication
/server/get-modelsModel selector
/server/get-personasPersona selector
/server/get-datasetsDataset lists (knowledge base and tabular)
/server/get-dataset-infoResolving a dataset name to its numeric ID for tabular queries
/server/queryChat (standard + single-chunk simulated streaming)
/server/query_with_fileChat attach-file button; Ask About File action
/server/query-tabularAuto-detected when the Chat dataset selector picks a tabular dataset
/server/follow-up-questionsClickable follow-up suggestions
/server/count-monthly-tokensUsage tab

Known Limitations

  • No native streaming — Ask Sage's /server/query returns complete responses. The plugin simulates streaming by displaying the full response as a single chunk once it arrives, the same approach used by the Ask Sage Dify plugin.
  • Not yet on the JetBrains Marketplace — see the callout near the top of this page. Download the ZIP or build from source in the meantime.

Troubleshooting

SymptomFix
"Authentication expired" notificationYour 24-hour access token lapsed. Re-open Settings > Tools > AskSage and click Test Connection to re-authenticate.
Model dropdown is emptyClick Test Model Discovery in settings. If it still fails, confirm the Base URL matches your organization's Ask Sage instance.
Tabular query fails with a dataset errorThe selected dataset must have been created via Add to Knowledge Base on a .csv/.tsv/.xlsx/.xlsb file (tabular ingestion), not a plain-text knowledge-base entry.
Web Search is checked but no Sources appearNot every model supports tool-based web search on Ask Sage's platform. Try a different model, or ask a question whose answer clearly requires current information to confirm.

Resources & Support

Feedback Welcome: Have a request or feedback on this integration? Reach out at support@asksage.ai.

Back to top

Copyright © 2026 Ask Sage Inc. All Rights Reserved. Ask Sage is a BigBear.ai company.