aipython

aipython is a small MCP server for sharing and co-driving live Python and IPython sessions. It supports a human-visible tmux backend and a structured Jupyter kernel backend. We built it for the way we actually work: a person and an AI agent in the same running interpreter, not passing snippets back and forth and hoping the state on the other side matches.

One running session, two drivers

An agent connects to aipython over MCP and can start, attach to, and drive a shared Python or IPython session through a handful of tools: start a session, execute code, capture output, inspect state, and watch for input. The point is that it is one session. When the agent runs a line, the human sees it. When the human defines a variable, the agent can read it. Nothing is being replayed or guessed at.

Two backends

The tmux backend gives you a real terminal a human can watch and type into, with the agent driving the same IPython running inside it. The Jupyter kernel backend talks to a live kernel through structured messages, so the agent works with real execution results and objects instead of scraped terminal text. Same idea, two levels of visibility: one you can literally watch scroll by, one that hands back clean structured output.

A shared prompt

While the agent is waiting, a person in the session can leave a one-line comment addressed to it, and the agent picks up the text and answers. On the terminal backend the agent's reply is mirrored back into the session as a comment, so the conversation lives in the same scrollback as the work. It turns a Python session into a place two parties can talk about the code while the code is running.

Driving a live application

Interactive 3D and simulation do not pause politely while you think. aipython includes a cooperative driver for applications with a non-blocking single-frame step: the application keeps rendering and stays responsive while an IPython prompt or a kernel waits alongside it, and you can pause it, single-step it a frame at a time, and resume. That is how you inspect a running renderer or a live simulation from a prompt without freezing it. It is the same discipline behind our 3D graphics and visual simulation work.

Project knowledge, not baked-in assumptions

aipython does one thing well and stays out of the way of what a project needs to know. A project keeps its own plain-Markdown knowledge files in a small directory that the server can list and read on request: setup snippets that are known to work, gotchas, the parts of an API that bite. The agent discovers that knowledge and follows it, the same way it would read a project's own contributor notes. aipython fixes exactly one filename, the index, and leaves every other convention to the project, because different projects have wildly different things worth writing down.

Where it fits

aipython is part of our Python work and of how we use AI in real engineering rather than talking about it. It pairs naturally with our work binding native C++ engines to Python, where being able to drive a live, native-backed session with a human watching is worth more than any amount of static documentation.

Try aipython

aipython is not publicly released yet. If you want to try it, or you have a use for co-driven Python sessions in your own work, contact us and we will get you early access.

Talk to us

Tell us what you’re building and where it’s stuck. We’ll tell you straight whether it’s something we can help with, and how we’d approach it.

Or see how we run consulting and software development engagements.

Scroll to top

connect

Have a difficult problem that needs solving? Talk to us! Fill out the information below and we'll call you as soon as possible.

Diagram of satellite communications around the Earth
Skip to content