AI CodeGen Node
The headline 'AI code generator' that's still a placeholder
- rich_text
- STRING
AI CodeGen Node is the marquee feature of X-FluxAgent - and right now, the honest thing to tell you is that it doesn't generate any code. The node's process function has a placeholder line that returns "Generated code goes here" plus the node ID, and that's the whole "generation" until the pack's roadmap (Phase 1 and 2, still unchecked) actually lands the LLM plumbing. If you came here hoping to prompt for a Python function and get one, you'll be disappointed today.
What it does do is the structural groundwork: it's a node whose inputs and outputs you manage dynamically, straight on the node itself. A "Manage Inputs / Outputs" modal lets you add or remove slots with types - string, int, float, boolean, combo, image, audio, json, any - and the frontend updates the node's sockets live. The Python side then reads the workflow JSON out of extra_pnginfo to discover what those dynamically-created inputs and outputs are, so the node knows about its own anatomy at execution time. That's the scaffolding for "AI generates nodes that fit the graph you designed." The node you're meant to build with it doesn't exist yet.
How it works
The frontend (AICodeGenNode.js) is the interesting half. It maintains a default output ("result", STRING) so the node can be dropped on the canvas, and the modal drives addInput/addOutput on the ComfyUI node directly. Type names get mapped to ComfyUI's conventions - string becomes STRING, unknown types fall back to ANY. The backend accepts whatever dynamic inputs come in via **kwargs and inspects extra_pnginfo['workflow'] to find the node by its ID and enumerate its inputs and outputs for logging and (eventually) code generation. It's a clean foundation, clearly written - it's just that the actual code generation step is stubbed out with a hardcoded string.
There's also an optional rich_text widget (the pack's CodeMirror-based editor) that defaults to "Your code", which hints at where the generated code is meant to show up. Right now it's mostly a preview pane with nothing to preview.
What you actually get
- No required inputs - the node runs on an empty graph and spits out that placeholder string.
- Dynamic slots - add/remove inputs and outputs from the modal; any inputs you add can be wired from other nodes (like the pack's Rich Text Node) and will arrive in the node's processing.
- Output: STRING - currently just the placeholder text.
If you need working code generation in a workflow today, your move is the pack's OpenAI Chat Node (which does make real API calls) or any of the established LLM node packs - wire the reply into a text editor or a save-to-file node and you've got something functional. This node is where X-FluxAgent plans to route that pipeline, but plans aren't shipped features.
Installing and honest expectations
Install is the standard custom-node dance: ComfyUI Manager → search X-FluxAgent, or git clone https://github.com/X-School-Academy/X-FluxAgent into ComfyUI/custom_nodes/, then restart. Dependencies are light (python-dotenv, requests) and there are no models to download.
The broader picture: X-FluxAgent is a single-commit repo from mid-2025 with an ambitious README and a mostly-empty roadmap, and the community hasn't meaningfully tested it yet - the one Reddit thread about it is someone asking "is it safe?" with no answers. None of that means it's bad or malicious; the code is small and readable. It means set your expectations: this node is an honest-to-god placeholder you can play with to understand the design, not a tool that writes your software yet.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| rich_textopt | X-FluxAgent.RichTextWidget | Your code | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |