🤖 Agentic AI Workflows

Design n8n-style intelligent workflows directly inside CupCarbon — or from your browser — and connect them to your simulated IoT network. Chatbots, LLM agents, MQTT pipelines and sensor automation, all visual.

Open the Web Editor CupCarbon Studio Command Reference

The visual editor

Open it from the CupCarbon toolbar (🤖 button). Dark n8n-like canvas: add nodes from the ☰ palette, drag them, connect output ports to input ports, edit parameters in the side panel, zoom and pan. Workflows are saved per project (one JSON file each, kagent-compatible) and you can create as many as you want. Run one or run them all — they execute continuously until stopped, independent of the simulation, with a green running frame, live node flashes and a per-node output inspector.

TriggersChat · Manual · Schedule · MQTT · CupCarbon Read
DataSet · Code (JS) · Filter · Split Out · Aggregate · HTTP
FlowIf (true/false) · Merge (append/position/key) · Wait
AIAI Agent (Claude / OpenAI)
CupCarbonSend · Sensor Input · Action
OutputMQTT Publish · Display · Chat Response

The n8n data model

Every node receives an array of JSON items and applies its function to each item — exactly like n8n. Parameters accept JavaScript expressions evaluated per item in a sandboxed engine:

Hello {{ $json.firstName.toUpperCase() }}
{{ $json.email.split("@")[1] }}
{{ $json.items.length }} items — index {{ $itemIndex }}

The Code node runs full JavaScript with $json, $itemIndex and $input.all(), in two modes: once per item, or once for all items.

The AI Agent

A real LLM in your workflow: choose Anthropic Claude or OpenAI, set your API key once in the editor's API Keys dialog (stored locally, never hard-coded), and the agent answers with structured JSON merged into the items — {"action": "mark", "response": "marking the node"}. Optional window-buffer conversation memory makes multi-turn chatbots possible, and a configurable rule-based fallback keeps workflows running without a key or network.

Chat Trigger ─▶ AI Agent (memory: window) ─┬─▶ Chat Response
                                           └─▶ If action == 'mark' ─▶ CupCarbon Send

The CupCarbon ⇄ AI bridge

Workflows and simulated nodes talk both ways:

From the browser

Everything also works remotely over MQTT with secure per-session topics (Copy Topic button): the Web Workflow Editor (design visually in the browser, then send to CupCarbon), CupCarbon Studio (console + workflow exchange with visual preview) and the Web Console.