Skip to main content

Ipso - Closing the loop for AI-powered jupyter notebooks

AI works best with a feedback loop - make a change, verify the syntax, run the tests, and iterate.

Notebooks don't really work that way. There are no functions, everything is a global variable, and there's no place to put tests, even if you wanted to.

Ipso connects these worlds by using AI to mantain shadow metadata within a notebook to hardcode, setup, and otherwise mock any setup needed for cells to run, along with tests to ensure the cells behave properly.

This works continuously behind the scenes as you & your agents work on a notebook together. The Ipso LSP server notifies AI when the metadata has gone stale. Next, the MCP server guides the AI to make the appropriate changes, to create and ensure the cells work correctly. Finally, Ipso will run the tests in an independent kernel, to ensure that the code works correctly, without messing with your actual work.

Installing Ipso

Ipso needs to be installed in the python environment that your kernel is running in. pip install ipso will work, and pip install pytest-ipso is also needed if you want to be able to run pytest and have it automatically detect and run any ipso tests (optional)

Next, for the AI loop to work properly, you need to enable the LSP and MCP servers for your AI application. You can either point your AI to the python environment you created, or you can use something like uvx or pipx to create a global instance. For example:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "ipso": {
      "type": "local",
      "command": ["uvx", "ipso", "mcp"]
    }
  },
  "lsp": {
    "ipso": {
      "command": ["uvx", "ipso", "lsp"],
      "extensions": [".ipynb"]
    }
  }
}

Using Ipso

Just use your notebook how you normally would! As you make changes, the LSP will inform the AI to keep the metadata in sync, and it will use the MCP tool to investigate and fix any errors. Hopefully, this will allow the AI to catch any mistakes in the code it generates, or prompt further discussion as to the desired behavior (especially when changing existing logic)

To see the tests yourself, you can just run pytest "path/to/notebook", or you can use the ipso CLI to investigate, run, and edit the tests.

The CLI

The CLI lets you inspect, edit, and run the metadata that ipso attaches to each cell (fixtures, patches, and tests) without needing an AI in the loop.

Checking notebook health

# Quick check: are any cells out of date?
ipso status notebook.ipynb

# See everything ipso knows about your cells
ipso view notebook.ipynb

# Narrow it down — only cells that have tests
ipso view notebook.ipynb --filter "test:not null"

# Only show the fields you care about
ipso view notebook.ipynb --fields source,status

status exits non-zero when something needs attention, so it works well in CI or pre-commit hooks.

Running tests

# Run all cell tests
ipso test notebook.ipynb

# Run tests for specific cells
ipso test notebook.ipynb --filter "cell:abc123"

# Use a specific python environment
ipso test notebook.ipynb --python .venv/bin/python

Each cell's test runs in its own isolated kernel, so it never interferes with your live notebook state.

Editing metadata by hand

The easiest way to edit fixtures and tests directly is with the editor notebook:

# Open a side-by-side editor notebook
ipso edit notebook.ipynb

# ... make changes in notebook.ipso.ipynb ...

# Apply your edits back to the source notebook
ipso edit --continue notebook.ipynb

The editor notebook lays out each cell's fixtures, patched source, and tests as editable cells you can work with in Jupyter. When you're done, --continue folds everything back into the source notebook's metadata.

If you prefer working with JSON directly, update lets you apply changes programmatically:

# Set a fixture and test on a cell
ipso update notebook.ipynb --data '{
  "cell_id": "abc123",
  "fixtures": {"setup_db": {"description": "mock database", "source": "db = MockDB()"}},
  "test": {"name": "test_query", "source": "assert query(db) == expected"}
}'

# scaffold well-formed JSON fragments to avoid typos
ipso scaffold fixture --name setup_db --source "db = MockDB()"
ipso scaffold test --name test_query --source "assert query(db) == expected"

Accepting changes

When you've reviewed a cell and are satisfied that its metadata is correct despite the diagnostics, you can accept it to clear the warnings:

# Accept all cells
ipso accept notebook.ipynb --all

# Accept only specific cells
ipso accept notebook.ipynb --filter "cell:abc123"

Filtering

Most commands support --filter to target specific cells. Filters can match on cell ID, index, presence of metadata, validity status, and diagnostic type or severity. Multiple filters are AND-ed together; comma-separated values within a filter are OR-ed. Run ipso docs filters for the full reference.

Metadata

Release files for ipso 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ipso 0.1.5
File Size Uploaded Provenance
ipso-0.1.5.tar.gz 294.8 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for ipso 0.1.5
File
ipso-0.1.5-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
ipso-0.1.5-py3-none-manylinux_2_39_x86_64.whl Python 3 none Linux glibc 2.39+ x86-64 Details
ipso-0.1.5-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
ipso-0.1.5-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 14.1 MB

Release files / ipso-0.1.5.tar.gz

Download URL ipso-0.1.5.tar.gz
Size 294.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f9988c84f0b9b0a47843211a386907c9804b09f2651ffaaee8e99a24534ed598
BLAKE2b-256 checksum
How to use checksums
95e35db1d53f43197cb57b4cc03db4e3dcebc6c8132c85e93702d1938dc03560
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 25, 2026.

Transparency log

Release files / ipso-0.1.5-py3-none-win_amd64.whl

Download URL ipso-0.1.5-py3-none-win_amd64.whl
Size 3.2 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
d1e52ddb3bfaddc0f9aedbc71c207154fe7d65fffe9f4b02b17621d6796d2624
BLAKE2b-256 checksum
How to use checksums
5ade2163300424b43f998c1b34d586e603ed56a0d9e45e8a82db53a0964a408d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 25, 2026.

Transparency log

Release files / ipso-0.1.5-py3-none-manylinux_2_39_x86_64.whl

Download URL ipso-0.1.5-py3-none-manylinux_2_39_x86_64.whl
Size 3.7 MB
Tags Linux glibc 2.39+ x86-64 Python 3
SHA-256 checksum
How to use checksums
55bc4db44c4b55477a8bd9f90b61165f07a47972ccfb0a15ce4df9043afbae06
BLAKE2b-256 checksum
How to use checksums
041fc2d22a346fce137a8b9d3e57c754b48eb1cee0308521d682b7efdd50509b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 25, 2026.

Transparency log

Release files / ipso-0.1.5-py3-none-macosx_11_0_arm64.whl

Download URL ipso-0.1.5-py3-none-macosx_11_0_arm64.whl
Size 3.4 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f1ac9d1232bcfcfa8e05429c07af713e9e8ee6f37a30acbbb53d7da36798e46e
BLAKE2b-256 checksum
How to use checksums
bc81de037fd03522dfddd94ecda5a545a4462c7317d419d519a9d1855d70be34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 25, 2026.

Transparency log

Release files / ipso-0.1.5-py3-none-macosx_10_12_x86_64.whl

Download URL ipso-0.1.5-py3-none-macosx_10_12_x86_64.whl
Size 3.5 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
b8fc5a3df7a729f5e388f03958743025c4e8654a8b9db531664b85eec4577c78
BLAKE2b-256 checksum
How to use checksums
6bbf90358218f4aa013b7bfedb39539efd73c11571ae4498c2ca315aeda1909d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 25, 2026.

Transparency log

Security for ipso 0.1.5

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

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for ipso-0.1.5.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 Mar 25, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page