Nodus
v4.2.0 stable on PyPI —
pip install nodus-lang· Full 32-package companion ecosystem live:pip install nodus-sdk[agent,sql,fastapi]
[!IMPORTANT]
Breaking in the next release:
NodusRuntimedenies capabilities by defaultEmbedding only. A
NodusRuntime()can no longer run subprocesses, open sockets, or read the process environment unless you say so:# before — worked NodusRuntime().run_source(script) # now — grant what the script actually needs NodusRuntime(allow_subprocess=True, allow_network=True).run_source(script)The error names the flag:
Blocked: subprocess execution is not granted; pass allow_subprocess=True to NodusRuntime to allow it
nodus runis unaffected. A script you wrote and chose to run is not the threat model; hosting code you did not author is. The CLI never constructs aNodusRuntime.Also: a Nodus program can no longer write into
.nodus/— the workflow store and graph state — because it could previously forge run records.Why: all three external architecture audits found the same thing — the capability chokepoint was built and unused, with "the door propped open by registering subprocess and http by default." See the migration note and #405.
Recent: 4.2.0 is a correctness release — finally now runs when catch
re-throws, std:async worker pools actually run their workers, --help no
longer executes the command it documents, and the embedded runtime applies a
call-depth cap by default. It also adds an opcode-freeze gate phase and DAP
locals. See the changelog.
pip install nodus-lang
nodus init
nodus run
nodus repl
Nodus is an orchestration DSL and embedded runtime for hosting agentic systems, 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 32 standalone companion packages
published on PyPI (33 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.
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:
:helpshows REPL commands.:quitexits 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 --versionnodus run hello.nd/nodus run— run a file, or the current project's entry pointnodus check hello.nd/nodus check— validate syntax and imports without executingnodus fmt hello.nd— format in placenodus test— run*_test.nd/test_*.ndfilesnodus repl— interactive shellnodus status— show the project and entry point for the current directorynodus 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) |
channel(), send(), recv(), close(), spawn(), and coroutine() 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 |
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 |
Documentation
- User Guide — task-oriented walkthroughs; index in §7
- Language Specification — full syntax, types, control flow, imports, coroutines
- Embedding Nodus —
NodusRuntimefrom Python, sandboxing, limits - Ecosystem Specs - implementation specs for proposed Nodus libraries and frameworks
- Architecture — runtime pipeline and module system
- Changelog — version history
- Contributing — development setup, code style, and contribution process
- llms.txt — machine-readable project index for AI tools
- llms-full.txt — full content summaries for AI indexers
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:
- Download
skills/nodus.skillandskills/project-CLAUDE.mdfrom this repo. - Copy
project-CLAUDE.mdto your project root asCLAUDE.md(fill in your project name). - Drop
nodus.skillin your project's.claude/commands/folder. - 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:
- Copy
skills/project-AGENTS.mdto your project root asAGENTS.mdand fill in your project name if needed. - Copy the
skills/nodus/folder to$CODEX_HOME/skills/nodusor~/.codex/skills/nodus. - Start a Codex session in your Nodus project. Codex can auto-trigger the skill, or you can invoke
$nodusexplicitly.
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:
- Why I'm Building A.I.N.D.Y. (Or Any Tool, Really) — the strategic context behind Nodus
- Duality of Progress: Master Index — the Infinity Algorithm framework Nodus executes
- AI Search Optimization — the discoverability philosophy this project embodies
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nodus_lang-5.0.0.tar.gz.
File metadata
- Download URL: nodus_lang-5.0.0.tar.gz
- Upload date:
- Size: 551.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17a779437946931ce6843bf751c848110044efd2bc83995da2c13448256cb693
|
|
| MD5 |
7a302dbd28cbbc115e650ca460c89d95
|
|
| BLAKE2b-256 |
37de1db5bcc7f51fc2d55f3f49099306a017a478d1561f113a0531b868d45c81
|
File details
Details for the file nodus_lang-5.0.0-py3-none-any.whl.
File metadata
- Download URL: nodus_lang-5.0.0-py3-none-any.whl
- Upload date:
- Size: 364.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06588e625dc8c99d5d7c85ff81b3a738e9255c4a85d105039a0fc5ba2a5daee5
|
|
| MD5 |
50f9ba258fa118c1022daaa96d8fc7bb
|
|
| BLAKE2b-256 |
235bbc0448fa8382cf87519cc511524b2c0cc944a8c977e14525ec4fd7dbb64b
|