Remove the stdio agent

This commit is contained in:
Tianyi Cui
2026-07-20 19:26:04 +08:00
parent 42f19edd67
commit 4cadf096ce
162 changed files with 1301 additions and 3920 deletions

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write
llm-adapter.md: f34fc9e1d5b59a323bb562764821ef910025880e
llm-adapter.zh.md: 3c781ae8a1a011e2f73d5f6de43f6f75e1fb549f
llm-adapter.md: 83296e54220c668410fe69d689199171251a7787
llm-adapter.zh.md: 89b7185690dbdfe33cbafe7b0ee4c3e83cfe0df8

View File

@@ -131,10 +131,12 @@ The first argument lists the model names handled by the adapter. If `cordis.yml`
- my-model-v1
- my-model-v2
- id: stdio-agent
name: '@deepseek-ai/dsh-stdio-demo'
- id: tui-agent
name: '@deepseek-ai/dsh-tui-demo'
config:
provider: my-llm
model: my-model-v1 # References the model registered above.
workspaceContext: false
```
## Reference implementations

View File

@@ -131,10 +131,12 @@ ctx.llm.registerAdapter(['model-name-1', 'model-name-2'], adapter)
- my-model-v1
- my-model-v2
- id: stdio-agent
name: '@deepseek-ai/dsh-stdio-demo'
- id: tui-agent
name: '@deepseek-ai/dsh-tui-demo'
config:
provider: my-llm
model: my-model-v1 # References the model registered above.
workspaceContext: false
```
## 实战参考

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write
config.md: a3f56018fd43cc803c1710f97c29a77340a0b257
config.zh.md: af661b9d7ef72e4085551202169e975bd0c3ec99
config.md: 0616f163f995b152d7a28841506027558de2c32c
config.zh.md: fa91445ae88456a61a4736ce8b71aed482227ce8

View File

@@ -9,7 +9,8 @@ Harness uses `cordis.yml` to describe which plugins an agent loads and the confi
The repository examples are runnable configurations and the most reliable starting points for a new project:
- [echo-agent](../../../examples/echo-agent/cordis.yml) uses a local mock model and needs no API key.
- [repl-agent](../../../examples/repl-agent/cordis.yml) combines the DeepSeek model, Bash, filesystem, compaction, subagents, and workflows.
- [tui-agent](../../../examples/tui-agent/cordis.yml) combines the DeepSeek model, Bash, filesystem, compaction, subagents, workflows, and the interactive TUI.
- [headless-agent](../../../examples/headless-agent/cordis.yml) exposes the coding composition as a one-shot task.
- [acp-agent](../../../examples/acp-agent/cordis.yml) connects to editor clients over ACP.
A minimal configuration is a list of plugin entries:
@@ -22,10 +23,15 @@ A minimal configuration is a list of plugin entries:
models:
- deepseek-v4-flash
- id: stdio-agent
name: '@deepseek-ai/dsh-stdio-demo'
- id: bash
name: '@deepseek-ai/dsh-bash-local'
- id: tui-agent
name: '@deepseek-ai/dsh-tui-demo'
config:
provider: deepseek
model: deepseek-v4-flash
workspaceContext: false
```
## Plugin entries

View File

@@ -9,7 +9,8 @@ Harness 使用 `cordis.yml` 描述 Agent 加载哪些插件以及每个插件的
仓库中的示例就是可以运行的配置,也是新项目最可靠的起点:
- [echo-agent](../../../examples/echo-agent/cordis.yml) 使用本地 mock 模型,不需要 API key。
- [repl-agent](../../../examples/repl-agent/cordis.yml) 组合 DeepSeek 模型、Bash、文件系统、压缩、子代理工作流。
- [tui-agent](../../../examples/tui-agent/cordis.yml) 组合 DeepSeek 模型、Bash、文件系统、压缩、子代理工作流和交互式 TUI
- [headless-agent](../../../examples/headless-agent/cordis.yml) 以单次任务形式暴露 coding 组装。
- [acp-agent](../../../examples/acp-agent/cordis.yml) 通过 ACP 接入编辑器客户端。
最小配置由一组插件条目组成:
@@ -22,10 +23,15 @@ Harness 使用 `cordis.yml` 描述 Agent 加载哪些插件以及每个插件的
models:
- deepseek-v4-flash
- id: stdio-agent
name: '@deepseek-ai/dsh-stdio-demo'
- id: bash
name: '@deepseek-ai/dsh-bash-local'
- id: tui-agent
name: '@deepseek-ai/dsh-tui-demo'
config:
provider: deepseek
model: deepseek-v4-flash
workspaceContext: false
```
## 插件条目

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write
index.md: a20b1041e13b01b6b1d01a5baa8975d3e68c6aa0
index.zh.md: 56ec50352218e2e28ad2dd7a6ef387376de75606
index.md: b698b8aeee6cebff374e20ca0f76ddc9e75213c0
index.zh.md: 337d246baa12ccf6d7a9656d1ea3b06002554c13

