# Conflicts: # apps/cli/cordis.yml # apps/cli/package.json # apps/cli/tests/tui-keyless-smoke.e2e.ts # apps/web/tests/details-session-lifecycle.e2e.ts # apps/web/tests/snapshots/code-mode-round/ui.expected.md # apps/web/tests/snapshots/cordis-tool-round/ui.expected.md # apps/web/tests/snapshots/fresh-round-trip/ui.expected.md # apps/web/tests/snapshots/lifecycle-chrome/hero.expected.md # apps/web/tests/snapshots/lifecycle-chrome/reloaded.expected.md # apps/web/tests/snapshots/live-interactions/cancel.expected.md # apps/web/tests/snapshots/live-interactions/error-auth.expected.md # apps/web/tests/snapshots/live-interactions/retry.expected.md # apps/web/tests/snapshots/message-actions/ui.expected.md # apps/web/tests/snapshots/question-composer/answered.expected.md # apps/web/tests/snapshots/seeded-history/ui.expected.md # apps/web/tests/snapshots/steering/mid-steer.expected.md # apps/web/tests/snapshots/steering/settled.expected.md # docs/cordis-catalog/events.md # docs/cordis-catalog/services.md # docs/event-producer-consumer.md # docs/user/guide/config.i18n.yaml # docs/user/guide/config.md # docs/user/guide/config.zh.md # docs/user/guide/index.i18n.yaml # docs/user/guide/index.md # docs/user/guide/index.zh.md # examples/acp-agent/tests/snapshots/subagent-fork/session.1.jsonl # examples/acp-agent/tests/snapshots/subagent-mixed/session.2.jsonl # examples/cordis-agent/cordis.yml # examples/cordis-agent/tests/cordis-tools.e2e.ts # examples/headless-agent/tests/semantic-checkpoint-snapshots/tool-outcome-unknown/session.expected.jsonl # examples/headless-agent/tests/subagent-inheritance-snapshots/parent-override/parent.expected.jsonl # examples/tui-agent/code-mode.cordis.yml # examples/tui-agent/cordis.yml # packages/examples/tui-demo/README.md # packages/examples/tui-demo/README.zh.md # packages/host/apiproxy/README.i18n.yaml # packages/pty/tool-bash-persistent/README.i18n.yaml # packages/ui/tui/tests/snapshots/status-diagnostics-narrow.expected.txt # packages/ui/tui/tests/snapshots/status-diagnostics.expected.txt # pnpm-lock.yaml # scripts/snapshots/python-sdk-single-exe/advanced/result.json # scripts/snapshots/python-sdk-single-exe/advanced/session.1.jsonl # scripts/snapshots/python-sdk-single-exe/advanced/session.2.jsonl # scripts/snapshots/python-sdk-single-exe/advanced/session.jsonl
57 lines
1.9 KiB
Markdown
57 lines
1.9 KiB
Markdown
# 介绍
|
||
|
||
[English](index.md) | 中文
|
||
|
||
DeepSeek Harness 是一个**插件化的 Agent 开发框架**,基于 [Cordis](https://github.com/cordiverse/cordis) 微内核构建。它的核心理念是:**一切皆插件**。
|
||
|
||
## 它是什么
|
||
|
||
Harness 将一个 AI Agent(智能体) 所需要的所有能力——LLM 调用、工具执行、会话管理、子任务分配——全部构建为可组合的插件。你通过一个 `cordis.yml` 配置文件来声明加载哪些插件、使用什么参数,就能组装出一个完整的 Agent。
|
||
|
||
```yaml
|
||
# Select the LLM backend
|
||
- name: '@deepseek-ai/dsh-llm-deepseek'
|
||
config:
|
||
apiKey: !!js process.env.DEEPSEEK_API_KEY
|
||
|
||
# Select the agent the interactive front door drives
|
||
- id: agent-loop
|
||
name: '@deepseek-ai/dsh-agent-loop'
|
||
config:
|
||
agents:
|
||
- id: main
|
||
provider: deepseek-official
|
||
model: deepseek-v4-flash
|
||
|
||
# Select the interactive front door
|
||
- name: '@deepseek-ai/dsh-tui'
|
||
```
|
||
|
||
## 适合谁
|
||
|
||
### 应用使用者
|
||
|
||
如果你只是想用一个现成的 Agent 应用(如编程助手、对话代理),你需要的全部操作就是:
|
||
|
||
1. 复制一个 example 模板
|
||
2. 填写 API key
|
||
3. 运行
|
||
|
||
不需要写任何代码。详见 [快速开始](./quickstart.md)。
|
||
|
||
### 插件开发者
|
||
|
||
如果你想为 Agent 添加新能力——一个自定义 tool、一个新的 LLM 适配器、一个新的执行后端——你需要编写一个插件。Harness 提供了清晰的扩展接口和类型安全的开发体验。详见 [开发](../develop/basic/)。
|
||
|
||
## 核心特性
|
||
|
||
- **只需要配置** — `cordis.yml` 决定能力集合,换模型、加工具只需改一行
|
||
- **随时替换 (HMR)** — 开发时修改插件代码,无需重启进程
|
||
|
||
## 技术栈
|
||
|
||
- **运行时**: Node.js ^22.19 或 >= 24
|
||
- **语言**: TypeScript (ESM)
|
||
- **框架**: Cordis
|
||
- **包管理**: pnpm workspaces(仓库固定使用 pnpm 11)
|