Pular para o conteúdo principal
1

agent-body

1420079678-ctrl/agent-body

Camada de coordenação de plugins: os plugins declaram suas capacidades, comandos são roteados ao plugin responsável sem chamada ao modelo, esquemas de ferramentas carregam sob demanda para reduzir tokens de prompt, o histórico de execuções se consolida em memória de longo prazo quando ocioso, e falhas são classificadas antes de qualquer nova tentativa.

Instalar

dsh plugin --profile web add github:1420079678-ctrl/agent-body

README

English · 中文

Agent-Body — plugins as organs: 26 curated organs across 8 systems, one heartbeat, 84.7% of tool-schema tokens gated away, 0 chronic wounds

Agent‑Body

An organ‑based plugin layer for DeepSeek Harness: organs, nerve impulses, a heartbeat, reflex arcs, long‑term memory, and closed‑loop self‑healing.

26 organ identities · 84.7% of tool-schema tokens gated cold-start · 200+ offline assertions · MIT

Agent-Body turns a plugin list into an organism. Every plugin declares itself an organ; a nerve bus routes your command to the organs that should handle it, a heartbeat circulates state between them, reflex arcs fire without a single model call, and every failure is attributed by cause before anything retries.

Try it in 30 seconds — no install, no host, no API key. The core imports nothing outside Node built-ins, so a fresh clone runs the real end-to-end chain offline:

git clone https://github.com/1420079678-ctrl/agent-body && cd agent-body
npm run demo     # command → impulse → dispatch → execute → attribute → reflex fires
npm run check    # the gate CI runs: constant tables, catalog, tests, benchmark — all offline

Here is that same body while it runs. Not a mockup — the frames are real tool output from a real install, rendered by tools/make-demo-gif.py out of docs/demo/captured.json, which records the raw output. The renderer refuses to draw a number that is not in that file:

Live output: 43 organs, 332/332 capabilities claimed, 20/20 reflexes armed, 82,126 to 33,348 tool-schema tokens, 98% heal rate, and one Chinese command that innervates 4 organs with zero model calls

Read it left to right: anatomy and vitals, then the token ledger, then a Chinese command becoming a nerve impulse that innervates four organs — each told which capability to fire, with zero model calls spent deciding the route — and finally a wound attributed to arg_error, prescribed do-not-retry, and closed by re-check.

Already running DeepSeek Harness? One command installs the body kernel, the memory organ and the context engine:

$rel = "https://cdn.jsdelivr.net/gh/1420079678-ctrl/agent-body@v0.1.2/dist"
dsh plugin --profile web add "$rel/dsh-external-dsh-organism-0.1.1.tgz" "$rel/dsh-external-dsh-cortex-0.1.1.tgz" "$rel/dsh-external-dsh-zero-residence-0.1.0.tgz"

Restart the harness and body_status lists the organs. The claim you can check for yourself: the tool-schema block of the prompt drops 84.7% on a cold start across 48 representative commands, and npm run bench:check fails the build if that number drifts. The scope is stated wherever the number appears — tool-schema tokens only, not the whole prompt. On a body that has been running for a while it is 58% (127 of 332 visible); that figure, and why it declines, are in Token economy.

⭐ Star the repository if you want it to keep tracking the host closely — it is a one-person project and the stars are how the next DSH user finds it.


Organs Plugins Schema gating Benchmark Regressions Node License GitHub stars GitHub issues dshfind

Architecture · Organ Catalog · Benchmark · Roadmap · 中文文档

Official DSH discussion — Show Your Plugins! · the channel the harness CONTRIBUTING points plugin authors to

v0.1.1 · MIT · Windows-first (Node 22.19 / 24) · 26 organ identities in the catalog, realised by 24 plugin packages in this repository · release notes

Live vitals replay — recorded from a real install

▶ Open the live demo (中文) — a recorded replay of a real install: the heartbeat, the organs, the pulse stream, the healing ledger and the token gate, with nothing installed. It is generated from the runtime files (vitals.json, bloodstream.json, pulse.jsonl), not retyped from screenshots.

Contents · Where it's listed · Install in one line · Why this exists · What makes it different · The five biological layers · Architecture at a glance · Organ catalog · Quick start · Write your own organ · Verify it yourself · When not to use this · FAQ · Repository layout · Contributing · Roadmap


Where it's listed

Checked, not claimed — every entry below resolves today:

