Skip to main content

Nodus

CI PyPI License: MIT

Stable on PyPI — pip install nodus-lang · Full 36-package companion ecosystem live: pip install nodus-sdk[agent,sql,fastapi]

Nodus is an orchestration DSL and embedded runtime for building agentic hosts, created by Shawn Knight as part of the Masterplan Infinite Weave ecosystem. Its execution model embodies the Infinity Algorithm's feedback-loop structure at the runtime layer — a structural correspondence documented in Infinity Pattern Mapping, not a named construct in the grammar.

There is no model in the core, and that is the design. Nodus contains no LLM client, no agent loop and no tool-selection logic; action agent "name" with {...} hands a JSON-safe payload to a handler your host registers, and takes a result back. Because the runtime cannot perform inference, every semantic decision must cross that boundary — so deterministic structure never guesses, and the model never controls sequencing.

What the language contributes: workflow, goal, step and after are real keywords with real AST nodes, and dependency names are resolved and checked at parse time — after typo is a syntax error, which LangGraph, Prefect and Airflow all discover at run time. Coroutines are a hybrid: one YIELD opcode and a VM-level Coroutine that saves ip/stack/frames, with spawn/channel/send/recv as builtins. Task graphs are a runtime library (orchestration/task_graph.py) operating on data the compiler emits — genuine deterministic sequencing, but not language-level, and the README said otherwise until v4.2.0.

If you're building multi-step AI agents, embedding a scripting layer in a Python application, or wiring together tools via MCP or A2A (through the nodus-mcp and nodus-a2a companion packages — the core language ships neither protocol), Nodus is the execution layer.

For a machine-readable project index see llms.txt.

Beyond the core language, the Nodus ecosystem spans 36 standalone companion packages published on PyPI (36 projects counting nodus-lang itself), all with source at github.com/Masterplanner25. A unified SDK (nodus-sdk) provides a single installation story: pip install nodus-sdk[agent,sql,fastapi]. See the ecosystem guide for the package-by-package breakdown.

Editor and CI integrations ship separately: the VS Code extension (syntax, LSP, debugger), the Jupyter kernel, and the nodus-run GitHub Action.

Recent: 6.1.0 closes a hole in nodus serve confinement. Since 5.10.0 the server refused import "std:subprocess", std:http and std:env for submitted code, but ran the same capabilities called directly, such as subprocess_run, http_get and env_get. They are refused now unless granted with --allow-subprocess, --allow-network or --allow-env. Upgrade any server that accepts code you did not write. Every release is in the changelog, and what each release from 5.0.0 to 6.0.2 was about is in the release themes.

Install

Requires Python 3.10+.

pip install nodus-lang

Optional extras:

pip install "nodus-lang[server]"   # FastAPI + Uvicorn — nodus serve
pip install "nodus-lang[http]"     # httpx — std:http
pip install "nodus-lang[schema]"   # pydantic — syscall/extension schema validation
pip install "nodus-lang[retry]"    # nodus-retry — durable effect store for std:retry

Without [retry], std:retry falls back to the built-in in-memory effect store.

Quick Start

Create a project:

mkdir my-app
cd my-app
nodus init
nodus run

nodus init creates nodus.toml and src/main.nd.

nodus run executes the current project's src/main.nd when run inside a project root.

Start the REPL:

nodus repl

Useful REPL commands:

  • :help shows REPL commands.
  • :quit exits the REPL.

Run A File

Create hello.nd:

print("hello")

Run it explicitly:

nodus run hello.nd

When you provide a file path, Nodus runs only that file. When you run nodus run with no file inside a project, Nodus runs only src/main.nd.

Common Commands

  • nodus --version
  • nodus run hello.nd / nodus run — run a file, or the current project's entry point
  • nodus check hello.nd / nodus check — validate syntax and imports without executing
  • nodus fmt hello.nd — format in place
  • nodus test — run *_test.nd / test_*.nd files
  • nodus repl — interactive shell
  • nodus status — show the project and entry point for the current directory
  • nodus stability — show which language surfaces are stable vs experimental

nodus --help lists the rest: project and dependency management (init, add, install, deps), inspection (ast, dis, debug, profile), orchestration (workflow, goal-run, graph run), the HTTP server (serve, worker), and the LSP/DAP servers (lsp, dap) used by the editor integrations.

Standard Library

Import standard library modules with the std: prefix:

import "std:http" as http
let r = http.get("https://api.example.com/data")
print(r.body)

The standard library ships with Nodus — no extra installs for core modules (std:http is the one exception; it needs the [http] extra above). Full reference: Standard Library guide.

Networking, processes, and the filesystem

Module What it does
std:http HTTP client — GET, POST, PUT, DELETE, PATCH; async variants; SSE streaming (requires nodus-lang[http])
std:subprocess Run processes — sp.run(argv), sp.spawn(argv) for async + channel output
std:fs Filesystem — read, write, append, exists, listdir, ensure_dir
std:path Path manipulation — join, dirname, basename, ext, stem, relative, absolute
std:env Environment variables — get, get_or, set, unset, has, list_keys

Data and encoding

Module What it does
std:json json.parse(str) / json.stringify(val)
std:math Arithmetic, rounding, min/max, random, numeric parsing
std:strings Split, join, trim, replace, contains, repeat, case conversion
std:collections map, filter, reduce, push, pop, first, last, has_key
std:encoding Base64, hex, and URL encode/decode
std:hash SHA-256 / SHA-512 / BLAKE2b, HMAC — returns a record; call .to_hex()
std:utils clamp, coalesce, get — small helpers

Time and system

