Skip to main content

chaincompiler-si — the self-interpreter, and the MCP server the ChainCompiler plugin runs

chaincompiler-si (import si) is the self-interpreter of ChainCompiler, a compiler-compiler for cognition. It runs ChainCompiler's chain dialect, which is Python with ChainCompiler's operations injected as names — forge_ac, forge_cor, forge_sc, construct_language, SkillTree, materialize, walk, build_exchange, tree_to_mcp and the rest — so an agent can drive the whole stack in one program.

  • interpret(source) runs a program in that dialect and returns its value;
  • walk and reachable traverse a materialized skill tree by its breadcrumbs, and read_skill finds a skill by name anywhere in a tree;
  • tree_to_mcp turns a tree into an MCP server launcher, and scaffold_repo stamps a federated node repository from a tree;
  • si.server is the navigator, the MCP server the ChainCompiler plugin registers, with the tools si_walk, si_reachable, si_read_skill, si_search and si_aioses, run by the console command si-server.
  • si.build_server is the build tool, for the maker agent's own sessions, with the tools si_interpret, si_tree_to_mcp and si_scaffold_repo, run by the console command si-build-server.

si_interpret executes arbitrary Python with the permissions of the process running the server. It is an execution surface: run only programs you trust.

Install

pip install chaincompiler-si

It brings chainaios and the chain compilers at the same release, and agent-skilltree and fastmcp from PyPI. To run the server without installing anything into your own Python, run it through uv, the way the ChainCompiler plugin launches it:

uvx --from chaincompiler-si si-server

To work on it, clone the repository and run ./install.sh, which installs all fifteen packages editable.

Use

from si import interpret

print(interpret("1 + 1"))                 # 2
print(interpret("forge_ac") is not None)  # True — ChainCompiler's operations are names in the dialect

Its design

The repository's DESIGN.md §14 (this package) and §16 (the plugin that launches its server).

License

MIT.

Metadata

Release files for chaincompiler-si 0.5.0

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

Source distribution (sdist)

Source distribution for chaincompiler-si 0.5.0
File Size Uploaded Provenance Actions
chaincompiler_si-0.5.0.tar.gz 13.2 kB Without provenance Details for chaincompiler_si-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chaincompiler-si 0.5.0
File Interpreter ABI Platform Actions
chaincompiler_si-0.5.0-py3-none-any.whl Python 3 none any Details for chaincompiler_si-0.5.0-py3-none-any.whl

Total release size: 26.4 kB

Release files / chaincompiler_si-0.5.0.tar.gz

Download URL chaincompiler_si-0.5.0.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
36f1f5377a34b4d2dacef52957a0dc95ecae2c0449da978eda959bac15cd4c02
BLAKE2b-256 checksum
How to use checksums
fa6dfae8a1bd8dc69ea96a95a02445e5c0f28483f3f0ec511268462cf5c60f2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.13

Release files / chaincompiler_si-0.5.0-py3-none-any.whl

Download URL chaincompiler_si-0.5.0-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cbd76581d579758ae49e253c92f6a30c842577d9b9b5efea263a45344fb89159
BLAKE2b-256 checksum
How to use checksums
def3d977e919ffc9a9d495532953cfe99858186defd8c1b912b7cf9640ed8bc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.13

Security for chaincompiler-si 0.5.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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