ListingWhat it is
awesome-dsh-plugin · 16.7k ★the main DSH plugin directory; both dsh-organism and dsh-cortex are indexed as separate entries
dshfindDSH plugin search engine, with a per-repository page
imsai-sh/awesome-deepseek-harness-pluginsplugin hub with machine-readable catalogue entries
bruc3van/awesome-dsh-plugindaily-crawled DSH plugin list, human-reviewed
billLiao/awesome-dsh-plugincurated list, memory category
unStone/dsh-xraydeclared-capabilities scanner; carries a page for this repository
linny006/agent-framework-radar · llmops-radarlive indexes of newly shipping agent frameworks and LLMOps tooling

It is also the subject of the harness's official showcase thread — Show Your Plugins! discussion #7555.


Install in one line

Two supported paths — start with the first, switch to the second if your network blocks github.com.

Path 1 — GitHub release assets

Versioned assets built by CI. releases/latest/download/ always resolves to the newest release, so this command does not need editing when a version is bumped.

$rel = "https://github.com/1420079678-ctrl/agent-body/releases/latest/download"
dsh plugin --profile web add `
  "$rel/dsh-external-dsh-organism-0.1.1.tgz" `
  "$rel/dsh-external-dsh-cortex-0.1.1.tgz" `
  "$rel/dsh-external-dsh-zero-residence-0.1.0.tgz"
rel=https://github.com/1420079678-ctrl/agent-body/releases/latest/download
dsh plugin --profile web add \
  "$rel/dsh-external-dsh-organism-0.1.1.tgz" \
  "$rel/dsh-external-dsh-cortex-0.1.1.tgz" \
  "$rel/dsh-external-dsh-zero-residence-0.1.0.tgz"

Path 2 — served from this repository over jsDelivr

The same tarballs, committed under dist/ and served by a CDN with mainland nodes. Reach for this when Path 1 hangs: those URLs 302-redirect to objects.githubusercontent.com, a hop that is blocked on some networks. The symptom is fetch failed with downloaded 0 while dependency resolution succeeds — the download hop is the problem, not the packages.

$rel = "https://cdn.jsdelivr.net/gh/1420079678-ctrl/agent-body@v0.1.2/dist"
dsh plugin --profile web add `
  "$rel/dsh-external-dsh-organism-0.1.1.tgz" `
  "$rel/dsh-external-dsh-cortex-0.1.1.tgz" `
  "$rel/dsh-external-dsh-zero-residence-0.1.0.tgz"
rel=https://cdn.jsdelivr.net/gh/1420079678-ctrl/agent-body@v0.1.2/dist
dsh plugin --profile web add \
  "$rel/dsh-external-dsh-organism-0.1.1.tgz" \
  "$rel/dsh-external-dsh-cortex-0.1.1.tgz" \
  "$rel/dsh-external-dsh-zero-residence-0.1.0.tgz"

dsh plugin forwards its arguments to pnpm add inside the profile, so several packages install in one command. Restart the harness afterwards; body_status should list the organs. The other organs in the catalog are one tarball each — see Quick start.

If neither path works — install fully offline

Every tarball built by CI is committed under dist/, and dist/agent-body-offline-kit.zip bundles all ten plus a one-command installer. Download it from any machine that can reach this repository, copy it across, then:

Expand-Archive .\agent-body-offline-kit.zip -DestinationPath .
pwsh .\install-agent-body.ps1

Why not npm install yet. These packages are not published to the npm registry — the names above return 404 from registry.npmjs.org today, and nothing here pretends otherwise. That is the next step and it is tracked as an open issue: once they are on npm, dsh plugin add @dsh-external/dsh-organism becomes a single short command. Until then, the paths above are the supported ones.

Start with the evidence

If you want…Open…What you can check
to see it run without installing anythingnpm run demoa real command → impulse → dispatch → execute → attribute → reflex chain, offline, no key
fewer tool schemas in your promptbenchmarks/results/REPORT.md · npm run bench:check84.71% of tool-schema tokens gated away on 48 commands (cold-start, reproducible); 58% with history (2026-09-25)
failures to stop repeatingbody_healattribution before retry: tool_missing / arg_error / permission / timeout / network / not_found / conflict. Measured on a development install: 198 healed, 0 open, 99% heal rate
to know the system is still alivebody_status · body_heart43 organs, 332/332 capabilities claimed, beat #1121, architecture integrity 6/6 (development install)
to lose an organ without losing the bodybody_organ action=integritythe six core pieces depend on no single organ; body_call compensates from the organ that overlaps most
to write your own organdocs/ORGAN_SDK.mddefineOrgan() validates at declaration and throws with a field path; npm run check gates the whole repository

Why this exists

Every agent framework eventually becomes the same thing: a pile of tools, a growing list in the system prompt, and an agent that forgets everything between sessions.

