Save Text To File
The only node in X-FluxAgent that's actually finished
Save Text To File does exactly what the display name says: it takes any string and writes it to a text file on disk. No API calls, no LLM involved, no key required - the whole node is one open() call wrapped in a ComfyUI-friendly box. If you've ever wanted to dump a prompt, a caption, or an AI-generated reply out of the graph and into a file you can actually open, this is the node for it.
The reason you'll want it: ComfyUI gives you plenty of ways to produce strings - prompt concatenation nodes, LLM chat nodes, text generators - but far fewer ways to persist them. Save Text To File is that missing escape hatch. It's also the one part of the X-FluxAgent pack that feels finished, which matters because the pack as a whole is... aspirational. More on that below.
How it works
The mechanics are delightfully boring. When you run it, the node grabs ComfyUI's output directory (the same place your images land), optionally appends a subfolder to the path, and writes the incoming text with UTF-8 encoding. The append toggle decides between "w" (overwrite) and "a" (append). That's the entire story - the node returns nothing, and its job is just to have a side effect on disk.
One detail worth knowing: it writes exactly what you feed it, with no trailing newline. So if you're using append mode to log multiple generations into one file, feed it a string that already ends in \n, or your entries will glue together into one sad run-on line. Where people get burned, it's usually this.
The inputs that matter
- text (required) - the string to save. It's
forceInput, so you wire it from another node rather than typing into the box. - filename - defaults to
output.txt. Want a timestamp? Build one upstream and pass it in; there's no auto-stamping here. - append -
FalseorTrue. Overwrite on every run, or keep adding to the same file. - subfolder (optional) - a directory under the output folder. It's created automatically if it doesn't exist, which is handy for keeping log files out of your image dump.
Your file lands in ComfyUI/output/<subfolder>/<filename>. One caveat on the append name: it's the enum "False"/"True" as strings, not a checkbox - that's a minor UI quirk, not a bug.
Installing it
X-FluxAgent installs like any custom node. In ComfyUI Manager, search for X-FluxAgent and hit install, or do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/X-School-Academy/X-FluxAgent
Then restart ComfyUI. The pack's requirements are refreshingly light - just python-dotenv and requests, neither of which Save Text To File even touches. No model downloads, no heavy dependencies, no CUDA surprises.
Honest warnings
Two things before you build this into a workflow. First, this pack is new and barely exercised: it's a single-commit repo from June 2025, and the README's install section literally still says "Coming soon" while the roadmap items sit unchecked. There's essentially one community thread about it (someone asking "is it safe?" and getting no real answers). I'm not accusing it of anything - the code here is trivially reviewable - but after the ComfyUI_LLMVISION malware incident, "tiny new pack that claims to be an AI agent" should earn a five-minute skim of the source before you trust it with real work.
Second, this is genuinely the most useful node in the pack right now. The headline "AI vibe-coding agent" stuff is a story for later; a solid text-to-file node is what actually ships today. Reach for this when you want your outputs somewhere other than the canvas - and don't expect the rest of X-FluxAgent to be this polished yet.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| filename | STRING | output.txt | — |
| append | COMBO | False | 2 options: False, True |
| subfolderopt | STRING | — |
Outputs (0)
No outputs