Docs · Context Exploration Engine

Install the Context Exploration Engine.

The pip wheel is the easiest way to get CEE: it ships the C++ library and the clio_cee Python module. From source, CEE is on by default and the Python module needs CLIO_CORE_ENABLE_PYTHON, which fetches nanobind. The MCP server is a separate Python script with its own requirements.

pip
pip install iowarp-core, then import clio_cee
CMake
CLIO_CORE_ENABLE_CEE=ON, CLIO_CORE_ENABLE_PYTHON=ON
Binding
nanobind v2.9.2, fetched by CMake
MCP
mcp>=1.2,<2 and pyyaml

What each package includes

The general installation page covers every method. This page says what each one gives you for CEE.

  • pip wheel (pip install iowarp-core). Built with CLIO_CORE_ENABLE_CEE=ON and CLIO_CORE_ENABLE_PYTHON=ON. The wheel contains libclio_cee_api and the clio_cee extension under iowarp_core/ext, and importing iowarp_core puts that directory on sys.path. iowarp_core.cee_available() reports whether the extension is present. Wheels exist for CPython 3.10 to 3.13 on Linux x86_64 and aarch64, Windows x64 and macOS on Apple Silicon.
  • conda (iowarp-core on the iowarp channel, linux-64, Python 3.12). Includes CEE and the clio_cee module in the environment's site-packages.
  • Docker (iowarp/deploy-cpu). Includes the CEE C++ library. The image is meant to run the runtime; use CEE from a client on the host or in another container.
  • Spack. Variant +cee (default on); add +python for the module.
  • .deb, .rpm, AppImage, Windows installer. Native binaries without Python bindings. The C++ library and headers come with the Linux packages. The Windows presets set CLIO_CORE_ENABLE_CEE=OFF, so the Windows installer does not include CEE; use the pip wheel on Windows.
  • Source. Everything below.

Build options

OptionDefaultEffect
CLIO_CORE_ENABLE_CEEONBuilds context-exploration-engine/api: the shared library clio_cee_api, its CMake package, and the tests.
CLIO_CORE_ENABLE_CAEONRequired. clio_cee_api links clio_cae_core_client and includes the CAE's AssimilationCtx.
CLIO_CORE_ENABLE_PYTHONOFFBuilds the clio_cee module. The root build fetches nanobind v2.9.2 with FetchContent and finds Python with the Interpreter and Development.Module components. The module is installed to the detected site-packages directory (PYTHON_SITE_PACKAGES).

If CLIO_CORE_ENABLE_PYTHON is on but the nanobind_add_module command is not available, the CEE build prints a warning and skips the module rather than failing. The same option also builds clio_cte_core_ext, the CTE Python module that the MCP server and the query-files-from-Python tutorial use.

Build from source

shell
$ git clone --recurse-submodules https://github.com/iowarp/clio-core.git
$ cd clio-core
$ cmake --preset release -DCLIO_CORE_ENABLE_PYTHON=ON
$ cmake --build build -j"$(nproc)"
$ sudo cmake --install build

Look for these configure lines:

text
Python bindings enabled - configuring nanobind
Building CEE Python bindings - nanobind configured by root CMakeLists.txt
CEE Python wrapper will be installed to: /path/to/site-packages
    Context Exploration:        ON

Without installing, the module is in the build's bin directory; put that directory on PYTHONPATH. The MCP server also searches CTE_PYTHON_PATH.

Use the C++ library from CMake

The install exports the package clio_cee_api with the target clio::cee::api. Its config file finds clio_run, clio_cte_core and clio_cae_core for you.

cmake
find_package(clio_cee_api REQUIRED)
add_executable(app app.cc)
target_link_libraries(app PRIVATE clio::cee::api)

MCP server requirements

The server in context-exploration-engine/iowarp-cei-mcp/server.py needs:

  • Python 3.8 or newer, per its README.
  • mcp>=1.2,<2 and pyyaml>=6.0, from its requirements.txt. The server imports mcp.server.fastmcp, which mcp 2.x renamed, so pin below 2.
  • The clio_cte_core_ext module on the search path: the build's bin directory, CTE_PYTHON_PATH, or PYTHONPATH. It is also in the pip wheel's iowarp_core/ext, which import iowarp_core adds to sys.path.
shell
$ cd context-exploration-engine/iowarp-cei-mcp
$ python3 -m venv venv &amp;&amp; source venv/bin/activate
$ pip install -r requirements.txt
$ export PYTHONPATH=/path/to/build/bin:$PYTHONPATH

Check the install

Start the runtime, then run a round trip from Python. On Windows, set CLIO_BIND_ADDR=127.0.0.1 and CLIO_SERVER_ADDR=127.0.0.1 for both the runtime and the client.

shell
$ clio_run start &amp;
$ python -c "import iowarp_core; print(iowarp_core.cee_available())"
python
import os
os.environ.setdefault("CLIO_CTE_POOL", "563.0")   # reach the indexer for keyword search
import clio_cee as cee

ctx = cee.ContextInterface()
rc = ctx.context_bundle([cee.AssimilationCtx(
    src='string::hello', dst='iowarp::cee_check', format='binary',
    src_data="hello from the CEE")])
assert rc == 0
print(ctx.context_query("cee_check", ".*"))        # ['hello']
print(ctx.context_retrieve("cee_check", "hello"))  # ['hello from the CEE']
ctx.context_destroy(["cee_check"])

A bundle return of 1 with Failed to initialize Clio client in the log means no runtime was reachable. That failure is remembered for the life of the process, so start the runtime and run the script again.