Introduction¶
When building agents, an agent often receives more capabilities than needed for the task. Excessive tool and skill descriptions consume unnecessary tokens, and excessive tool calls increase latency and cost.
dsh-just-enough-tools is a DeepSeek Harness plugin designed to solve this problem. It puts tools and skills into a candidate pool and dynamically enables specific capabilities based on task requirements, aiming to reduce agent costs by nearly half while maintaining accuracy.
How It Works¶
The plugin is driven by Jev and supports an optional OpenAI-compatible scorer. Its core logic is to give the agent an independent enabled set.
An agent response can trigger one of three independent operations:
1. Execute: invoke enabled tools.
2. Validate and enable: invoke hidden tools, add them to the enabled set after validation passes, and execute them.
3. Request capabilities: use the [REQUEST_CAPABILITIES] marker to ask Jev to score the remaining candidate pool.
Installation and Enablement¶
Installing this plugin requires the following environment:
* Node.js 22.19+
* DeepSeek Harness 0.1.7-alpha.1
* Cordis 4.0.3
Step 1: Build and Pack
Run the following in the project root directory:
npm ci
npm pack
Step 2: Install the Plugin
Use the provided installation command to add the plugin:
npx @deepseek-ai/dsh@0.1.7-alpha.1 plugin --profile web add /absolute/path/to/dsh-just-enough-tools-0.5.8.tgz
Step 3: Start Harness
npx @deepseek-ai/dsh@0.1.7-alpha.1 web
Step 4: Configure
1. Open Plugins -> dsh-just-enough-tools.
2. Select the provider protocol (such as System One / TypeSafe or OpenAI-compatible), and configure credentials and model.
3. After saving the configuration, start a new conversation in Just enough tools mode.
Configuration and Settings¶
The plugin provides the following configurable items:
| Setting | Default |
|---|---|
| Tool / skill threshold | 0.5 |
| Maximum steps per user turn | 12 |
| Routing operation timeout | 60000 ms |
| Terminal routing diagnostics | Enabled |
Provider options:
* System One / TypeSafe
* Vercel AI Gateway (Evaluation)
* OpenAI-compatible / LM Studio
Typical Usage¶
Assume the task is “Fix a login error and run the tests”.
- Thinking phase: The agent outputs
[REQUEST_CAPABILITIES]and indicates that it needs to inspect the login flow. After the plugin scores the candidates, it enablesreadandlogin-debug, and hideseditandbash. - Inspection phase: The agent uses
readto inspect the code, then requests capabilities again. The plugin scores the remaining candidates and enableseditandbash. - Execution phase: The agent performs the edits and tests, completing the task.
Add a custom skill:
Create the .dsh/skills/login-debug/SKILL.md file:
---
name: login-debug
description: Diagnose login and session failures before changing authentication code.
---
Reproduce the failure, inspect the relevant code, make a focused fix, and run the affected tests.
Notes¶
- Standalone project: dsh-just-enough-tools is a standalone community project under the MIT license.
- Runs with permissions: The plugin runs with the permissions of the current DeepSeek Harness process.
- Error handling: A failure in scoring or registration immediately stops execution and reports an error.
- Environment requirements: Ensure you are using Node.js 22.19 or later.
Summary¶
dsh-just-enough-tools uses a Jev-driven progressive selection mechanism to help developers control agent tool access more precisely. By exposing only the necessary skills, it can effectively reduce agent runtime costs without sacrificing accuracy.