The guide tier said how to compose plugins with `cordis.yml` but never how to reach a provider other than DeepSeek, so the two things a person actually does — give a catalog provider its key from the Models page, and declare a gateway the installed catalog does not ship — had no home outside package READMEs. The new page covers both entry points and the relationship between them: the Models page and `$DSH_HOME/settings.yaml` write one document, over a `llm-pi-ai` adapter that mounts dormant until that document names routes. It carries the settings shape, catalog replacement and its capacity fallbacks, credential references, and the four failures a misconfigured route produces, and links the generated config catalog for exhaustive fields. It sits between Quick start and Configuration in the guide sidebar, which is where a reader hits the question.
63 lines
1.8 KiB
Markdown
63 lines
1.8 KiB
Markdown
# 快速开始
|
||
|
||
[English](quickstart.md) | 中文
|
||
|
||
本指南带你在 5 分钟内跑起一个 Agent。
|
||
|
||
## 环境准备
|
||
|
||
- [Node.js](https://nodejs.org/) ^22.19 或 >= 24
|
||
- 通过 Corepack 使用 [pnpm](https://pnpm.io/) 11
|
||
- [DeepSeek Platform](https://platform.deepseek.com/) API key
|
||
|
||
```sh
|
||
node -v
|
||
corepack enable
|
||
pnpm -v
|
||
```
|
||
|
||
## 第一步:安装并配置 API key
|
||
|
||
```sh
|
||
git clone https://github.com/deepseek-harness/deepseek-harness.git
|
||
cd deepseek-harness
|
||
pnpm install
|
||
```
|
||
|
||
在仓库根目录创建已被 Git 忽略的 `.env`:
|
||
|
||
```sh
|
||
DEEPSEEK_API_KEY=sk-your-key-here
|
||
```
|
||
|
||
## 第二步:运行一个 Headless 任务
|
||
|
||
运行一个非交互式任务并打印最终回答:
|
||
|
||
```sh
|
||
pnpm run demo:headless "summarize the architecture of this workspace"
|
||
```
|
||
|
||
Headless 运行一个完整的模型/工具轮次,持久化会话,打印结果后退出。需要规范事件流时可使用 `--output-format stream-json`。
|
||
|
||
## 第三步:使用 Web UI
|
||
|
||
构建并启动浏览器界面:
|
||
|
||
```sh
|
||
pnpm run build
|
||
pnpm run dsh web
|
||
```
|
||
|
||
打开 `http://127.0.0.1:3080`。agent 可以读写文件、运行命令、分配子任务和跟踪计划。可以尝试:`Create hello.js in the current directory, print "Hello from Harness!", and run it`。
|
||
|
||
## 回头看
|
||
|
||
headless-agent 使用 `@deepseek-ai/dsh-cli-demo` app。`dsh web` 则组合 [`apps/cli/config/base.cordis.yml`](../../../apps/cli/config/base.cordis.yml) 与 [`apps/cli/config/web.cordis.yml`](../../../apps/cli/config/web.cordis.yml),不使用 app 组合包。二者都会根据各自入口模式选择 DeepSeek 模型和能力插件。
|
||
|
||
## 下一步
|
||
|
||
- [配置模型提供方](./providers.md) — 接入 DeepSeek 之外的提供方与自定义网关
|
||
- [配置文件](./config.md) — 了解 `cordis.yml` 的格式
|
||
- [开发插件](../develop/basic/) — 编写自己的 tool 或后端
|