Native generation-time Mixture-of-Agents: every turn, reference models run the same session context in parallel as pre-run drafts and one aggregator executes with full tooling; config-as-model recipes, F mirror / R trimmed views, enforced subagent gating (dual-shape session indexing), derived per-recipe vision (vision refs relay image reads to text-only aggregators), tiered cadence with separate steering and patrol rosters plus frozen reuse between beats, degeneration guard dropping degenerate reference output, anonymized model face (failure notices carry no provider identity), and cache-friendly guidance placement (the rehearsal record is pinned where it was produced instead of appended to every request, so the cached prefix covers it and each step pays only for what was added since - on by default across every cadence).
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-moa-native
# from a prebuilt release tarball
dsh plugin --profile web add "https://github.com/DDL095/dsh-moa-native/releases/download/v4.5.0/dsh-moa-native-4.5.0.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:DDL095/dsh-moa-native
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Native Mixture-of-Agents for DeepSeek Harness — generation-time fusion: reference models produce pre-run drafts in parallel every turn; the single acting model executes with full tooling.
What it solves
A single model has blind spots. In long sessions you want a few models reviewing the situation behind every reply — without switching tools, copy-pasting, or giving up tool use. dsh-moa-native internalizes that loop: picking one model entry runs the whole MoA pipeline for the session.
user message ──► refs consulted in parallel (private drafts, mutually unaware)
│
▼
guidance injected as a trailing message (never pollutes session
history, never breaks KV prefix caching)
│
▼
aggregator (acting model) executes with full tooling ──► reply
Recommended mode (advanced)
F mirror + 3-4 heterogeneous blank-injection refs + a single aggregator + the parallel-plan discipline — one glance:
- Every ref uses the
__blank__injection (zero instruction, pure continuation — pure model-family signal, no persona noise); - The aggregator uses
agg_forrefsblank(candidate action plans: where a draft agrees with your own judgement it is worth more weight, disagreements are judged independently, all actions executed by the aggregator itself); - The factory
defaultstays Hermes-aligned (review-style refs with the default injection) — start there, switch to the recommended combo once familiar.
Full part-by-part, parameter-by-parameter walkthrough: architecture.svg.
Tiered rhythm (v4.4.0)
Heavy models steer every m steps, flash models patrol every n steps, and every other step reuses the last beat — free while that beat is still cached (a cache miss refills with the patrol roster).
- Cadence is the fourth tier —
user_turn(once per user turn, cheapest),per_iteration(every step),every_n×N(skip N steps after each fan-out, so the period is N+1 steps), andtiered(the rhythm below); - Two roles, two periods: the steering beat asks heavy models (
@max/@xhigh) whether the direction is still right — every m steps; the patrol beat asks flash refs whether the execution has drifted — every n steps; - Non-beat steps are frozen: the previous beat's guidance is reused verbatim, at zero ref cost;
- One beat, one job: when a step is due for both, steering wins and the patrol beat is suppressed;
- Where the rosters live:
cadence_tiered.steering(the heavy models) andcadence_tiered.patrol(the flash models — omit it to keep patrol followingrefs); under the tiered cadence a recipe's ownrefsare just the patrol fallback pool; - The model never sees the rhythm itself: beat vocabulary, failures and scale stay host-side (trace + console only) — the injected text carries no beat words, no failure notices and no counts (block count remains a first-order proxy, as the design doc states honestly).
Install
dsh plugin --profile web add dsh-moa-native
Restart the instance and refresh the browser. The config file lives at <DSH_HOME>/profiles/<profile>/moa-native.config.json — each profile keeps its own lineup (per-profile isolation since v4.5.3; earlier releases always read the web profile's file, so a Desktop-profile panel could overwrite your web config).
Quick start
- Settings → MoA-Native console: pick 3-4 reference routes (flash tiers work well — fast and cheap) and one aggregator (the model you want to keep). This step is mandatory on first install — the factory lineup is only an example and must point at your own configured providers/models. Since references are framed as the aggregator's own pre-run drafts, you can skip a ref that shares the aggregator's model (saves one route). Seeing a model tagged (表外 / off-catalog) in a dropdown? That entry is referenced by the current config but absent from this environment's model catalog — typically a lineup migrated from another profile/machine, or the factory example pointing at providers you don't have. The console's top warning banner lists all off-catalog entries at once; re-pick those routes from in-catalog models and the banner clears itself.
- Save (hot-reloads), then select a moa-native entry in the session model picker —
defaultor any recipe you saved. - Chat normally. Fusion happens every turn;
/moaR/moaFtemporarily switch the reference view (lineup, aggregator, and cadence stay with the current entry; the console shows the live slash preview). Subagent sessions stream straight through the aggregator by default (zero fanout) — switch via the subagent gating dropdown (7 tiers: 3/5/8/10/15/20/30).
Highlights
Config as model — default and every recipe appear as model entries on the provider page; a recipe is a full preset (lineup, mode, cadence, params).
Three-level model picker (identical to the session UI) — provider → model → effort for every route.
Injection modules — each route's trailing note is a visible, editable text module: built-in default (Hermes-style), blank (zero injection), or any custom one. No hidden personas, no output-length contracts.
Two reference modes — the default is F; pick R when the input bill matters more than perfect fidelity:
- F · full mirror (default) — references see exactly what the acting model sees; KV prefix cache hit rates above 90%. Costs the most: every reference route bills the full system + tools + history on every beat, so the input spend scales with conversation length. The recommended lineup (F + blank-injection flash refs + tiered cadence + anchored guidance) exists precisely to keep this bill low — flash-tier refs, frozen reuse between beats, −36% uncached tokens vs the trailing form.
- R · trimmed view — Hermes-style tool-result trimming; drops the system prompt, folds tool results. The economy lane. Its overall window is per-model dynamic (4.5.2): each route's budget comes from its own registered context window —
(window × 0.9 − 8192) × 1.5chars, the whole fleet flying on the minimum, so a 64k ref tightens the view and a 1M ref sees more. Tool results truncate at Hermes' own 4,000 chars (ref_tool_result_budget);ref_input_char_budget, when set, caps the dynamic budget. Unknown windows ride the conservative 128k baseline (warned once; fillcontextWindowinDSH-MoA-model-registry.jsonto enable exact adaptation).
Subagent gating — MoA applies to the main session by default; subagent sessions pass straight through the aggregator, with an optional every-N-steps upgrade. Design rationale: SUBAGENT-GATING-DESIGN.md.
Run traces — four-level drill-down: sessions (workspace-isolated) → turns → per-model cards → full advisory text. Cold-start backfill from daily zstd archives; inputs are never persisted.
Fail-loud — a failing reference route is reported as-is, never silently replaced.
Theory positioning
Comparison with the MoA paper (arXiv:2406.04692), Hermes /moa, and community dsh-moa plugins — inheritance, superseding forms, and honest boundaries: THEORY-POSITION.md.
Configuration
~/.dsh/profiles/web/moa-native.config.json (panel saves hot-reload):
{
"refs": [ // direct lineup; or use named recipes
"provider-a/model-flash@high", // string = default injection
{ "model": "provider-b/model-x@max", "injection": "__blank__" } // object = explicit injection module
],
"aggregator": "provider-c/main-model@max",
"aggInjection": "agg_forrefsblank", // parallel-plan discipline (recommended); default agg_default
"mode": "F", // F full mirror (default, zero info gap, highest input cost) | R trimmed view (economy)
"ref_tool_result_budget": 4000, // R only: per-tool-result truncation budget (chars; Hermes lineage default 4000)
"ref_input_char_budget": null, // R only: cap on the per-model dynamic budget (unset = purely dynamic; window-derived)
"cadence": "user_turn", // user_turn | per_iteration | {every_n: 2} | "tiered"(see above)
"subagent_policy": "passthrough", // subagent gating: passthrough | {every_n: 5} | full
"injections": { "critic": "Your first duty is to scrutinize…" },
"recipes": { "my-lineup": { "refs": ["..."], "aggregator": "...", "mode": "F" } },
"prices": { "provider-a/model-flash": { "in": 0.2, "out": 0.8 } }, // optional cost estimates
"trace": true
}
HTTP endpoints
| Endpoint | Description |
|---|---|
GET /moa-native/panel.json |
Config + model tables |
GET /moa-native/trace.json?limit=&ws= |
Run traces |
GET /moa-native/trace-archive.json?date=YYYYMMDD |
Daily archive read |
GET /moa-native/efforts.json?provider=&model= |
Effort tiers |
Design boundaries
- guidance is a per-request injection and never enters session history — refs originals are invisible in the session UI by design (see the trace panel instead);
- references are pure advisers with no tool execution; the acting model decides what to adopt;
- complementary to "competitive draft" MoA (multiple full answers then a verdict): this plugin targets per-turn continuous quality lift.
License
MIT
Links
More in this category
Clearailhc/clearai-dsh★ 696
An agent preset for evidence-checked research: every step advances only through system-verified observations, L3+ claims go to an independent evaluator, and the session folds into a replayable ledger that grows into a browsable domain ontology. Requires DSH >=0.1.7-alpha.1.
FuRongJun-1999/dsh-memory★ 672
White-box AGI architecture exploration: metacognition (self-cognition loop), continual learning (knowledge flywheel), world model (condition space, spatiotemporal memory graph), self-improvement (bootstrap discipline), zero-LLM white-box pipeline, and auditable trust guardrails.
icyaaaww/dsh-soul★ 85
Records recurring task corrections and tool failures locally, then compiles them into changes to eight harness components through explicitly started evolution, paired baseline/candidate checks, trial activation and rollback. Includes a budget and audit ledger; requires Node.js 24+ and a compatible DSH 0.2.1-rc.2 or later 0.2.x host.
MichengAI/dsh-pua★ 72
Adds /pua to steer the agent to try another approach and verify results before claiming completion, with 15 company styles, persona modes, global and per-conversation settings, and an optional loop that continues until a verification command passes, the iteration limit is reached, or the user cancels.
kenz1117/dsh-engram★ 70
Cross-session long-term memory as a local SQLite store: dual scopes (user + per-git-origin project), hybrid FTS5 + local-vector retrieval fused with RRF, an evidence gate that forces an explicit sufficiency judgement, provenance audit chains, SM-2 spaced-repetition review, consolidation distillation and decay forgetting, and a nine-view "Memory Palace" sidebar panel. 22 narrow-parameter tools, no external service, no API key, no Docker.
pk14742952-AD/dsh-host-rsi★ 39
Reflective self-evolution plugin for local Qwen3.8 27B/3.8 Flash and online APIs: a coding-loop convergence steerer curbs Qwen3.8 27B/Flash repeated-verification deep-thinking to converge faster and cut thinking time; a five-state delivery guard detects and corrects stuck turns and infinite loops; model-agnostic host logic, mostly compatible with online APIs; per-use continual self-improvement with counter-reason self-checks, critic escalation, inverted-index memory retrieval, coding-loop convergence steering, and a five-state delivery guard.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.