It re-reads the same failure twice before learning it exists. It cannot tell you which of its own capabilities are broken. It has no idea that a plugin it depends on went offline — it just calls it and fails. And you keep paying tokens for tool schemas nobody calls.

Agent‑Body takes the opposite bet: treat the plugin system as an organism.

Every plugin declares itself an organ — with capabilities, senses, and reflexes. Everything else is physiology: a nervous system that routes your commands to the right organ, a heart that pumps state through the whole body on a rhythm, reflex arcs that fire without a single model call, and a healing loop that attributes every failure before it even thinks about retrying.

The result is a system that gets measurably better the more you use it, and that stays standing when you rip parts of it out.


What makes it different

🫀 It has a heartbeat, not a loop

A real pacemaker runs at a 1s base clock with a variable interval — 3× faster on critical alerts, 2× on fatigue, 2× slower when the body has been silent for a long while. Every beat packages the current operator directives, the body's proprioception and the homeostasis warnings into a blood packet, writes it to bloodstream.json, and broadcasts it as organism/heartbeat. Any organ can hook the circulation with one line:

ctx.on('organism/heartbeat', (blood) => { /* your organ now has a pulse */ })

Circulation is a loop, not a firehose: organs return blood through organism/venous, and newly learned knowledge is oxygenated (organism/oxygenated) before it is pumped system‑wide.

🧠 Your sentence becomes a nerve impulse

You type a command. Before the model even reasons about it, agent/pre-step converts it into an impulse, deterministically innervates the organs that should handle it, and broadcasts on organism/impulse — telling each organ which of its capabilities to use.

Then the body learns the route. When an innervated organ actually delivers, a Hebbian synapse strengthens "this kind of command → that organ"; when it fails, the weight decays. Dispatch order reorders itself from experience, persisted in synapses.json.

you:  "抓取这个站点并抽取结构化数据"
impulse → sensory(web-crawl) · executive(plan) · immune(verify)
        → each organ told which capability to fire

🩹 Self‑healing is a closed loop, not a slogan

failure → deterministic attribution → prescription → RE‑CHECK

Attribution is not guessing: tool_missing / arg_error / permission / timeout / network / not_found / conflict / unknown. The prescription table decides the response — read‑only remedies execute automatically, side‑effecting ones wait for the brain to rule, and arg_error is never auto‑retried (retrying a wrong argument just amplifies the mistake).

The wound only closes when that organ next succeeds — the system does not declare itself healed. Anything still open after 5 minutes is marked chronic and stops spinning.

Measured on the development install: 21 wounds healed · 100% heal rate · 0 chronic. An arg_error wound closed 3.5s after the underlying fix landed.

🌱 It trains itself — and forgets on purpose

Three learning channels run continuously, none of them requiring you to teach anything:

  1. Synaptic learning — success reinforces "command class → organ", failure weakens it.
  2. Reflex self‑authoring — the same tool × cause failing 3 times makes the system write its own reflex arc (R-auto-<cause>-<tool>), which then fires automatically on the next occurrence.
  3. Chain crystallization — any cross‑organ chain that completes with ≥3 steps is fixed into a replayable skill.

Forgetting is equally deliberate: synapses decay on a 30‑minute half‑life and get pruned below |w| < 0.2; reflexes that fired ≥5 times with zero contribution are retired; skills that keep failing are forgotten.

body_heal action=rehab restores an organ to its healthy baseline — damage cleared, wisdom kept: fatigue and wounds reset, learned synapses, reflexes and skills untouched.

💤 It sleeps, consolidates, and remembers

Idle for 2 minutes → light sleep. 5 minutes → deep sleep, and every 2 minutes of deep sleep runs a consolidation pass with zero model calls — pure deterministic rules mining the experiences of the day into long‑term memory:

CardMined from
pitfallsame tool failing ≥3 times in a row
playbooka cross‑tool success chain repeating ≥2 times (trivial same‑tool repeats filtered out)
hotspot≥8 calls with <70% success rate
unresolved≥3 failures accumulated after the last success
factexplicit operator facts

New commands trigger deterministic recall — tags > title > body, multiplied by weight — and the most relevant cards are injected into context. Unused cards decay on a 168‑hour half‑life and archive instead of being deleted.

🪶 Zero‑residence context

Instead of lossy LLM summarization, the engine replaces resident content with deterministic pointers — and every masked byte stays recoverable verbatim from the session log:

ToolPurpose
zr_compactarm a forced compaction that bypasses the ratio threshold
zr_recallrebuild masked content verbatim, by tool call id or session seq
zr_ledgerquantify the attention integral, the three‑segment cost split, and the compression ratio
zr_fastrun long commands asynchronously and never block the turn