View File

@@ -14,10 +14,12 @@ Harness implements every capability an AI agent needs—including LLM calls, too
config:
apiKey: !!js process.env.DEEPSEEK_API_KEY
# Select the application template
- name: '@deepseek-ai/dsh-stdio-demo'
# Select the interactive application
- name: '@deepseek-ai/dsh-tui-demo'
config:
provider: deepseek
model: deepseek-v4-flash
workspaceContext: false
```
## Who it is for

View File

@@ -14,10 +14,12 @@ Harness 将一个 AI Agent智能体 所需要的所有能力——LLM 调
config:
apiKey: !!js process.env.DEEPSEEK_API_KEY
# Select the application template
- name: '@deepseek-ai/dsh-stdio-demo'
# Select the interactive application
- name: '@deepseek-ai/dsh-tui-demo'
config:
provider: deepseek
model: deepseek-v4-flash
workspaceContext: false
```
## 适合谁

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write
quickstart.md: acae2ac095e057971043c2bcece7a52d3ebc1c2c
quickstart.zh.md: 54643fe54e62dbbd3696362cb43ff8569577c53b
quickstart.md: 62e899adfa33e566083b8224b9bdf77c1038557a
quickstart.zh.md: 382c9685ebe0c919c2fd039484898b44e9264aa7

View File

