jupyter-aiterminal
AI Terminal for JupyterLab. Mixed AI and Command cells in a notebook-like workspace, saved as .agentnb files.
Development status: this branch is migrating the agent backend to the DeepSeek Harness (DSH) ACP runtime. The migration is under active development and has not shipped or been fully verified. Treat the DSH instructions below as the target behaviour for this branch, not as a released migration.
What it does
- AI cells run a DSH agent over the Agent Client Protocol (ACP v1) on the Jupyter server. The agent can read, write, and edit files and run shell commands in the workspace, and its Markdown reply is rendered.
- Command cells run non-interactive bash with a persistent cwd and streaming output.
- New workspaces appear in the file browser as
Untitled.agentnb. Content autosaves. Closing the tab closes the document; a full Jupyter refresh only restores tabs that were still open.
It does not include a classic SSH terminal or interactive TUI (vim / ssh / full-screen apps).
Engine
AI cells use DeepSeek Harness (DSH) through ACP v1 over stdio. The extension ships its own stdlib-only ACP transport and pins the runtime wheel deepseek-harness-runtime-bin==0.2.1rc2.
- No Python SDK facade is required.
- No Node.js, npm, or globally installed
dshCLI is required on the server. - No tool or package is installed automatically at runtime.
Security warning
Command cells and AI tool calls can run arbitrary commands as the Jupyter server user. Treat access to this extension as equivalent to a shell on that machine.
- DSH tool calls are checked by the runtime's workspace policy. A permission request is surfaced to the UI and must be approved for that request; denial, cancellation, timeout, or disconnect returns the ACP
cancelledoutcome, never an implicit approval. - Command cells execute arbitrary bash in a long-lived shell, as the user running Jupyter.
- Any user who can authenticate to the Jupyter server can reach this extension.
Recommended precautions:
- Never expose a Jupyter server running this extension to an untrusted network, and do not share an instance with people you would not give a shell.
- Run it inside a container or VM you are willing to lose.
- Keep Jupyter's own authentication enabled.
Requirements
- Python 3.10+
- JupyterLab 4.5 (4.x
<5) - An OpenAI-compatible or Anthropic-compatible API
The pinned runtime wheel contains platform executables:
- Linux:
manylinuxwith glibc >= 2.28 (x86_64 and aarch64). - macOS: >= 14 (arm64 and x86_64).
The same release also publishes a Windows amd64 wheel, but Windows is not part of the current validation scope.
Install
Install the prebuilt wheel from PyPI; end users do not need Node.js or npm:
pip install jupyter-aiterminal
Restart JupyterLab (sudo systemctl restart jupyter.service for the usual single-service deployment) after install.
Uninstall:
pip uninstall jupyter-aiterminal
Older versions were installed through the Pi/Claude agent path and could require a separately installed CLI. That is no longer the current install path; see the migration note below.
Configure
Open Settings → AI Terminal and set:
| Setting | Meaning |
|---|---|
| API Protocol | openai-completions or anthropic-messages |
| Base URL | API root for that protocol, e.g. https://api.anthropic.com or an OpenAI-compatible relay |
| Model | Model id passed to the provider |
| API Token | API key / token |
Base URL, Model, and API Token are required; API Protocol defaults to anthropic-messages for settings written before the selector existed. Empty required values produce a config error that points back to Settings. Changing them takes effect the next time you open AI Terminal (a new WebSocket).
The token is stored in JupyterLab user settings on the server (~/.jupyter/lab/user-settings/jupyter-aiterminal/) and is visible in the Settings UI. Do not commit that file or put a real token in a command line, log, or README.
Sessions and old workspaces
- A DSH ACP session is durable and independent of the runtime process. Resuming a saved session id restores the conversation; restarting the runtime process does not erase the session.
- If a saved session cannot be resumed, the extension reports the saved context as unavailable and does not silently replace it with a fresh session. Starting a new context is an explicit user action.
- Workspaces created by older Pi/Claude-era builds still open and keep their visible cells and history. Their old agent session ids are not resumable through DSH, so they start without a linked runtime context. A bounded read-only history bridge is the intended migration path, but that migration is not released or fully verified in this branch.
Use
- Create an AI Terminal workspace with either entry point:
- Open the Launcher → Other → AI Terminal to create it in the current file-browser directory.
- In the left file browser, right-click a folder and choose AI Terminal to create it inside that folder. Right-clicking a file or blank listing space creates it in the current directory.
- A collision-safe
Untitled.agentnbfile is created and opened automatically. - Type in a cell. Double-click the prompt (or use the toolbar) to switch AI / Command.
- Run with Shift+Enter (run and advance) or the toolbar Run button.
- Select text in a cell to show a copy icon at the pointer; click it to copy.
Cmd/Ctrl+C/V/X/Awork as usual. In command mode,dddeletes the cell.
Command cells share one bash session per tab, so cd persists. AI cells use the server-side DSH runtime, not that bash session.
Deploy
- The change is limited to the Jupyter server process (
jupyter.servicein the usual deployment); restart it after installing the new wheel. - Back up
.agentnbworkspaces and the server-side Jupyter settings before upgrading, and keep the previous wheel so rollback is a reinstall plus settings restore. - Do not put API tokens or other secrets in deployment scripts, unit files, logs, or documentation. The target host does not need this README to run the extension.
Develop
jlpm install
jlpm test
jlpm typecheck
jlpm eslint
pytest
python -m build
License
BSD-3-Clause
Metadata
Release files for jupyter-aiterminal 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jupyter_aiterminal-0.8.0.tar.gz | 597.4 kB | With provenance | Details for jupyter_aiterminal-0.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jupyter_aiterminal-0.8.0-py3-none-any.whl | Python 3 | none | any | Details for jupyter_aiterminal-0.8.0-py3-none-any.whl |
Total release size: 727.5 kB
Release files / jupyter_aiterminal-0.8.0.tar.gz
| Download URL | jupyter_aiterminal-0.8.0.tar.gz |
|---|---|
| Size | 597.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08e3729bc5e5f5e91624c481adf91bfc751bf8974df752922f8740614f4f7d64
|
|
BLAKE2b-256 checksum How to use checksums |
c18c6ff72f3f7fcffb51f62d8318583ec526683c9f948663e07345c45b92f1e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logRelease files / jupyter_aiterminal-0.8.0-py3-none-any.whl
| Download URL | jupyter_aiterminal-0.8.0-py3-none-any.whl |
|---|---|
| Size | 130.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
974cc57294731015344450e0c01d24a2a5e827a7ebebc1a73d56f9fcd9d7dade
|
|
BLAKE2b-256 checksum How to use checksums |
8e7a58c4277f8674b0f22c40eb6364d56e08470c8c95852a7a647ec279376f22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logSecurity for jupyter-aiterminal 0.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for jupyter_aiterminal-0.8.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.