Skip to main content
Custom nodes allow you to extend Noxus with specialized functionality tailored to your specific needs. This guide covers everything you need to know to build, test, and deploy custom nodes.

Node Architecture

BaseNode Class

All nodes inherit from BaseNode[ConfigType], a generic base class that provides the node lifecycle and interface.

Node Metadata

node_name (str, required)
  • Unique identifier for the node type
  • Use snake_case convention
  • Must be globally unique across all nodes
title (str, required)
  • Display name in UI
  • Use Title Case
  • Keep concise (2-4 words)
category (NodeCategory, required)
  • Groups nodes in palette
  • Options: AIText, Agent, Logic, Data, Integration, InputOutput, Utility
color (str, required)
  • Hex color code for node appearance
  • Use brand colors or category-standard colors
image (str, required)
  • Icon URL (PNG/SVG)
  • Displayed in node palette and on canvas
  • Recommended size: 48x48px
visible (bool, default: True)
  • Whether to show in node palette
  • Set to False for deprecated or internal nodes

Defining Inputs and Outputs

Connector Types

Single-Value Connector:
Variable Connector (multiple named inputs/outputs):
Variable Type-Size Connector (different types):

Data Types

Noxus supports rich type definitions:

Optional Inputs

Node Configuration

Configuration fields allow users to customize node behavior without connections.

Configuration Schema

Define a Pydantic model for configuration:

Configuration Field Types

ConfigText: Single-line text input ConfigBigText: Multi-line textarea ConfigRichTextVariables: Rich text editor with variable insertion ConfigSelect: Dropdown selection ConfigMultiSelect: Multi-select dropdown ConfigToggle: Boolean switch ConfigNumberSlider: Numeric slider ConfigDictList: Key-value pair list ConfigJsonSchemaBuilder: JSON schema designer ConfigModelSelect: LLM model picker ConfigToolsSelect: Agent tool selector

Dynamic Configuration

Generate configuration options dynamically:

Implementing Node Logic

The call() Method

The call() method is where your node’s logic executes:

Sync vs Async

Nodes can be synchronous or asynchronous: Async (Recommended):
Sync:
Use async for:
  • Database queries
  • External API calls
  • I/O operations
Use sync for:
  • Pure computation
  • Simple transformations

Execution Context

The ExecutionContext provides access to platform resources: Database Access:
Redis Access:
Credentials:
LLM Access:
Embeddings:
User/Group Info:
Fingerprint (Run Metadata):

Error Handling

Raising Errors

Raise exceptions to signal errors:

Continue on Error

Users can configure nodes to continue on error. Your node should return default values:

Timeout Configuration

Nodes can specify dynamic timeouts:

List Handling

Nodes automatically handle list iteration when a list output connects to a non-list input. Option 1: Non-List Input (Automatic Iteration):
Option 2: List Input (Processes Entire List):

File Handling

Reading Files

Creating Files

Testing Custom Nodes

Unit Tests

Integration Tests

Registering Nodes

Register your custom node with the node registry:
For plugin-based distribution:

Best Practices

Design

Single Responsibility: Each node should do one thing well Composability: Design nodes to work together via connections Clear Naming: Use descriptive names for nodes, inputs, and outputs Consistent Style: Follow existing node conventions

Performance

Async I/O: Use async for network and database operations Batch Operations: Process batches efficiently when possible Resource Limits: Set appropriate timeouts for long operations Memory Management: Clean up large objects after use

Error Handling

Descriptive Errors: Provide clear error messages Validation: Validate inputs early Graceful Degradation: Return sensible defaults when possible Logging: Log errors with context for debugging

Security

Input Validation: Validate and sanitize all inputs Credential Handling: Never log or expose credentials API Rate Limits: Respect external API rate limits Dependency Security: Keep dependencies updated

Advanced Topics

Progress Updates

Report progress for long-running operations:

Streaming Outputs

Stream outputs for real-time updates:

Memory Nodes

Access persistent memory:

Example: Complete Custom Node


Building custom nodes extends Noxus with unlimited possibilities. Start with simple nodes and gradually add complexity as you master the patterns.

Node Configuration Guide

Deep dive into configuration field types and dynamic configuration