Back to Work

Project Details

Year'26
Project NameKernelBox
Source CodeGitHub
DocumentationDocs

KernelBox

Frictionless Agentic Code Execution

AI AgentsPython REPLStateful ExecutionIPython KernelZeroMQDocker Sandbox
KernelBox

An un-opinionated, lightning-fast execution engine that connects AI agents directly to stateful IPython kernels. It eliminates the subprocess trap and bloated notebook servers, allowing agents to persist memory, install packages on the fly, and save massive amounts of LLM context tokens.

Detail view 0
Let's Talk Let's Talk Let's Talk Let's Talk Let's Talk Let's Talk Let's Talk Let's Talk
All rights reservedVinay Chaudhari© 2026

Challenge

Autonomous coding agents struggle with state loss and high token usage. Running code in temporary subprocesses destroys the variables and state between steps, requiring agents to re-run entire scripts. Meanwhile, passing large dataframes or state histories back to the LLM's context window is slow, token-heavy, and fragile, while full Jupyter servers are too bloated.

Solution

Built KernelBox using jupyter_client to communicate directly with IPython kernels over ZeroMQ. By keeping session state and memory natively inside the kernel's RAM, the agent only receives small, structured outputs, which drastically cuts down token costs and latency. It also includes clean error tracebacks and a built-in Retry API to enable graceful self-correction.