Skip to main content

Nodetool Core is the core library for Nodetool, providing the necessary functionality for building and running AI workflows.

Project description

NodeTool Core

Python Node System & Worker

Python Version Badge License Badge

NodeTool Core is the Python library that provides the node system and worker subprocess for NodeTool. The TypeScript server handles HTTP API, workflow orchestration, agents, and chat. Python handles node execution and local-compute providers (HuggingFace, MLX).


What's Here

  • Node systemBaseNode, ProcessingContext, type metadata
  • Worker subprocesspython -m nodetool.worker communicates with the TS server via WebSocket+MessagePack
  • Provider infrastructure — Base classes and registry for local-compute providers
  • Media processing — Image, audio, video conversion utilities
  • DSL — Graph construction and code generation helpers
  • Models — Database models (Asset, Job, Secret, etc.)
  • Storage — Abstract storage backends (memory, file, S3)

Quick Start

# Install
conda create -n nodetool python=3.11 pandoc ffmpeg -c conda-forge
conda activate nodetool
uv sync

# Run tests
uv run pytest -q

# Start worker (normally spawned by TS server)
python -m nodetool.worker

Writing Nodes

from nodetool.workflows.base_node import BaseNode
from nodetool.workflows.processing_context import ProcessingContext

class MyNode(BaseNode):
    """
    Brief description
    tags, keywords, for, search
    """
    input_text: str = ""

    async def process(self, context: ProcessingContext) -> str:
        return self.input_text.upper()

Nodes use ProcessingContext for media conversion (image_to_pil, audio_from_numpy, etc.), secrets (get_secret), asset storage, and progress reporting.

Architecture

TS Server (Fastify)
    ├── HTTP API, WebSocket, Auth
    ├── Workflow orchestration (DAG scheduling)
    ├── Cloud providers (OpenAI, Anthropic, Gemini, ...)
    └── Spawns Python worker subprocess
            ↕ WebSocket + MessagePack
Python Worker (this repo)
    ├── Node discovery & execution
    ├── Local providers (HuggingFace, MLX)
    └── Media processing (ffmpeg, PIL, numpy)

External Node Packages

  • nodetool-huggingface — HuggingFace model integrations + local provider
  • nodetool-mlx — Apple Silicon optimized nodes + MLX provider
  • nodetool-replicate — Replicate API integrations
  • nodetool-fal — FAL AI service integrations
  • nodetool-elevenlabs — ElevenLabs audio generation
  • nodetool-apple — Apple platform integrations

Development

# Setup
conda activate nodetool
uv sync --group dev

# Run tests
uv run pytest -q

# Lint
uv run ruff check .

License

AGPL License

Learn More

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nodetool_core-0.7.4.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nodetool_core-0.7.4-py3-none-any.whl (532.6 kB view details)

Uploaded Python 3

File details

Details for the file nodetool_core-0.7.4.tar.gz.

File metadata

  • Download URL: nodetool_core-0.7.4.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nodetool_core-0.7.4.tar.gz
Algorithm Hash digest
SHA256 f55b4bebd6f375e93a1a00dc49cd9b6f04fc9bcec5c773c115883c806c284fe2
MD5 88efae273f5c56c9c2a8353241a7bae5
BLAKE2b-256 c0802253353eb3dfc2181db9fdbac4c5a3c7171e23ed0f1f9fa0c73790525609

See more details on using hashes here.

Provenance

The following attestation bundles were made for nodetool_core-0.7.4.tar.gz:

Publisher: publish-wheel.yml on nodetool-ai/nodetool-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nodetool_core-0.7.4-py3-none-any.whl.

File metadata

  • Download URL: nodetool_core-0.7.4-py3-none-any.whl
  • Upload date:
  • Size: 532.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nodetool_core-0.7.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2ab3f9060a897ab10a99f82f978b4b9f3225dd556ded725e147b5964952fecd1
MD5 5968a7104ef50410d4209a064b283b99
BLAKE2b-256 b0aeb621a4d5fc4154dbde892d7ec835192119f5552d3782fb346e239c0f8370

See more details on using hashes here.

Provenance

The following attestation bundles were made for nodetool_core-0.7.4-py3-none-any.whl:

Publisher: publish-wheel.yml on nodetool-ai/nodetool-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page