🧩 Organs are optional — the architecture is not

Six kernels depend on no single organ: nerve bus · heart pump · directive layer · reflex engine · dissector · impulse conduction.

Unplug a plugin and the body keeps running. Uninstalling dsh-office-docs was detected immediately — the craft organ went offline and its capability was compensated by the closest overlapping organ, core integrity still green. An organ that is not installed at all is reported as not installed, not as broken — which eliminated a 15‑second warning storm from a phantom organ.

📉 Token economy as a first‑class concern

Tool schemas are shown on demand, gated by what the current turn is actually about.

Scope of every number below: the tool‑schema block of the prompt only — the name + description + JSON‑schema of every tool definition. Not the system prompt, not conversation history, not tool results.

84.7% of tool‑schema tokens gated away (cold-start scope) — 55,154 → 8,433 on average across 48 representative commands (median 85.7%, worst case 75.2%), out of 256 capability definitions. Everything else stays one body_call away.

That number is produced by the benchmark in this repository and is reproducible on your machine:

npm run bench          # regenerate benchmarks/results/REPORT.md
npm run bench:check    # exit non‑zero if it drifts from the committed baseline

Two honest caveats, because the headline is easy to over‑read:

  • Cold‑start scope. The figure above assumes the body has no recent activity — only the current command decides what is revealed. On a body with real run history, recently‑used and high‑trust organs stay hot, the visible set grows, and savings drop. Measured live figures, newest first:

    MeasuredBasisVisibleTool-schema tokens saved
    2026‑09‑25this install (332 capabilities, real run history)127 / 33258%
    2026‑09‑11snapshot committed at benchmarks/corpus/trace-live-gate.json64 / 25674%
    earlierlive snapshot quoted by historical README revisions—82%

    Both extremes are real; always quote the scope with the number. The cold‑start figure is the reproducible one — run it yourself. The live figure is what you will actually see on a body that has been running for a while, and it declines as the body grows, because more history keeps more organs hot. That worsening number is published here on purpose: you would find it the moment you ran body_tokens yourself.

  • 10 of 48 commands need a second hop. A per‑organ cap of 10 capabilities means large organs (the attack organ has 49) get truncated, and a few intents do not route to the organ that owns the capability. Those resolve through body_call, but they are not free. The benchmark classifies every miss as bug / capped / unrouted and lists them individually in benchmarks/results/REPORT.md.


The five biological layers

LayerWhat it isCount
Individualthis body (the running install)1
Systemeight body systems: executive / nervous / immune / sensory / motor / memory / metabolic / endocrine8
Organa plugin, obeying one contract: sense → reflex → effect → homeostasis26 organ identities in catalog/organs.json, realised by 24 installable packages (23 in the table below, plus one legacy package kept for rollback)
Tissuefunctional clustering inside an organ: sensing / inspection / effect / synthesis / memory / regulation / clearance / metering / matrix9 classes
Cella single capability unit (one tool)counted at runtime

Every layer is observable: body_map (organs + systems), body_cell (cells + tissues), body_status (vitals). Undeclared plugins are auto‑promoted to autonomic organs — on the development install, 332/332 capabilities were claimed, zero orphans. (332 is what that live install reports through body_status; the frozen benchmark corpus below is a separate, committed set of 256 capability definitions — the two numbers measure different things and are labelled wherever they appear.)


Architecture at a glance

graph TD
    OP([Operator command]) -->|nerve impulse| NERVE["body_nerve · innervation"]
    NERVE --> BUS{{"organism/impulse"}}
    LAW(["Operator directives"]) --> HEART
    HEART[["Heart · organism/heartbeat"]] --> BUS
    BUS --> ORGANS["organs · capabilities"]
    ORGANS -->|"tools/result"| REFLEX["Reflex arcs · zero tokens"]
    ORGANS -->|failure| HEAL["Self-healing · attribute → prescribe → re-check"]
    ORGANS -->|experience| CORTEX["Cortex · sleep / consolidate / memory"]
    CORTEX -->|"recall"| ORGANS
    HEAL --> VITALS["Vitals · vitals.json"]
    VITALS --> HEART
    ORGANS -->|venous| HEART

Full detail — three kernels, five life mechanisms, event contracts, on‑disk state, verification methodology — lives in ARCHITECTURE.md.


Organ catalog

Every entry below is a real plugin under workspace/plugins/. Five core organs ship a full offline regression suite (see Verify it yourself); the remaining organs are exercised through their replay scripts.

