This article is part of the TouchDesigner Advent Calendar 2026!

Introduction
I made a tool called touchdesigner-bridge. It is a Python script for reading and editing TouchDesigner from a shell, simply and conveniently, and AI agents such as Claude Code and Codex can use it. In this article I describe touchdesigner-bridge and why I developed it.

The tool is on GitHub under the MIT license, so please feel free to use it and modify it. PRs and forks are very welcome too.
Background
As AI agents have spread, several tools designed for them have been released for TouchDesigner as well. One that I think is widely used and well known is touchdesigner-mcp by 8-beeeaaat!!!.
Until now, I had not been using AI agents when working in TouchDesigner, because
- it felt faster to operate it directly with my own hands
- it was hard to decipher and keep track of the nodes an AI agent had made
But I was curious whether they might open up some kind of expression I couldn't reach by working in TouchDesigner on my own, so I decided to give AI agents a try.
To do that, I also developed a tool for the purpose (called "bridge" from here on).
Design
No MCP server
I decided to have the AI agent and TouchDesigner communicate by reading and writing temporary files, rather than through an MCP server. MCP servers are very convenient, but they can involve setting up an environment and occupying a port, so they are not always the best method. In this case, some testing beforehand showed that the bridge could probably be done without an MCP server, so I settled on temporary files.
Keeping setup simple
Related to the previous point, I was particular about reducing the effort of setup and use as much as possible. What mattered to me was that an AI agent that has loaded the bridge can launch a project directly even when TouchDesigner isn't running, and that it can be used with existing projects without any hassle to install.
Keeping input and output concise
I designed the tool so that the information read and written through it stays as simple as possible, to avoid wasting the AI agent's input and output tokens. The information that comes back from TouchDesigner to the AI agent in particular, such as raw logs and detailed output, can add up to a lot of traffic in all sorts of ways. I cut and simplified this as needed. Besides lowering the cost of using an AI agent, this can also be expected to make responses faster.
Projects that users can understand and edit
I set out to have nodes edited in a way the user can understand. The nodes AI agents placed didn't take meaningful grouping or signal flow into account, and it was sometimes difficult for the user to make further changes. Also, where something could be processed in code such as GLSL or Python, an agent would sometimes put all of it into a single GLSL TOP or Script CHOP, which made it a challenge for the user to follow the processing step by step. With the bridge, I made adjustments through the script and a Markdown guide for AI agents, so that the choice and placement of nodes is as easy as possible for the user to follow.

Installing touchdesigner-bridge
In an environment with TouchDesigner installed, all you have to do is tell your AI agent "I want to use https://github.com/monoton-music/touchdesigner-bridge", and the installation is done. It uses only the Python 3 standard library, so there is no need to install additional libraries or set up a server.
I have only tested it myself on TouchDesigner 2023 and later, but I think it will probably work on earlier versions too. It runs on Windows, macOS and WSL.
What the tool does
I'll leave the detailed explanation to the README in the repository, but basically, when the AI agent runs td.py, it passes the kind of command, and that command's own arguments, as arguments, and the tool returns information from TouchDesigner or edits the TouchDesigner project. On the TouchDesigner side, touchdesigner_bridge.py is running and handles the input and output.
GUIDE.md gives AI agents using the bridge the constraints and context that are difficult to convey in the formalized shape of a script.
Here are a few examples of useful commands.
The cook command
You can go through the operators with the heaviest load in order, and identify the cause when you're looking into reducing that load.
It is similar to TouchDesigner's Performance Monitor.

Here is an example.
$ python3 td.py cook /project1/fountain
target 60 fps measured 60.2 fps frame ms avg 16.60 med 16.24 max 26.38 skipped 0/20
cooking 9 of 15 ops under /project1/fountain, cpu 5.94 ms/frame: POP 4.00 TOP 1.95
cpu ms/frame | gpu ms/frame | cooks/60 | path type
3.165 0.373 60 /project1/fountain/spark particlePOP
1.165 0.322 60 /project1/fountain/render_spark renderTOP
0.562 2.695 60 /project1/fountain/blur_glow blurTOP
...
The build command
You can create and connect several operators with a single command. By adding a comment after #, you can also leave notes that help the user understand the network when they look at it later. If creation fails partway, the whole change is undone, so it is safe to run.
Added operators are automatically placed where the signal flow is easy to follow, such as next to the operator they connect to. Operators that were already there basically stay where they are, but when there is no room to insert one into an existing wire, the operators to its right move over together. You can also rearrange everything with the layout command.
Here is an example.
$ python3 td.py build /project1/fountain - <<'E'
blur_glow blurTOP size=24 # soft light around the dots
add_glow addTOP # the dots plus their glow
render_spark -> blur_glow
render_spark -> add_glow
blur_glow -> add_glow[1]
add_glow -> out_fountain
E
The compare command
You can compare the output before and after changing a parameter, on the same frame. It isolates just the difference in look caused by a change to the project, under the same conditions, so you can examine its effect.
Here is an example.
$ python3 td.py compare /project1/fountain/out_fountain /project1/fountain/add_glow bypass=1
/project1/fountain/out_fountain 1280x720 A = as it is, B = with bypass=1
A mean 0.1116 median 0.0073 90% 0.4912 99% 1
B mean 0.0671 median 0 90% 0.25 99% 1
differs in 52.67% of the picture, by 0.0841 on average there and 1 at most; B - A mean -0.0445

Example of use
The example below was made using Fable 5.2 (low effort) from Claude Code, with nothing but my prompts, starting from creating an empty project. I deliberately chose and asked for subjects that are difficult to achieve with TouchDesigner's standard renderer, such as volumetric light, explosions and reflections. It renders at a steady 60 fps on a Windows gaming laptop with an NVIDIA GeForce RTX 4080 Laptop GPU.
In my prompts, I looked at the output and gave instructions for adjusting the look, or said how I wanted the motion changed.
AI-assisted media design
AI agents developed around coding, but they are also being put to use in media design, including real-time rendering, video production and interactive content. When working with AI assistance, I believe it is important to keep things in a form that both the user and the AI can easily access, grasp and edit. I feel that thinking about the tools, intermediate representations and data formats for that is the task to take on now.
In that sense, I'm not currently very interested in methods where a model directly generates media such as audio, image or video files. They leave little room for the user and the AI to collaborate, and they easily become black boxes. I'm aware, of course, that the output can be controlled through input such as prompts, but it is difficult for the user to grasp and edit the process that leads to it.
The user grasps what the AI agent has generated and decides on the next step. If they aren't satisfied with the result, they need to give that feedback to the AI agent. Code is one tool suited to this kind of exchange, but not all work in media design is code-based. It is also necessary to grasp results visually. Even at a time when AI agents are everywhere, I think TouchDesigner can be one option, as an environment where it is easy for users and AI to collaborate.
Closing
AI agents themselves make the cost of development quite small, so it has become easier to work on problems than before. The development of the bridge itself was fully supported by Claude Code, and the code, tests and documents are all generated by Claude.
What matters in media design is to repeat, as many times and as carefully as possible, the cycle of prototyping, taking in the result and exploring the next direction. AI agents are a powerful means of driving this loop. If users do the directing themselves as they put them to use, I think the work will become more interesting.
I want a creative process that is more enjoyable for me, and work that is interesting for the people who receive it. To that end, I will keep exploring media design as a way of working well with AI agents.
