Your First DeepSeek Harness Plugin: Mount It Before You Productize
Follow the official first-plugin tutorial through apply(ctx) and a Cordis overlay. No full step dump — only boundaries and what to do next.
Open the official tutorial| Item | Details |
|---|---|
| Provider | DeepSeek Harness |
| Level | Intermediate |
| Date | 2026-08-13 |
| Official source | DeepSeek Harness |
| Topics | #agents · #engineering · #open-source |
What a plugin actually is
In the official tutorial, a plugin is a TypeScript module that exports apply. The framework calls apply with a ctx so you can register capabilities. The minimum shape:
```ts import type { Context } from '@deepseek-ai/cordis'
export const name = 'hello-plugin'
export function apply(ctx: Context) { console.log('[hello-plugin] plugin loaded!') } ```
That is the complete configuration. Do not start by adding tools, swapping models or calling external APIs.
Official order
- Start from a repository checkout that already built from source.
- Create a local plugin file.
- Insert it with a
cordis.ymloverlay. The plugin path must be absolute. - Boot the Web UI with that overlay and check the load log.
Exact commands and YAML fields belong to the official tutorial — field names will move in preview.
After it loads
Do not turn the first plugin into a do-everything agent. Pick one seam from the official architecture table:
- A human command only:
ctx.commands - One narrow model-facing tool:
ctx.tools - A model provider:
ctx.llm
Tag the plugin repo with the GitHub topic dsh-plugin. That is how the official README wants plugins discovered.
Safety
Plugins can reach the filesystem, subprocesses and credentials. Local experiments can be wide. Before you give a plugin to someone else, narrow permissions. Do not hard-code secrets. Do not open an arbitrary shell by default.
FAQ
Why did the plugin not load?
The official tutorial insists on an absolute path. A patch file contributes configuration; it does not change the directory the loader resolves modules from.
Should I publish an npm package?
Get a local overlay working first. Publish only after you follow the official plugin-distribution notes, and add the dsh-plugin topic.
Official source: Your first plugin. This article is a boundary and sequence companion, not a replacement for the tutorial's YAML and launch commands.
Sources & Further Reading
This page is grounded in the authoritative sources below — verifiable and citable by AI engines and readers.
- 🔗 Official source
- 👤 Person: DeepSeek Harness
- # Topic: AgentsBuilding, orchestrating and shipping AI agents
- # Topic: EngineeringAPIs, prompting and system design
- # Topic: Open SourceOpen models, frameworks and ecosystems
Citation: Please attribute Laojin Global (laojinchuhai.com) and keep the original link.
Made by Laojin · AI that ships
AllModelsAPIOne key for many models
AllModelsAPI is a multi-model API gateway: one key reaches many models through an OpenAI-compatible interface — point your existing code at a new base URL and you're migrated. It's not a demo: our own production workloads run on it every day.
More from Laojin: Sellenca · 365AIOrg · 365Loopa · 365 Ops · 365Skill
Related
Linked by topic, people and hubs