@@ -7,91 +7,44 @@ This guide gets an agent running in five minutes.
## Prerequisites
- [Node.js](https://nodejs.org/) ^22.19 or >= 24
- [pnpm](https://pnpm.io/) 11 (use Corepack to select the repository-pinned version)
- [pnpm](https://pnpm.io/) 11 through Corepack
```sh
# Check versions
node -v # v22.19.x, or v24.x and newer
node -v
corepack enable
pnpm -v # 11.x
pnpm -v
```
## Step 1: run echo-agent
echo-agent needs no API key and runs after dependencies are installed.
## Step 1: run the keyless Headless demo
```sh
# Clone the repository
git clone https://github.com/deepseek-harness/deepseek-harness.git
cd deepseek-harness
# Install dependencies
pnpm install
# Start echo-agent
pnpm run demo:echo
pnpm run demo:echo "echo hello world"
```
The process prints:
The local mock model calls the `echo` tool, which returns the text in uppercase, and the final response is printed without opening an interactive UI. Use `--output-format stream-json` when you need the canonical event stream.
```
echo-agent ready. Type a message ("echo <text>" triggers the tool).
>
```
## Step 2: use a real model in the TUI
Enter:
```
> echo hello world
```
The model issues a tool call, and the echo tool returns the text in uppercase:
```
[tool call] echo({"text":"hello world"})
[tool result] ECHO: HELLO WORLD
```
Your local environment is ready.
## Step 2: use a real model
Next, connect a real DeepSeek model and run the complete command-line agent.
### Get an API key
Get an API key from [DeepSeek Platform](https://platform.deepseek.com/).
### Configure the environment
Create a gitignored `.env` file in the repository root:
Get an API key from [DeepSeek Platform](https://platform.deepseek.com/) and create the gitignored repository-root `.env`:
```sh
DEEPSEEK_API_KEY=sk-your-key-here
```
### Start repl-agent
Start the interactive coding agent:
```sh
pnpm run demo:repl
pnpm run demo:tui
```
```
agent REPL ready. Give it a coding task.
>
```
This is a complete coding assistant that can read and write files, run commands, and delegate subtasks.
Try a task:
```
> Create hello.js in the current directory, print "Hello from Harness!", and run it
```
The full-screen agent can read and write files, run commands, delegate subtasks, and track a plan. Try: `Create hello.js in the current directory, print "Hello from Harness!", and run it`.
## What happened
echo-agent and repl-agent use the same application framework (`@deepseek-ai/dsh-stdio-demo`). Their `cordis.yml` files select different plugins and configuration. Custom agents use the same composition model.
echo-agent uses the Headless `@deepseek-ai/dsh-cli-demo` app; tui-agent uses the interactive `@deepseek-ai/dsh-tui-demo` app. Both load the same providerless agent spine, while their `cordis.yml` files select the model and capability plugins appropriate to each surface.
## Next steps

View File

@@ -7,93 +7,46 @@
## 环境准备
- [Node.js](https://nodejs.org/) ^22.19 或 >= 24
- [pnpm](https://pnpm.io/) 11(建议通过 Corepack 使用仓库固定的版本)
- 通过 Corepack 使用 [pnpm](https://pnpm.io/) 11
```sh
# Check versions
node -v # v22.19.x, or v24.x and newer
node -v
corepack enable
pnpm -v # 11.x
pnpm -v
```
## 第一步:运行 echo-agent
echo-agent 不需要 API key装好依赖就能跑。
## 第一步:运行 keyless Headless 演示
```sh
# Clone the repository
git clone https://github.com/deepseek-harness/deepseek-harness.git
cd deepseek-harness
# Install dependencies
pnpm install
# Start echo-agent
pnpm run demo:echo
pnpm run demo:echo "echo hello world"
```
启动后你会看到:
本地 mock 模型会调用 `echo` 工具,由工具返回大写文本,最终回复在不打开交互式 UI 的情况下直接输出。需要规范事件流时可使用 `--output-format stream-json`
```
echo-agent ready. Type a message ("echo <text>" triggers the tool).
>
```
## 第二步:在 TUI 中使用真实模型
试着输入
```
> echo hello world
```
你会看到模型发起了一次 tool call工具调用echo 工具将文本转为大写并返回:
```
[tool call] echo({"text":"hello world"})
[tool result] ECHO: HELLO WORLD
```
恭喜!环境没问题。
## 第二步:使用真实模型调用
接下来接入真实的 DeepSeek 模型,跑一个完整的命令行 Agent。
### 获取 API Key
前往 [DeepSeek Platform](https://platform.deepseek.com/) 获取你的 API key。
### 配置环境变量
在仓库根目录创建 `.env` 文件(已被 gitignore
前往 [DeepSeek Platform](https://platform.deepseek.com/) 获取 API key并创建已被 Git 忽略的仓库根目录 `.env`
```sh
DEEPSEEK_API_KEY=sk-your-key-here
```
### 启动 repl-agent
启动交互式 coding agent
```sh
pnpm run demo:repl
pnpm run demo:tui
```
```
agent REPL ready. Give it a coding task.
>
```
这就是一个完整的编程助手,它能读写文件、跑命令、拆分子任务。
试着给它一个任务:
```
> Create hello.js in the current directory, print "Hello from Harness!", and run it
```
这个全屏 Agent 可以读写文件、运行命令、分配子任务和跟踪计划。可以尝试:`Create hello.js in the current directory, print "Hello from Harness!", and run it`
## 回头看
echo-agent 和 repl-agent 用的是同一个应用框架(`@deepseek-ai/dsh-stdio-demo`),区别只在 `cordis.yml`——换了哪些插件、填了什么配置。你以后定制自己的 Agent 也是同样的方式
echo-agent 使用 Headless `@deepseek-ai/dsh-cli-demo` apptui-agent 使用交互式 `@deepseek-ai/dsh-tui-demo` app。二者加载同一个 providerless agent spine并通过各自的 `cordis.yml` 为对应 surface 选择模型和能力插件
## 下一步
- [配置文件](./config.md) — 了解 `cordis.yml`完整语法
- [开发插件](../develop/basic/) — 编写自己的 tool 或后端
- [配置文件](./config.md) — 了解 `cordis.yml`格式
- [开发插件](../develop/basic/) — 编写自己的 tool 或后端