Skip to main content

A persistent Jupyter kernel workbench for LLM agents

Project description

ARCHIVED: clikernel itself now has the features of conkernel.

conkernel

conkernel gives an LLM agent a persistent, real Jupyter kernel: send code, wait for the result, read concise text, and keep the Python state. It is the sibling of clikernel, which wraps a tiny in-process shell; conkernel runs a full kernel (ipymini by default) in its own process, driven through conkernelclient, so interrupt and restart are real protocol operations and the kernel process is fully isolated from the server.

There are two frontends over one core:

  • conkernel -- a plain stdin/stdout process using clikernel's delimiter protocol, for harnesses that drive background terminals.
  • conkernel-mcp -- an MCP server exposing execute, restart, interrupt, and eval_expr tools.

Picking a kernel

No kernelspecs. A kernel is just a Python module launchable as python -m <module> -f <connection_file> -- ipymini (the default) and ipykernel_launcher both qualify. Pass --kernel <module> to either frontend, or set a default in $XDG_CONFIG_HOME/conkernel/kernel (a one-line file naming the module).

The CLI protocol

clikernel's, including its loading banner: please wait, loading..., then loading complete. first delimiter:, then the random per-session delimiter signalling readiness (launching the kernel process can take a moment, so the banner reports progress before the delimiter arrives). Then one line per request (or a -- block for multiline code, terminated by the delimiter), a . acknowledgement before execution, rendered outputs, then the delimiter. exit() or quit() on its own line stops the worker. SIGINT interrupts the running code -- state survives, and an idle kernel ignores it.

Development

pip install -e .[dev]

Versioning

Version lives in conkernel/__init__.py as __version__. Bump it with:

ship-bump --part 2   # patch
ship-bump --part 1   # minor
ship-bump --part 0   # major

Release

  1. Ensure your GitHub issues are labeled (bug, enhancement, breaking).
  2. Run:
ship-gh
ship-pypi

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

conkernel-0.1.0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

conkernel-0.1.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file conkernel-0.1.0.tar.gz.

File metadata

  • Download URL: conkernel-0.1.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.2

File hashes

Hashes for conkernel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 69e0c4afafe54080c9b7b08edfd3ed01f436ca189a1341d9af498f9b9a67bfad
MD5 ab4c6900ba598e2977305df70db3ef80
BLAKE2b-256 11994a6170541546cad759b003da5054699a1052c26e85aed69b04a8dce0f7f3

See more details on using hashes here.

File details

Details for the file conkernel-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: conkernel-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.2

File hashes

Hashes for conkernel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1098f53051c1510211f9e8a996f3d737c4fd7e3eef9f93574dc408d1a68a5f92
MD5 3ee2be2a2b8add2ed5741f62185c4b93
BLAKE2b-256 c6b197c56bf5663dc30308f2b10cea2416d3c821b904be5c1acc1d5fb1a166d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page