Introduction¶
DeepSeek Harness (DSH) adopts a plug-in architecture, allowing functionality to be extended via community plugins. During the development process, agents often need to classify or judge text content, such as detecting harmful content, identifying sensitive information, or evaluating operation intent. The OpenAI Decisions API (gpt-6-luna) provides assertion, selection, and scoring capabilities for text and images, rather than generating natural language. The dsh-decisions-classifiers plugin integrates the Decisions API into DSH’s toolchain and services, enabling agents to directly utilize structured classification decisions.
Core Capabilities¶
This plugin provides integration across four main layers within the DSH ecosystem:
- Agent Tools: Directly provides tool calling capabilities within the agent context, including
decisions_classify(invokes built-in classifiers),decisions_ask(initiates structured Q&A of any type, approximately 10 questions per request), anddecisions_status. - Cordis Services: Externally exposes the
decisionsClassifiersservice, containinglistPresets,classify,ask, andstatusmethods for other plugins to call. - Call Gates: Provides an optional pre-execution gating mechanism. Disabled by default, when enabled, it automatically classifies before operations like
run_code,bash,write, andeditare executed, and decides whether to deny execution or escalate based on thresholds. - Advisor Cards: Displays classifier opinions next to UI
ask_user_questionmulti-select prompts, allowing users to adopt classification results with one click.
Classifier Library¶
The plugin comes with a built-in set of classifiers covering common security and business scenarios:
| Classifier ID | Type | Function Description |
|---|---|---|
moderation |
Assertion | Determines if content violates standard acceptable use policies |
prompt-injection |
Assertion | Determines if text is attempting to manipulate the AI system rather than informing the reader |
dangerous-command |
Assertion | Determines if a command irreversibly destroys data or changes machine-level state |
pii |
Assertion | Determines if text identifies real individuals |
relevance |
Assertion | Determines the relevance of text to a query (requires passing context) |
severity |
Score | Returns a probability distribution ranging from “cosmetic/workaround available” to “complete block” |
intent |
Selection | Returns classification results (e.g., billing/technical/shipping/other) and the full probability distribution |
For requirements outside the list above, you can use decisions_ask to directly send questions of any type.
Installation¶
The plugin is installed via a local path. Please ensure you have access to the directory.
dsh plugin --profile <profile> add /absolute/path/to/dsh-decisions-classifiers
Configuration¶
After installation, all fields can be configured via the Settings page, with configuration persisted to ~/.dsh/decisions-classifiers/config.json. Settings in the UI have lower priority than bundle line settings and support real-time overrides.
| Configuration Item | Default Value | Description |
|---|---|---|
enabled |
true |
Master switch |
baseUrl |
https://api.openai.com/v1 |
API base address; the plugin automatically appends the /decisions path |
model |
gpt-6-luna |
The only model currently supported by the Decisions API |
apiKeyEnv |
OPENAI_API_KEY |
Credential slot reference name |
timeoutMs |
60000 |
Timeout for each request |
defaultThreshold |
0.5 |
Assertion threshold when preset classifiers are not covered |
advisorEnabled |
true |
Whether to enable Advisor Cards |
gateEnabled |
false |
Whether to enable pre-execution call gates (disabled by default) |
gatePreset |
dangerous-command |
Classifier preset used by the call gate |
gateThreshold |
0.5 |
Denial threshold for the call gate |
gateDecision |
deny |
Decision after call gate trigger: deny or escalate |
systemPromptSection |
true |
Whether to inform the agent in its system prompt that it has classifier capabilities |
Usage Flow¶
After enabling the plugin and configuring the API Key, the usage steps are as follows:
- Install the plugin (see installation command above).
- Open Settings → Decisions Classifiers.
- Paste the OpenAI API Key and click Store key.
- The Key is written to the environment variable
OPENAI_API_KEY(or the name you set) via the DSH credential slot; the page does not read the Key back. - You can also directly set
OPENAI_API_KEYin process environment variables or the.envfile.
- The Key is written to the environment variable
- Click Test connection to confirm the connection is working.
- Enable
gateEnabledin the agent configuration (if call gates are required).
Notes¶
- Default Behavior: After installing this plugin, it will not change the existing behavior of any agent unless the call gate is manually enabled in Settings.
- Credential Security: The Key is only written to environment variables and is not displayed on the interface. Please keep the configuration file secure.
- Model Limitations: The current Decisions API only provides the
gpt-6-lunamodel.