Module What it does
std:time now(), from_epoch_ms(ms), format/parse timestamps, duration helpers
std:secrets Cryptographic random tokens and bytes
std:runtime Introspection — typeof, fields, fn_arity, stack_depth, tasks, scheduler

Concurrency (experimental)

Module What it does
std:async sleep(ms), parallel(tasks), series(tasks), worker_pool(worker, count), pipeline(stages)
std:loop now(), deadline(ms), at(instant), run_after(ms, fn), every(period, count, fn), until(instant, period, fn) — timers on fixed instants, so a periodic loop does not drift

channel(), send(), recv(), close(), spawn(), coroutine(), sleep_until(deadline_ms) and spawn_after(ms, fn) are VM built-ins — always available, no import needed.

AI-native orchestration (v4.0)

Module What it does
std:tool Register and dispatch tools in a namespaced local registry; MCP-shaped, bridged to the wire protocol by the nodus-mcp companion package
std:tools / std:agent Call tools and agents registered by the embedding host — execute/call, available, describe
std:identity trace_id(), session_id(), execution_unit_id() — propagated automatically
std:effects EXACTLY_ONCE idempotency — resolve, pending, complete, action_id
std:sys Versioned syscall dispatch — uniform {status, data, error, trace_id} response shape
std:memory share(ns, key, val), recall_from(ns, key), recall_all(ns), forget(ns, key)
std:retry retry.call(func, policy) — exponential backoff, jitter, max attempts; retry.until(func, predicate, policy) — retry until a result passes, not until it stops erroring
std:circuit_breaker cb.create(name, cfg) / cb.call(name, func) — three-state breaker

Testing

Module What it does
std:test test.assert_eq, test.assert_err, test.flush_async — built-in test framework

Where This Is Going

Nodus compiles itself in itself. examples/selfhost/ holds a lexer, parser, compiler and optimizer written in Nodus, 4,817 lines, and they produce the same bytecode as the Python pipeline, positions included. The goal constrains design: a feature that would stop Nodus compiling itself, or need a separate "systems" subset to work around, is treated as evidence the abstraction level is wrong.

Two things are decided (2026-11-29). The Python compiler stays the default: the self-hosted one takes about 7.7 s to compile its own source on CPython, roughly 10× the Python pipeline's 0.81 s, so it is a proof and a check rather than what nodus run uses. The VM stays in the host: a VM written in Nodus would run on the Python VM, one interpreter inside another. Throughput no longer blocks the compiler half, which is why #173 is closed. Re-derive the figures with python -m tools.selfhost_check rather than quoting them. See Language Vision §Bootstrapping.

Documentation

Using with Claude Code

If you write Nodus with Claude Code, a language skill is available that teaches Claude the idioms, gotchas, and workflow patterns specific to Nodus v4:

  1. Download skills/nodus.skill and skills/project-CLAUDE.md from this repo.
  2. Copy project-CLAUDE.md to your project root as CLAUDE.md (fill in your project name).
  3. Drop nodus.skill in your project's .claude/commands/ folder.
  4. Claude will apply Nodus-specific rules automatically in every session.

The skill covers: record vs map distinction, the closure outer-let pattern, spawn() coroutine wrapping, workflow result bracket notation, NodusRuntime embedding defaults (timeout_ms=None, allowed_paths=CWD since v4.0.1), the stdlib module surface, and 15 verified complete example programs.

Using with Codex

If you write Nodus with Codex, a Codex-native skill and project template are available:

  1. Copy skills/project-AGENTS.md to your project root as AGENTS.md and fill in your project name if needed.
  2. Copy the skills/nodus/ folder to $CODEX_HOME/skills/nodus or ~/.codex/skills/nodus.
  3. Start a Codex session in your Nodus project. Codex can auto-trigger the skill, or you can invoke $nodus explicitly.

The Codex skill covers the same core language hazards: record vs map distinction, closure outer-let mutation, spawn() coroutine wrapping, workflow result bracket notation, import rules, and NodusRuntime embedding defaults (timeout_ms=None, allowed_paths=CWD since v4.0.1), while keeping deeper material in reference files for on-demand loading.


Creator & Ecosystem

Nodus is created and maintained by Shawn Knight as part of the Masterplan Infinite Weave — an AI-native execution framework built on the Infinity Algorithm. Nodus is the runtime layer whose execution model embodies the Infinity Algorithm's orchestration structure (see Infinity Pattern Mapping).

From the creator's writing:

Metadata

Release files for nodus-lang 6.1.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 nodus-lang 6.1.0
File Size Uploaded Provenance Actions
nodus_lang-6.1.0.tar.gz 1.4 MB Without provenance Details for nodus_lang-6.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nodus-lang 6.1.0
File Interpreter ABI Platform Actions
nodus_lang-6.1.0-py3-none-any.whl Python 3 none any Details for nodus_lang-6.1.0-py3-none-any.whl

Total release size: 2.1 MB

Release files / nodus_lang-6.1.0.tar.gz

Download URL nodus_lang-6.1.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
d5342a68bbeccc876cf1920b2e3a1ab01c58e862964c68e21879aa032616d4f8
BLAKE2b-256 checksum
How to use checksums
4bab5249d55e1ef2084b06b98aefc88897f1d971fbd10e9e55de49328894ec86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / nodus_lang-6.1.0-py3-none-any.whl

Download URL nodus_lang-6.1.0-py3-none-any.whl
Size 700.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13635244219be59ddec66c75e7f1b037e4d744360464726864e4e6d1bb58b526
BLAKE2b-256 checksum
How to use checksums
fc8ad92cb0573b18bdd9e68c2698b5cec8c38f5c6d96072cc09587abb5aed4c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for nodus-lang 6.1.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.

Release history Release notifications | RSS feed

This release

6.1.0 This release

2 release files No provenance

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