Get Started

? Custom Node

TLDR: Custom nodes let you write Python code for behaviors that standard nodes can't handle. The properties panel has three tabs: Config, Code, and AI Assist. Pro feature.

Config Tab

The Config tab has two sections:

Node Identity

Base TypeColorBehavior
ProcessorGreenProcesses agents with service time
SourceBlueGenerates new agents
DelayAmberDelays agent movement
BatcherCyanBatches agents together
AssemblerPurpleCombines multiple agents

Status

Shows whether code has been defined:

Code Tab

Quick Templates

Four starter templates to get you going:

Click a template to preview it, then insert it into the editor.

Python Code Editor

A dark-themed text area where you write your process(env, entity) function. The editor shows the function signature process(env, entity) and language label "Python" in the header.

def process(env, entity):
    # Your logic here
    yield env.timeout(5)
    return entity

The env parameter is a SimPy environment. Use yield env.timeout(time) to simulate delays. The entity has attributes you can read and modify.

AI Assist Tab

Don't know Python? Describe what you want in plain English and let AI generate the code.

  1. Type a description in the text area (e.g., "Process entities faster if their priority is high")
  2. Click "Generate Python Code"
  3. The generated code appears in the Code tab for you to review and edit
When to Use Custom Nodes

Start with standard nodes — Entry, Processor, Separator, Assign, etc. cover most scenarios. Only use Custom when you need logic that can't be achieved with the built-in nodes. Most simulations don't need custom code.