OrganPluginSystemSignature capabilities
Organism kerneldsh-organismnervous · endocrinebody_map body_cell body_status body_heart body_law body_nerve body_call body_reflex body_heal body_skill body_organ body_pulse body_tokens
Cortexdsh-cortexmemorycortex_sleep cortex_memory cortex_homeo
Zero‑residencedsh-zero-residencemetaboliczr_compact zr_recall zr_ledger zr_fast
Web crawldsh-web-crawlsensorywebcrawl webcrawl_site webcrawl_map webcrawl_extract webcrawl_doc webcrawl_http webcrawl_links webcrawl_status
Browser ultimatedsh-browser-ultimatesensoryreal browser engine (logged‑in sessions, anti‑bot resilience, CDP) + readability‑style extraction
War bridgedsh-war-bridgenervousida (IDA Pro MCP bridge) war_status war_case war_memory
PentAGIdsh-pentagiexecutiveagi_plan agi_next agi_flow agi_memory agi_reflect agi_report agi_team
Sec workbenchdsh-sec-workbenchimmune49 sec_* capabilities: sec_route sec_scope sec_evidence sec_webscan sec_webtest sec_exec sec_jwt sec_hashoff sec_brute sec_lateral sec_stealth sec_journal sec_report …
Reverse skilldsh-reverse-skillimmunerev_route (44 routing rules) rev_case rev_doctrine rev_playbook rev_journal rev_toolindex
Vuln remediatordsh-vuln-remediatorimmunevuln_scan vuln_cve vuln_sbom vuln_priority vuln_patch_gen vuln_patch_verify vuln_remediate vuln_plan vuln_knowledge
Vuln daily loopdsh-vuln-mastery-loopimmunescheduled daily practice loop with reporting
Quant OSdsh-quantexecutive59 quant_* capabilities: data / alpha / ML / risk / execution, quant_research_pipeline quant_backtest quant_walk_forward quant_portfolio_optimize quant_stress_test …
Mastery loopdsh-mastery-loopendocrinestudy_orient study_deconstruct study_model study_diagnose study_transfer study_review study_path
Academic researchdsh-academic-researchexecutivears_pipeline (10‑stage state machine) ars_review (5‑seat panel) ars_paper_plan ars_integrity ars_metrics
Office docsdsh-office-docsmotorPDF / DOCX / PPTX / XLSX build, extract, render‑verify, pandoc convert
Anatomy paneldsh-anatomy-panelnervouslive vitals at /anatomy: heartbeat, wounds, learning counters, organ call counts and the real pulse stream - read from the organism runtime files on every request
Social carddsh-social-cardmotorsocial_card_scaffold social_card_render social_card_validate social_card_docs
Agent teamsdsh-agent-teams-proexecutivecaptain + members, task dependencies, messaging, live web panel
MiroFishdsh-mirofishexecutivemirofish_status mirofish_api — swarm‑intelligence prediction engine client
Minimal graydsh-minimal-graymetabolicminimal agent preset, platform‑adaptive shell
DingTalk bridgedsh-dingtalk-bridgenervousStream long‑connection bot bridge into the harness
Fund scandsh-daily-fund-scanexecutivescheduled fund pool scan + advice report
File chipsdsh-file-chipssensoryattachment chips in the composer
(legacy)dsh-crawl4aisensorykept for rollback; superseded by dsh-web-crawl

Quick start

See it work first — no install, no host, no API key

git clone https://github.com/1420079678-ctrl/agent-body && cd agent-body
npm run demo      # command → impulse → dispatch → execute → attribute → reflex fires
npm run check     # constant tables + catalog + message sources + 30 tests + benchmark, all offline

There is nothing to install. The core packages import nothing outside Node built‑ins, so the demo runs a real end‑to‑end chain against the committed 256‑capability corpus on a fresh clone.

Then read benchmarks/results/REPORT.md to see how the token claim was measured, and ROADMAP.md to see what is deliberately not being built next.

Install an organ in one command

The self‑contained organs ship a prebuilt tarball on the release page — no clone, no build step. The package declares dsh.bundle, so installing it also appends it to dsh.profile.bundles and the next start mounts it:

dsh plugin --profile web add https://github.com/1420079678-ctrl/agent-body/releases/download/v0.1.1/dsh-external-dsh-organism-0.1.1.tgz

Ten organs ship this way — the ones that need no external toolchain. Append the tarball name to the release URL:

