Connectify Docs
Login Start building
Reference

Type System & Adaptors

Connectify's type system catches mismatched connections before you run anything. When types don't match exactly but a known conversion exists, an adaptor bridges them automatically.

Built-in types

Every port carries a semantic type. The built-ins are:

TypePillWhat it represents
jpg / png / imageimageBitmap images. Concrete formats are subtypes of image.
tensortensorN-dimensional numeric arrays. Carries shape + dtype metadata.
float / intfloatScalar numerics. Used for metrics and scalar config.
string / textstringStrings and string sequences (for tokenized or raw text).
labellabelSupervisory labels — class ids, regression targets, or structured annotations.
tableColumnar tabular data with named columns and dtypes.
checkpointReference to model weights.

Compatibility rules

Two ports connect cleanly when one of the following holds:

  1. Exact match. Output jpg → input jpg.
  2. Subtype match. Output jpg → input image (jpg is a kind of image).
  3. Adaptor available. Output jpg → input png — Connectify offers to insert a jpg → png adaptor.

When none of these hold, the connection is rejected and the editor explains why.

Adaptors

An adaptor is a small named conversion that sits on an edge. It has an identity, a label, and a settings block. When two ports' types differ but a known adaptor exists, Connectify shows the Adaptor Dialog:

Built-in adaptors

FromToAdaptorCommon settings
jpgpngJPG→PNGcolorspace, dpi
pngjpgPNG→JPGquality, background
imagetensorImage→Tensorchannels, normalize, dtype
tensorimageTensor→Imagechannels, denormalize, clamp
floattensorFloat→Tensorshape (scalar by default)
stringtensorString→Tensortokenizer, pad, truncate
tabletensorTable→Tensorcolumns, dtype

Stacking adaptors

If a single adaptor can't bridge a gap, Connectify looks for a two-step chain. For example, jpg → tensor is implemented as jpg → image → tensor. Stacked adaptors render as a single labeled chip on the edge so the canvas stays clean.

Adaptor chains are bounded

Connectify won't search chains longer than two steps. If no path exists, the connection is rejected — write a Custom node or a missing adaptor.

Registering custom types

Plugins can register types via types.register(). Registered types automatically get:

from connectify import types

types.register(
    'embedding_vec',
    parent='tensor',          # Subtype of tensor
    shape=(768,),
    dtype='float32',
    color='#7c3aed',
)

Writing a custom adaptor

from connectify import Adaptor, types

class TextToEmbedding(Adaptor):
    from_type = types.text
    to_type   = types.embedding_vec
    label     = 'Text → Embedding'

    settings = { 'model': str }  # which embedder to use

    def convert(self, value, model):
        return embed_with(model, value)

Drop the adaptor into plugins/ and reload. It joins the catalog and is offered automatically whenever those types meet.