dsh-unreal-agentlink: Connect Unreal Editor to DSH Agent

Preface

In DSH, intelligent agents can already read repositories and run commands, but Unreal levels, Blueprints, Materials, and Sequencer rendering often still require manual intervention in the editor. The community has established practices for connecting to the editor via the UnrealAgentLink protocol; dsh-unreal-agentlink is a DSH workflow plugin maintained by hackmagic that acts as a pure bridge between DSH and Unreal Editor: planning and decision-making are handled by the native DSH agent, while the plugin is solely responsible for translating tool calls into UnrealAgentLink instructions and converting editor responses into results usable by the agent.

What is this

In one sentence: A pure bridging layer; the agent plans, the plugin translates.

The connection relationship is as follows:

DSH agent  ──tool calls──►  dsh-unreal-agentlink  ◄──WebSocket──  Unreal Editor
(plans, decides)            (server, translator)                 editor dials out

The plugin does not decompose tasks for the agent. It provides WebSocket services, protocol translation, and a security layer, allowing the agent to query levels, spawn Actors, modify Blueprints and Materials, render sequences, take screenshots (which can be “seen” by the model), and perform session-based undo operations when errors occur. The underlying UnrealAgentLink side has approximately 170 commands; the plugin exposes capabilities through 12 DSH tools, rather than stuffing all 170 tools into the context.

Maintainer and Repository: hackmagic, GitHub; Community Directory Page: skillhub.cn/plugins/hackmagic/dsh-unreal-agentlink. The current package version is 0.1.0, license MIT. The directory site has no official affiliation with DeepSeek / High-Flyer and is an independent inclusion within the DSH “Everything is a Plugin” ecosystem.

Core Features

