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
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
The AskSage plugin adds a dedicated tool window and editor context actions to PyCharm (and any JetBrains IDE), so you can chat with any Ask Sage-hosted model with optional real-time web search and query datasets in natural language — all without leaving the IDE, and all governed by your organization's Ask Sage instance.
Requirements
Step 1 — Create an Ask Sage Account & API Key
If you already have an Ask Sage account and API key, skip to Step 2.
Register
Go to chat.asksage.ai/register and fill in the required fields.
Verify your email
Enter the verification code emailed to you. If it doesn't arrive, email support@asksage.aim.
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
The fastest path until this plugin reaches the JetBrains Marketplace:
Clone the repository and build the distributable plugin ZIP with Gradle:
git clone https://github.com/jlayman-BBAI/pycharm-asksage-plugin.git
cd pycharm-asksage-plugin
./gradlew buildPluginThe 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
Step 4 — Configure Credentials
Go to Settings → Tools → AskSage and enter:
| Field | Description |
|---|---|
| The email address associated with your Ask Sage account. | |
| API Key | Your Ask Sage API key, exchanged for a 24-hour access token. Stored in IntelliJ PasswordSafe, not in plain-text config. |
| Base URL | Default: 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
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.
Right-click in the editor for:
| Action | Shortcut |
|---|---|
| Explain Code | Ctrl+Shift+Alt+E |
| Refactor | Ctrl+Shift+Alt+R |
| Generate Docs | Ctrl+Shift+Alt+D |
| Ask About File | Ctrl+Shift+Alt+A |
| Send Selection to AskSage | Unassigned — add one in Settings > Keymap if desired |
| Add to Knowledge Base | Ctrl+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.
API Coverage
| Endpoint | Used for |
|---|---|
/user/get-token-with-api-key | Authentication |
/server/get-models | Model selector |
/server/get-personas | Persona selector |
/server/get-datasets | Dataset lists (knowledge base and tabular) |
/server/get-dataset-info | Resolving a dataset name to its numeric ID for tabular queries |
/server/query | Chat (standard + single-chunk simulated streaming) |
/server/query_with_file | Chat attach-file button; Ask About File action |
/server/query-tabular | Auto-detected when the Chat dataset selector picks a tabular dataset |
/server/follow-up-questions | Clickable follow-up suggestions |
/server/count-monthly-tokens | Usage tab |
Known Limitations
- No native streaming — Ask Sage's
/server/queryreturns 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
| Symptom | Fix |
|---|---|
| "Authentication expired" notification | Your 24-hour access token lapsed. Re-open Settings > Tools > AskSage and click Test Connection to re-authenticate. |
| Model dropdown is empty | Click 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 error | The 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 appear | Not 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
- Source & releases: github.com/jlayman-BBAI/pycharm-asksage-plugin
- Changelog: CHANGELOG.md
- Ask Sage support: support@asksage.ai