organtarballwhat it adds
dsh-organismdsh-external-dsh-organism-0.1.1.tgzthe body kernel: anatomy, vitals, heartbeat pump, nerve impulses, reflex arcs, self-healing ledger, on-demand schema gating
dsh-cortexdsh-external-dsh-cortex-0.1.1.tgzsleep phases, deterministic consolidation, long-term memory, alert de-noising
dsh-zero-residencedsh-external-dsh-zero-residence-0.1.0.tgzzero-residence context: evict, keep a pointer, rebuild the payload verbatim on demand
dsh-mastery-loopdsh-external-dsh-mastery-loop-0.0.1.tgzsubject-agnostic mastery tutor: orient → deconstruct → model → diagnose → transfer → review
dsh-social-carddsh-external-dsh-social-card-0.0.1.tgzsocial cards: image sets, 21:9 + 1:1 cover pairs, Live Photo plates
dsh-academic-researchdsh-external-dsh-academic-research-0.0.1.tgzresearch pipeline: 10-stage state machine, five-seat review panel, integrity protocol
dsh-pentagidsh-external-dsh-pentagi-0.0.1.tgzmulti-agent penetration brain: 13 roles, seven-phase flow, adviser re-routing, knowledge base
dsh-vuln-remediatordsh-external-dsh-vuln-remediator-0.0.1.tgzvulnerability remediation: discovery, risk scoring, virtual patches, fix plans
dsh-reverse-skilldsh-external-dsh-reverse-skill-0.1.0.tgzreverse-engineering workflow: routing, confidence bands, evidence chain, validated gate
dsh-office-docsdsh-external-dsh-office-docs-0.0.1.tgzOffice documents: build and extract PDF, DOCX, PPTX, XLSX; render pages; convert formats

Install the body kernel plus the memory organ:

$rel = "https://github.com/1420079678-ctrl/agent-body/releases/download/v0.1.1"
dsh plugin --profile web add "$rel/dsh-external-dsh-organism-0.1.1.tgz"
dsh plugin --profile web add "$rel/dsh-external-dsh-cortex-0.1.1.tgz"

The rest of the catalog needs a host-side toolchain (a compiler, a browser, or external binaries) and is installed with its replay script instead — see the catalog section below.

Or work from source

This repository is the organ layer — it does not vendor the host. Two pieces, both public:

# 1) the host: DeepSeek Harness itself
git clone https://github.com/deepseek-ai/deepseek-harness.git
#    follow that repository's build/run instructions; note where the checkout lives

# 2) the organs: this repository
git clone https://github.com/1420079678-ctrl/agent-body.git

Point the tooling at your host checkout, then bring an organ online. Each organ ships a replay script that links its dependencies, compiles it, runs its offline regression, and tells you how to inject it:

$env:DSH_CHECKOUT = "C:\path\to\deepseek-harness"

pwsh -File agent-body\workspace\plugins\dsh-organism\scripts\replay-organism.ps1

Replay scripts are idempotent — re-run them after a host upgrade to restore the organ. The same shape works for every organ in the catalog (replay-cortex.ps1, replay-web-crawl.ps1, …).

Once injected, the first three commands to try:

body_status                 # full vitals: organs, fatigue, homeostasis, integrity self-check
body_map                    # the anatomy — which organ owns which capability
body_nerve action=send text="<your command>"   # route a command before executing it

Verify it yourself

Everything below runs offline and deterministically — no network, no model, no API key, nothing installed.

npm run check     # the gate CI runs: constant tables + catalog + tests + benchmark, all in one
npm run demo      # five-minute end-to-end: command → impulse → dispatch → execute → attribute → reflex
npm run bench     # regenerate the token benchmark (writes benchmarks/results/REPORT.md)

npm run check is the honest one. It fails if the zero-dependency core drifts from the real kernel's constant tables, if the organ catalog drifts from source, if any test fails, or if the benchmark moves off its committed baseline. All of it runs on a fresh clone with no npm install.

Organ regressions need the host runtime

npm run verify          # repository health check (structure, JSON, links, secret hygiene)
npm run verify:organs   # run every organ's offline regression

Each organ's suite loads its built lib/, which imports the host runtime (@deepseek-ai/dsh-*). On a bare clone that does not resolve, so the runner reports SKIP with the reason — never a silent pass:

SKIP  dsh-organism/smoke-test.mjs      缺少宿主运行时 @deepseek-ai/dsh-tools
SKIP  dsh-web-crawl/selftest_local.py  缺少 Python 依赖 trafilatura

Inside an installed harness the same command runs them for real. Measured there:

