deepseek-harness/examples/headless-agent
2026-07-26 05:06:39 +08:00
..
tests Merge remote-tracking branch 'origin/master' into worktree/acp-automation-protocol 2026-07-24 23:43:10 +08:00
advanced.cordis.snapshot.yml test(snapshot): reconcile replay overlays with the merged configs and fixtures 2026-07-22 14:29:52 +08:00
advanced.cordis.yml feat(examples): default agent configs to DeepSeek Pro Max Thinking 2026-07-22 14:29:28 +08:00
composition.md Merge remote-tracking branch 'origin/master' into worktree/routed-model-compaction-policy 2026-07-21 10:17:55 +08:00
cordis.yml test(snapshot): reconcile replay overlays with the merged configs and fixtures 2026-07-22 14:29:52 +08:00
goal.cordis.snapshot.yml Merge goal tool fixes and align same-session blockers 2026-07-20 17:23:55 +08:00
goal.cordis.yml Merge goal tool fixes and align same-session blockers 2026-07-20 17:23:55 +08:00
package.json fix(examples): isolate headless agent example 2026-07-16 16:12:27 +08:00
pty.cordis.snapshot.yml fix(pty): close review lifecycle gaps 2026-07-22 22:37:20 +08:00
ralph.cordis.snapshot.yml test(ralph): snapshot fresh-agent rounds in headless app 2026-07-20 18:18:08 +08:00
README.i18n.yaml docs: translate remaining READMEs 2026-07-26 05:06:39 +08:00
README.md docs: translate remaining READMEs 2026-07-26 05:06:39 +08:00
README.zh.md docs: translate remaining READMEs 2026-07-26 05:06:39 +08:00
semantic-checkpoint.cordis.snapshot.yml refactor(acp): reduce bridge to automation protocol 2026-07-24 01:40:25 +08:00

headless-agent

English | 中文

Headless one-shot agent wiring: DeepSeek V4 + local bash and filesystem tools + subagent delegation + workflows and fresh-agent Ralph iteration + todo_write + JSONL persistence, with @deepseek-ai/dsh-cli-demo as the app front door.

Run it

# repo root .env (gitignored) or exported env:
#   DEEPSEEK_API_KEY=sk-…
#   DEEPSEEK_BASE_URL=https://…   # optional; defaults to the public API
pnpm run demo:headless "fix the failing test in this workspace"
pnpm run demo:headless --output-format json -- "summarize the implementation"
pnpm run demo:headless --output-format stream-json -- "run the focused tests"

Exactly one nonblank positional task is required; quote tasks containing spaces. There is no -p flag. text prints the last text-bearing assistant message, json prints one DSH-native result record, and stream-json emits the top-level session's canonical task-turn events before that record. Child sessions surface only through parent tool events and results.

Each invocation creates and persists a fresh session, runs all model and tool steps in one turn, flushes, disposes, and exits. This is non-interactive automation: there is no prompt, approval, resume, second turn, or stdin context. The configured tools can mutate the launch workspace, run commands, spawn child agents, and consume provider tokens.

Advanced and snapshot wiring

advanced.cordis.yml adds Code Mode and the Cordis tools to the shipped leaf. advanced.cordis.snapshot.yml replaces only the live LLM with replay. The tests under tests/ own the keyless real-Loader smoke, key-gated world-verified smoke, and the stream-json replay snapshot with its parent and child session fixtures.

The package-level CLI contract documents output records, exit status, cancellation, persistence, and model/token effects.