Python & Console Tools
Most of what you’ll want to do has a dedicated tool. For the rest, Direktor offers two escape hatches.
run_python
Section titled “run_python”run_python executes arbitrary Python in the editor’s process using Unreal’s unreal module. It’s the universal fallback for multi-step logic, loops, or an API that no first-class tool covers yet.
Because it can do anything you could do in a Python script — including modifying or deleting assets — it is disabled by default. Enable it under:
Project Settings → Plugins → Direktor → Enable Python Tools
Once enabled, your AI client sees the run_python tool and can run code. When the code matches something a first-class tool does better, the result includes an agent_hint nudging the assistant toward that tool.
run_console_command
Section titled “run_console_command”run_console_command passes a command straight to the Unreal console — the same commands you’d type into the editor’s console window (stat fps, r.ScreenPercentage, show flags, and so on).
This tool is enabled by default. Unreal blocks genuinely destructive console commands in the editor context, so it’s a low-risk way to toggle overlays, stat readouts, and rendering switches.
When to reach for each
Section titled “When to reach for each”- A dedicated tool exists → use it. Better ergonomics and clearer feedback.
- An Unreal API with no dedicated tool → the capability catalog (
search→describe→invoke). - Multi-step logic, loops, or something genuinely custom →
run_python. - A console command →
run_console_command.