OrganCommandResult (measured)
dsh-organismnode scripts/smoke-test.mjs179 passed / 0 failed (familyOf, evalCondition, decay, pruning, token estimation, gating contract)
dsh-cortexnode scripts/smoke-test.mjs58 passed / 0 failed (tokenization, card mining, noise reduction)
dsh-zero-residencenode scripts/smoke-test.mjs16 passed / 0 failed (pointer manifest, ledger math, exact-ID recall)
dsh-war-bridgenode scripts/smoke-test.mjs17 passed / 0 failed / 1 skipped (the IDA chain skips without a sample PE)
dsh-web-crawlpython scripts/selftest_local.py46 offline assertions (extraction, magic‑byte routing, cascade)

Two of these were red when this table was first written, and the failures were real:

  • dsh-zero-residence reported 13 passed / 3 failed. Root cause: session lookup matched by substring and returned whichever directory the filesystem happened to yield first, so computeLedger('session-a') could read session-a-extra's log and report T = 0 instead of T = 2. Fixed with exact-match-first resolution.
  • dsh-war-bridge reported FAIL whenever no sample PE was present, because "skip" was recorded as a failed assertion — and process.exit() racing an in-flight AbortSignal.timeout tripped a libuv assertion that turned a green run into exit code 1. Both are fixed; a skip now says so.

The core packages are covered by npm test: 30 assertions, 0 failures, including a parity suite that compares the dependency-free port against the real kernel — exact agreement on familyOf/tissueOf across all 256 tool names, innervate across 5 commands, evalCondition across 27 combinations, and attributeFailure across 8 error strings. When no kernel build is present, parity skips loudly rather than passing quietly.

Runtime state is observable too — vitals, wounds, synapses and the pulse stream are all first‑class data:

body_status      → organs · capabilities claimed · heartbeat #31 @15s · heal rate 100%
body_heal        → 21 wounds healed · 0 chronic
body_pulse       → last nerve impulses, reflex fires, homeostasis alerts

Write your own organ

An organ is a declaration plus optional hooks. The SDK validates it where you write it and throws with a field path, instead of failing silently at runtime:

import { defineOrgan, injectedSource } from './packages/organ-sdk/src/index.mjs'

export default defineOrgan({
  id: 'paper_reader',
  label: 'Paper reading (literature)',
  tier: 'professional',
  group: 'memory',
  purpose: 'turn one paper into searchable cards',
  capabilities: ['paper_fetch', 'paper_digest'],
  permissions: ['net:http'],
  signals: ['tools/result'],
  handles: ['network', 'timeout'],
  fallback: ['hippocampus'],
})

Two rules that save a debugging session:

  • Inject with a producer-owned source kind. injectedSource('@you/paper-reader') returns { kind: 'plugin:@you/paper-reader' } — the one shape both session-format generations accept. The retired { kind: 'plugin', plugin: ... } wrapper stops a whole turn on a format-V4 host; the measurements are in docs/session-format-v4-compat.md.
  • Declare what you handle. An organ that says it handles timeout gets that failure routed to it; one that stays silent gets a compensating neighbour through fallback instead.

What your change has to pass:

npm run check            # constants + catalog + message sources + tests + benchmark
npm run verify           # structure, JSON, links, secret hygiene

The full contract is in docs/ORGAN_SDK.md, and wiring an organ into a real host is in docs/host-adapter.md.


When not to use this

Being straight about this is cheaper for both of us:

  • You do not run DeepSeek Harness. This is a plugin layer for one specific host, not a standalone agent framework.
  • You want a frozen third-party API. The host's session format changed once already and broke every plugin that wrote to it; this repository tracks that host, so it moves when the host moves.
  • You need a supported product with an SLA. v0.1.1 is a working release with reproducible gates, and the catalog is curated against one development install — expect rough edges outside the paths that install exercises.
  • You need Linux/macOS parity today. Several organs carry Windows-specific hardening (hidden-window spawning, ACL sandbox compatibility). CI exercises the zero-dependency core on Linux; the organs less so.

FAQ

Do I need the host to try it? No. npm run demo runs a real command → impulse → dispatch → execute → attribute → reflex chain against the committed corpus with nothing installed and no API key.

Does any of it call the network or a model? Not in the part you can verify: npm run check installs nothing and calls nothing. Model calls only happen where an organ asks the host to reason.

What happens if I delete an organ? Capability is lost, the body is not: the nervous system, heartbeat pump, directive layer, reflex engine, anatomist and impulse dispatch depend on no single organ, and body_call compensates with the online organ whose capability overlaps most. body_organ action=integrity prints that self-check.