Bridging and Security

  • The editor actively dials out to the local WebSocket (default ws://127.0.0.1:17860), making startup order irrelevant; UnrealAgentLink retries the connection every 5 seconds in StartupModule.
  • Works without UEBox, tokens, or handshakes. UEBox is merely another client from the same vendor; if it occupies port 17860 simultaneously with the editor, it causes a port conflict, but it is not a runtime dependency.
  • Methods not registered in the directory are rejected directly and not sent to the editor; destructive / dangerous operations go through approval (ask) via tools/pre-execute, with execution determined by session policy.

12 DSH Tools (Summary)

Tool Function
ual_status Connection, circuit breaker, rate limit, session status; check first for troubleshooting
ual_tools Lists 170 commands (22 families), filterable by family or keyword
ual_schema Exact parameter names for a command (UE silently ignores unknown keys)
ual_call Executes a single command, returns editor result as-is
ual_batch A batch of commands in one round trip (limited by maxBatchCalls)
ual_screenshot Takes a screenshot and returns an image viewable by the agent
ual_logs Reads local log ring buffer
ual_undo / ual_undo_history Rollback by session / View undo buffer
ual_locks Asset locks; editor side can display AI editing tags
ual_editor_bind Bind to a specific session when multiple editors exist
ual_task Converts long-running blocking commands to background tasks, allowing conversation to continue

Risk Grading (README stats): read 65 / write 89 / destructive 2 / dangerous 14.

Runtime Environment

Item Requirement
Unreal Engine 5.0 – 5.8
UnrealAgentLink C++ plugin, placed in project Plugins/
Node.js ^22.19.0 \|\| >=24.0.0
DSH Install this plugin as a bundle

Installation and Activation

Installation consists of three parts: enabling UnrealAgentLink in the project, registering dsh-unreal-agentlink into DSH, and opening the editor to verify. The steps below follow the order in the official README.

  1. Copy the entire UnrealAgentLink directory to the project’s Plugins/ (or engine global Plugins/).
  2. Regenerate project files and open the project.
  3. Confirm UnrealAgentLink is enabled in Edit → Plugins; it depends on the engine’s built-in IKRig and PythonScriptPlugin.

If port 17860 is already occupied (e.g., by UEBox), you can change the port when starting the editor and sync the port on the DSH plugin side:

UnrealEditor.exe MyProject.uproject -UALServer=ws://127.0.0.1:17861

2. Install and Register the DSH Plugin

In the plugin source directory, complete the build and validation first (npm run check must pass all items, including type checking, tests, and consistency of the 170-command directory):

npm install
npm run check

package.json points to cordis.patch.yml via dsh.bundle.patch, inserting the bundle item unreal-agentlink (name dsh-unreal-agentlink) into DSH. The README explains that DSH itself does not have a single command to “install a local out-of-tree plugin,” so the repository provides an installation script:

npm run status:dsh -- --profile web
node scripts/install-dsh-plugin.mjs --profile web

The script will mirror artifacts, modify the manifest, install, and verify; if DSH is still occupying the manifest, it will not rewrite it. For the web profile, use dsh --profile web --dump-config to check if # == dsh-unreal-agentlink appears in the output. For the desktop profile, you must completely exit Desktop before executing dsh plugin --profile desktop install, and verify with dsh plugin --profile desktop list (CLI cannot directly --dump-config desktop).

Alternatively, follow the README’s “Manual install” to copy lib, cordis.patch.yml, package.json, etc. to $DSH_HOME/profiles/<profile>/.vendor/, add dependencies and dsh.profile.bundles to the profile’s package.json, and then execute dsh plugin --profile <profile> install.

Configuration Layering: A later layer will entirely replace the config of that bundle line without deep merging; when overriding configuration, you must rewrite all keys you wish to retain.

3. Open the Project and Verify

After opening the UE project, have the agent call ual_status to confirm:

listening: true
url: ws://127.0.0.1:17860
editors: [ { sessionId: "ue-xxxxxxxx", project: "MyProject", ... } ]
  • listening: false: The plugin is not started or the port is occupied; check for EADDRINUSE in DSH logs.
  • listening: true but editors: []: The bridge is waiting for the editor; confirm the project is open and UnrealAgentLink is enabled.

When the editor just connects, fields like sessionId and connectedAt may exist, but project requires waiting for the project.info push, which is normal.

Then try a non-side-effect read operation:

ual_call { method: "level.get_current" }

For a more complete workflow and troubleshooting, see the repository docs/01-tutorial.md.

Typical Usage

  1. Discover Capabilities: Use ual_tools to filter command families by task; for specific methods, verify parameter names with ual_schema first.
  2. Read-only Exploration: Use ual_call for read-type commands like level.get_current.
  3. Batch Modifications: Use ual_batch to merge multiple round trips; any dangerous item within it will trigger approval for the entire batch.
  4. Visualization: Use ual_screenshot to turn the viewport into an attachment the agent can analyze (subject to limits like screenshotMaxBytes by default).
  5. Long Tasks: Use ual_task for blocking commands to avoid occupying the game thread for a long time and causing the editor to become unresponsive (Note: there is no cancel_task at the protocol level; stopping waiting does not equal cancellation on the engine side).
  6. Rollback: Use ual_undo / ual_undo_history with sessions; optionally configure rollbackOnDispose (only LIFO suffixes can be precisely rolled back; see architecture docs for details).

Common configuration default values (excerpt, see Tutorial §7 for full explanation):

Key Default Meaning
host / port 127.0.0.1 / 17860 Loopback only; exposing the port without authentication is equivalent to being able to drive the editor
timeoutMs 180000 Blocking commands have a separate lower limit
rateLimitRps / rateLimitQueue 5 / 32 Rate limiting (0 disables)
maxBatchCalls 12 Limit for a single ual_batch

Applicable Scenarios and Notes

Who it is for: Teams or individuals already using DSH for automation or agent workflows who wish to incorporate Unreal 5.x editor capabilities (Levels / Assets / Sequences / Screenshots, etc.) into the same conversation and toolchain.

Protocol-side constraints (affects usage style, not optional in this plugin):

  1. The connection direction is editor dialing out, not DSH connecting to the editor.
  2. No authentication; the port is the credential. It defaults to binding only to loopback and should not be changed to 0.0.0.0.
  3. Commands are executed serially on the game thread; the editor may not respond to other queries while a blocking command is executing.
  4. There is no protocol-level cancellation; even after ual_task stops waiting, the engine may still continue running to completion.

Permissions and Trust: The plugin runs with the current DSH process, so the editor capabilities it can call are consistent with the permissions of the user running DSH. Please review the source code and MIT license yourself before installation to ensure the approval strategy (e.g., ask for destructive / dangerous operations) meets your unattended scenario requirements.

Conclusion

dsh-unreal-agentlink converges UnrealAgentLink’s 170 editor commands into 12 DSH tools, allowing native agents to operate on levels and assets under the premise of “only translating, not planning.” For installation or version checks, refer to the community directory hackmagic/dsh-unreal-agentlink and the GitHub repository github.com/hackmagic/dsh-unreal-agentlink.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye