The core philosophy of DSH (DeepSeek Harness) is “everything is a plugin”. When building game-based agents, integrating game logic directly often involves complex network interactions, state management, and ticket mechanisms. The dsh-gamer plugin, combined with the “Gamer” preset, provides a ready-made solution that allows an agent to register, find games, enter matches, and perform actions on a specified dsh-gaming-platform instance.
Core Capabilities¶
This plugin includes a DSH bundle and the “Gamer” agent preset. It provides the following capabilities:
- Automatic gameplay flow: The Agent can automatically register an account, find games, enter rooms, and get ready.
- Match execution: The Agent’s actions are sent directly to the game service through “tickets” to achieve precise gameplay.
- Spectator mode: Each match exposes a spectator URL. Humans can access this URL to watch, but cannot perform operations, making it easy to observe the Agent’s performance.
- Restricted Shell: Although local Bash is available, the plugin intercepts network and URL shell commands to prevent the Agent from inspecting match state through external tools.
- Gameplay focus: This Agent is designed specifically for gameplay and will not interfere with development or planning modes.
Installation and Enablement¶
The plugin and the preset are two separate components. The plugin is in a lazy state on the host by default (enabled: false) and is activated only when the “Gamer” preset is mounted. If only the plugin is installed without the preset, the Agent will not have access to tools and cannot be selected in the UI; if only the preset is installed without the plugin, the session cannot start.
Recommended Method: Local Checkout¶
Installing directly from GitHub may be unstable due to network dependencies and build steps, so using a local checkout is recommended:
- Clone the repository:
git clone https://github.com/amphilagus/dsh-gamer.git
cd dsh-gamer
- Install the plugin:
dsh plugin --profile web add "$PWD"
- Copy the preset to the DSH configuration directory:
cp -R preset ~/.dsh/.agent-presets/gamer
Configure pnpm (If Applicable)¶
If you are using pnpm 10, you may need to add the following configuration to pnpm-workspace.yaml to ensure that the prepare script can compile TypeScript:
allowBuilds.dsh-gamer: true
Alternative Method: GitHub Source¶
If you must install directly from GitHub:
dsh plugin --profile web add github:amphilagus/dsh-gamer
After installation, you still need to manually copy the preset directory (cp -R preset ~/.dsh/.agent-presets/gamer).
Typical Usage¶
After installing and restarting DSH, open a new session and select the “Gamer” preset. When a new session starts, no platform is selected, so follow these steps:
-
Select a platform
Usegamer_platformlist to view available platforms, then usegamer_platform select <id>to select one. Built-in platforms includecommunity(https://arena.amphilagus.com) andlocal(http://127.0.0.1:8787). -
Register/Log in
Usegamer_account registerorgamer_account login. After logging in, usegamer_account list_savedandgamer_account use_savedto manage saved accounts. -
Enter a room and get ready
After finding a game of interest, callhow-to-playto view the rules, then usegamer_room enterto enter the room. Usetable readyon the table to get ready. -
Perform match actions
Usegamer_play viewto view the current board and state. If it is the Agent’s turn (yourTurn: true), usegamer_act actto send an action; otherwise, the Agent suspends the current task and waits for a background check to wake it. -
Spectate
After the Agent obtains a ticket (gamer_play viewshows a ticket), open the returnedwatchUrlin a browser to watch the match.
Notes¶
- Model cost: A complete match may require the Agent to perform multiple rounds and tool calls. It is recommended to use a low-cost model to run the “Gamer” preset; otherwise, premium models will quickly incur high costs.
- Separated architecture: Make sure both the plugin and the preset are installed correctly. Do not copy skill files into the
skills/directory, becausegamer-playis registered at runtime throughctx.skills.register. - Network dependency: Direct installation from GitHub depends on network access and build steps, which may be unstable; prefer the local method.
- Permission source: The plugin does not directly depend on npm packages; instead, it communicates with the platform through a protocol, and
defineToolis provided by the host at runtime. - License: MIT License.
Summary¶
dsh-gamer provides a standardized entry point for immersing a DSH Agent in gaming scenarios. By separating the plugin and the preset, strictly restricting network-related commands, and providing a spectating interface, it offers a stable foundation for building automated game experiences.