Why do the organ numbers differ between places? There are three numbers and they measure different things: 26 organ identities in catalog/organs.json (the anatomy — prefrontal, hands, cortex, …), 24 plugin packages under workspace/plugins/ that realise them (23 in the catalog table above plus the legacy dsh-crawl4ai, kept for rollback), and 64 catalog capabilities declared in that file. body_status reports a fourth, larger pair on a live install — 43 organs and 332 capabilities — because it counts every plugin the running harness has mounted, including ones this catalog does not name. Every number is labelled wherever it appears, and npm run verify prints the package count it derives from disk so it can be checked rather than trusted.

How is the 84.7% token figure measured? It is tool-schema tokens only — the sum of every tool definition's name, description and parameters against what the first turn can see after gating — on 48 representative commands, in the cold-start setting (intent decides the visible set, no local history). That is the lower bound and the only independently reproducible setting. The live setting, with history, declines as the body grows: measured 58% on 2026‑09‑25 (127 of 332 visible), 74.25% on the 2026‑09‑11 snapshot. The whole series, and why it declines, is in Token economy; the raw data is in benchmarks/results/REPORT.md.


Contributing

The most useful contribution right now is another organ — the contract is small enough to read in one sitting. Looking for somewhere to start? The good first issue label collects scoped tasks with a stated acceptance test.

  1. On a fresh clone, npm run demo and npm run check. If those are not green, that is a bug report worth filing on its own.
  2. Copy the closest organ under workspace/plugins/, declare yours with defineOrgan, and add its entry to catalog/organs.json — the catalog is generated, and npm run check:catalog fails on drift rather than letting the two diverge.
  3. Ship an offline regression with it. Only 5 of the 24 packages have one today — npm run verify prints the list of the 18 that do not — and npm run verify:organs reports SKIP with a reason rather than passing quietly when the host runtime is absent. Writing those tests, or an organ that brings its own, is the most useful contribution right now.
  4. Open a PR describing what the organ does, which system it belongs to, and the exact commands you ran.

Questions and discussions are welcome in the harness's Show Your Plugins! thread or as an issue here.


Repository layout

agent-body/
├─ packages/
│  ├─ organ-core/   zero-dependency organ core: constant tables, gating, contract, host adapter
│  └─ organ-sdk/    defineOrgan() / defineReflex() — the authoring surface
├─ benchmarks/      reproducible token benchmark + frozen corpus + CI baseline
├─ catalog/         organs.json — tiers, permissions, failure handling (generated, drift-checked)
├─ examples/        the five-minute quickstart demo
├─ docs/            organ SDK guide · host adapter guide
├─ workspace/
│  └─ plugins/      the organs — one plugin per organ, each with src/ + lib/ (offline regression where one exists)
├─ scripts/         verify-repo.mjs · run-organ-regressions.mjs · run-tests.mjs
├─ .github/         CI (repo-check on Windows + Linux) and issue templates
├─ ARCHITECTURE.md  full system architecture
├─ ROADMAP.md       what the next six months are for
└─ README.zh-CN.md  中文文档

Runtime state (vitals, synapses, memory cards, pulse stream) lives in your harness data home, never in this repository.


Roadmap

  • Publish the organ contract as a standalone SDK so third‑party plugins can declare organs in a few lines
  • One‑command organ installer that links, builds and registers every organ against a given host checkout
  • Cross‑body sync: export learned synapses / reflexes / skills and import them into another install
  • Sleep‑time model training: let consolidation propose new reflexes for review instead of authoring them directly
  • Web panel for the anatomy: live organ map, wound ledger, pulse stream

Notes

  • Licensing. MIT for this project's own work (LICENSE). Plugins ported from upstream projects and the host itself keep their own terms — see THIRD_PARTY_NOTICES.md.
  • Local‑first. The harness GUI binds 127.0.0.1 — it can read files and execute commands on the machine it runs on. Do not expose it to a network or put it behind a public reverse proxy.
  • Windows‑first. Developed and measured on Windows 11 · Node 24 · PowerShell 7. Several organs ship Windows‑specific hardening (hidden‑window spawning, ACL sandbox compatibility). Linux/macOS paths exist but are less exercised.
  • Numbers here are measured, not aspirational. Figures marked measured were read from a live install; runtime counts (organs, capabilities) are yours to reproduce with body_status.

**Six kernels. 26 cataloged organ identities across 8 systems, realised by 24 plugins. One heartbeat.

If that's the kind of plugin platform you want, the architecture is all in ARCHITECTURE.md.

⭐ If this body has a pulse for you, star this repo — it costs nothing and is the single easiest way to help others find the project.

Community. Discussed in the LINUX DO community — a friendly Chinese-speaking developer forum where this project was shared and where questions get answered.

Star history chart

Plugins relacionados