dsh-tabbit-brain: Independent Inference with the Tabbit Model via Local Gateway in DSH

Preface

The DeepSeek Harness (DSH) main agent typically handles tool calls, Skill execution, and delivery within the same conversation. When dealing with code reviews, root-cause hypotheses, design trade-offs, or long-form reasoning, stacking everything in the main context can cause cross-contamination and is not conducive to parallelism: collecting evidence on one side while doing independent analysis on the other is much smoother. A common workaround is to spawn a sub-agent or open an external chat window, but that often drags along the DSH toolchain, Skill catalog, or main-session history, creating unclear boundaries.

This document introduces the community plugin dsh-tabbit-brain (maintainer wbdxy): the main agent calls Tabbit-side models through a local OpenAI-compatible gateway, completing a “private text-reasoning session” inside DSH without creating a DSH sub-agent, without inheriting the main conversation’s tools and Skill catalog, and without popping up an additional UI window.

What Is This

dsh-tabbit-brain is a sub-agent provider plugin for DSH, classified as model reasoning. It sends reasoning requests to a local Tabbit gateway (default http://127.0.0.1:8787), which reverse-proxies the Tabbit service. The plugin manages prompts and conversation history itself, isolated from the DSH main session. Current version 0.12.0 (MIT license), requires Node.js ^22.19.0 || >=24.0.0 and Cordis 4+.

SkillHub catalog page: wbdxy/dsh-tabbit-brain. For source code and detailed protocols, see the GitHub repository and SETUP.zh.md, REVERSE-PROXY.zh.md.

Core Features

Independent Reasoning Partner (delegation guidance)

The plugin injects guidance explaining when the main agent should consult Brain: independent code review, candidate causes and counterexamples, design trade-offs, difficult derivations, drafting and completeness review, etc. Independent analysis can proceed in parallel with the main agent’s evidence collection; the main agent provides a bounded brief, collects results, verifies them independently, and remains responsible for delivery — delegation does not guarantee higher accuracy or faster completion.

delegationStyle options:

  • standard (default): proactively use independent reasoning at appropriate times without waiting for the user to explicitly name the tool.
  • aggressive: same capability and verification rules, lower trigger threshold for small tasks.
  • off: disable injected guidance; simple facts and short edits can stay local.

A single request can specify a model id exposed by the gateway via model; if unspecified, the configured agentModel is used. The plugin does not assume expertise based on model names.

Tools and Sessions

The main agent and regular sub-agents (each with its own owner) can use the Brain-related tools listed in the README, typically including:

  • tabbit_brain: requires description, prompt; optional conversation, model, run_in_background (defaults to background). Omitting model uses agentModel, or pass an id from the gateway /v1/models for a one-time override. The Harness jobId and brainJobId are separated: use job_output / job_kill to manage harness tasks, and tabbit_brain_status to check Brain tasks.
  • tabbit_brain_list / tabbit_brain_read: list conversations, read messages paginated by seq; when paginating to older pages, set before to the minimum seq of the current page.
  • tabbit_brain_archive / tabbit_brain_delete: archive or delete local records (remote account memory deletion is not guaranteed).
  • tabbit_brain_reset: clears only the local history of an idle tab, preserving remote context.

Key points:

  • Requests do not contain tools / tool_choice; the model id returned by the gateway must match the request, otherwise an error is raised (silent model swapping is rejected).
  • History is isolated by caller owner and conversation tag; same tags are serialized, different tags are independent. Persisted in ~/.dsh/plugins/dsh-tabbit-brain/state/brain.sqlite.
  • Each request snapshots the configuration; it must fit contextBudgetChars, and earlier complete turns will be discarded to make room — the current task is not silently truncated. Failed turns are not added to history.

Capability Boundaries

tabbit_brain is a pure text OpenAI-compatible request to the local gateway. It does not inherit the main DSH conversation, local DSH skill-catalog, workspace files, attachments, browser tabs, or DSH tools. If a task depends on a DSH Skill, the main agent must execute it first, then write the result or a faithful excerpt into prompt.

The upstream Tabbit (via reverse proxy) may have server-side capabilities such as search, web scraping, Tabbit’s own Skill/trick retrieval, image reading, etc.; these are unrelated to the local DSH Skill catalog, and returned facts still need verification by the main agent. The current bridge is not validated as a verifiable browser-control channel; browser_control etc. may only return text. The tabbit_brain tool itself only accepts text; general file attachments are not connected.

Installation and Activation

Prerequisites (from the official SETUP): Windows, Node.js 22.19+, an installed DSH, and an installed and logged-in Tabbit. For gateway deployment and reverse-proxy protocols, see the repository’s REVERSE-PROXY.zh.md.

1. Deploy the Gateway

After understanding the protocol, run the following in the plugin directory (PowerShell example):

node gateway-patch/install.mjs --dry-run
node gateway-patch/install.mjs --api-key <YOUR_KEY> --base-url https://web.tabbit.com

<YOUR_KEY> must match the gateway .env’s API_KEY, and should be provided to DSH via the environment variable TABBIT_API_KEY (or your configured apiKeyEnv in the plugin). The international version of Tabbit uses https://web.tabbit.ai as its base URL.

Verification:

Invoke-RestMethod 'http://127.0.0.1:8787/healthz' -Headers @{Authorization="Bearer <YOUR_KEY>"}
Invoke-RestMethod 'http://127.0.0.1:8787/v1/models' -Headers @{Authorization="Bearer <YOUR_KEY>"}

2. Install the Plugin

Following SETUP, obtain the source code, install dependencies, then use the link method to install into a specified profile:

git clone https://github.com/wbdxy/dsh-tabbit-brain.git
cd dsh-tabbit-brain
npm install --ignore-scripts --legacy-peer-deps
dsh plugin --profile <PROFILE> add link:<ABSOLUTE_PLUGIN_DIR>

Replace <PROFILE> with the actual DSH profile, and <ABSOLUTE_PLUGIN_DIR> with the absolute path to this plugin directory. No additional sub-agent preset or manual mounting of tool-subagent-tabbit is needed.

3. Configuration and Checks

Common configuration items (defaults are in the repository README configuration table) include: agentModel (default 'DeepSeek-V4.1-Flash', must match the id returned by /v1/models), gatewayUrl (default http://127.0.0.1:8787), apiKeyEnv (default TABBIT_API_KEY), contextBudgetChars (16000), requestTimeoutMs (120000), delegationStyle, etc. Keys should only be placed in environment variables, not written into source code or documentation.

Read-only setup check (does not start the gateway or modify settings):

node scripts/setup.mjs --help
node scripts/setup.mjs --base-url http://127.0.0.1:8787 --api-key-env TABBIT_API_KEY --models DeepSeek-V4.1-Flash --check-gateway --yes

4. Restart DSH

After restarting, confirm in a regular main conversation that the tool list contains tabbit_brain. When using progressive presets, call phase_begin through the normal flow first; do not use phase_advance to fake phase completion.

Typical Usage

Background delegation for reasoning (SETUP acceptance example):

Please hand the following pure-reasoning task to tabbit_brain, using run_in_background: true. After initiating it, continue with your own tool work, and verify the results after receiving job_output.

When forwarding DSH Skill results to Brain, paste the content rather than local paths:

The main agent has executed the DSH Skill <SKILL_NAME>. Here is the complete relevant result:
<paste the result or extracted evidence>
Now please analyze/design/summarize based on this content. Do not claim that you executed this Skill or read the original files.

For acceptance, verify: the returned item is a job ID (not a DSH sub-agent ID); the gateway receives /v1/chat/completions; the receipt contains model and endpoint; the same conversation is serialized.

Use Cases and Notes

Suitable for: adding context-isolated text reasoning aligned with the Tabbit model within the DSH main workflow; review/analysis tasks that need background jobs, parallel multi-conversation tags, or decoupling from the main agent’s toolchain.

Notes:

  • The plugin runs with the current DSH process permissions; before installation, read the source code and the MIT license, and independently assess the boundaries of the gateway and Tabbit account (SETUP has specific instructions for Cookie, remote session binding, and fail-closed recovery).
  • Disabling this plugin turns off Brain tool registration; own-layer registration is not constrained by inherited DSH allow/deny filters.
  • The DSH ecosystem emphasizes “everything is a plugin”; SkillHub is a community catalog and has no official affiliation with DeepSeek / 幻方.

Conclusion

dsh-tabbit-brain brings Tabbit-side models right to the DSH main agent’s fingertips: a local gateway, independent history, seven Brain tools, and an adjustable delegation strategy, with the main agent still in control of evidence and delivery. For further installation details and capability-layered acceptance, see the repository’s SETUP.zh.md.

  • Catalog page: https://www.skillhub.cn/plugins/wbdxy/dsh-tabbit-brain
  • GitHub: https://github.com/wbdxy/dsh-tabbit-brain
羽毛球分组比赛记分
小程序二维码

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

Xiaoye