DeepSeek Harness 开始
DeepSeek Harness(dsh)是由 DeepSeek AI 开发的开源 agent harness(智能体框架)。
它采用一切皆插件的架构,并由 Cordis 驱动,其设计参见论文 A Programming Paradigm for Spatiotemporal Composability。
- 代码: https://github.com/deepseek-ai/deepseek-harness
- 文档: https://github.com/deepseek-ai/deepseek-harness/blob/master/README.zh.md
准备
安装 Node,
- 打开 https://nodejs.org/en/download
- 选择 for 你的系统 using nvm with pnpm
- 依照指导安装,验证版本通过
安装 Git,
- 打开 https://git-scm.com/install
- 选择你的系统,依照指导安装
获取 DeepSeek API key,
- 打开 https://platform.deepseek.com
- 注册,再创建 API Key,复制留存
运行
从仓库源码运行:
git clone https://github.com/deepseek-ai/deepseek-harness.git
cd deepseek-harness
# 配置 DeepSeek API key: 由启动环境提供,或之后 UI 配置
export DEEPSEEK_API_KEY=sk-your-key-here
pnpm install
pnpm run build
pnpm dsh web
入门
dsh 入门: https://deepseek-harness.github.io/deepseek-harness/guide/quickstart
按指导配置模型、选择工作区、运行任务。提示示例:
读 idea 文档,理解愿景、坚持原则。先梳理要设计的条目,及其组织、优先级等。
目前 DeepSeek API 价格已采用峰谷定价,长时任务可考虑空闲时段运行。
脚本
DeepSeek Harness 提供了 Python SDK,可以用 Python 来驱动和编排 Agent 执行复杂任务,而不仅仅依赖 Web 界面或命令行。一般用于脚本自动化、或集成到现有工作流中。
Python SDK: https://deepseek-harness.github.io/deepseek-harness/guide/python-sdk
开发
DeepSeek Harness 本身就是一个“调度中心”,它的核心设计原则是“一切皆插件”。
因此需要借助 AI,尤其是 Harness 自身或其他 AI 编程工具,来完成插件开发。这是官方和社区推荐的可行路径。
- dsh 开发指南: https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/development.zh.md
- dsh 架构指南: https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/architecture.zh.md
示例
以“AI 视频生产”为例,其 Harness 协同架构如下:
这些 Agent 本身并未内置,都要开发相应的 dsh 插件。
Harness 作为总导演、制片中心,调度完成所有 Agent 的数据流转:
最终,用户给 Harness 提交需求,由它自主分析选择不同方式来调度生产视频:
插件
那开发第一个插件: https://deepseek-harness.github.io/deepseek-harness/develop/basic/
必然是 dsh 开始的下一步了。
有了自己的 idea,就立即动手开始做 Agent 插件吧。
结语
Let's Go Coding ~